congressapi / does a fuzzy-matching text search of the legislators. The results are legislator names associated with scores ranging from 0 to 1 with 1.0 being an assumed "perfect match." The search algorithm can handle a wide variety of inputs including different orders for the names (last, first or first last), nicknames, minor typos, and more.


  • name: name to search for
  • threshold: optional threshold parameter specifying minimum score to return (defaults to 0.8, lower values not recommended)
  • all_legislators: optional parameter to search all legislators in API, not just those currently in office (false by default)

Return Value

Legislators are returned in the same format described for legislators.get and legislators.getList.

Example Calls Finegold