api.congress.gov
api.congress.gov copied to clipboard
Ability to filter members
It would be useful to be able to filter members by state, district, congress, and/or whether they are a current member.
Alternately, as a start, a search by name would be useful.
That is, the ability to send an optional search
parameter like /member?format=json&search=smith
that would return members with Smith in their name, as a way to performing lookups of their bioguideId
It seems from usage that it can accept a limit
and offset
argument for pagination, but these are undocumented. If trying to build a way for folks to look up data on a specific member, a scrape of the full 2431 person list may be appropriate -- in which case, what seems to be a max limit of 243 per query would be worth noting somewhere? I'm unsure if it's coincidence that is approximately 1/10th of the full size, but querying with a limit
of 243 works, but 244 does not.
"pagination": {
"count": 2431,
"next": "https:\/\/api.data.gov\/congress\/v3\/member?offset=243&limit=243&format=json"
},
Thank you for your comments. We've added this to our possible future development list. Watch the changelog for updates.
+1
This would be great. +1
Any chance this might get attention soonish? It would be really helpful to have an authoritative source for getting this info for specific districts.
@bendur - Hi Ben, we hope to start work on this git issue soon with a release of May 20, 2024 for this enhancement request. Please monitor the change log for any updates on our progress. Thanks!
Hello - a quick update: We anticipate that PART of this request will go live on Monday, April 29. Beginning on April 29, the member endpoint will return members specified by Congress (e.g., the 118th Congress). Other requests will tentatively go live on May 20, 2024. Thanks!