api.congress.gov icon indicating copy to clipboard operation
api.congress.gov copied to clipboard

Ability to filter members

Open bendur opened this issue 2 years ago • 8 comments

It would be useful to be able to filter members by state, district, congress, and/or whether they are a current member.

bendur avatar Sep 08 '22 21:09 bendur

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

georgestephanis avatar Sep 09 '22 16:09 georgestephanis

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"
    },

georgestephanis avatar Sep 09 '22 17:09 georgestephanis

Thank you for your comments. We've added this to our possible future development list. Watch the changelog for updates.

mnewatloc avatar Sep 09 '22 18:09 mnewatloc

+1

pffy avatar Jan 09 '23 22:01 pffy

This would be great. +1

ariel-serruya avatar Jul 17 '23 03:07 ariel-serruya

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 avatar Apr 09 '24 01:04 bendur

@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!

apreiter18 avatar Apr 11 '24 19:04 apreiter18

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!

apreiter18 avatar Apr 22 '24 21:04 apreiter18