Open hamkj7hpo opened 1 year ago
I'm sorry, but we don't have that data yet.
So, @mnewatloc, I'm curious as to what a good approach for getting this data would be at the moment.
I'm making a PoC application in which I'd need to pull the vote data for all bills related to a given legislator. I believe there are rate limits though (checking here https://github.com/LibraryOfCongress/api.congress.gov) set at 1000 requests per hour.
With this rate lock and given that there is no quick way to get a bill's vote data, we'll have to:
While this is convoluted, it is doable, but it definitely hits the rate lock rather quickly. Given that most endpoints within this API have a pull limit of 250, it will take dozens, if not hundreds, of pulls to get an entire bill list. I saw for one congress session, 114 I believe, that there was over 12k bills registered. While this was somewhat surprising, it means that for getting the bill vote history of a single legislator, I'm looking at 50 requests at minimum for getting the list, but then adding in requests for retrieving individual bill actions, sponsors, cosponsors, etc., I'm hitting the rate lock almost immediately.
I did notice that there was a bulk data repository https://www.govinfo.gov/bulkdata, but I'm not 100% as to what this even provides. I believe from my local API testing that the data from this API is more current and up-to-date than that bulk repository so I'm not sure that it will meet my needs. Even with attempting to cache responses where I can and storing some data locally to reduce future requests, it's almost impossible to perform the functions I'm looking to achieve without hundreds of runs either from a server or my local.
I suppose, essentially, what I'm wondering is if there's a better way to performing this vote count or if this isn't something this API is actually wanting to support, or if the rate locks can be removed to varying degrees? I would've thought retrieving historical voting records for our representatives would be a valid use-case, but at least in the current form I'm seeing, this is completely unsupported. Forgive me if I've simply missed some other API that is available or if I have some kind of misunderstanding.
Hello. The bill status bulk data repository at GPO is sourced from the Congress.gov API. You can learn more about this data and the frequency to which it is updated at GPO’s GitHub repository for bill status data. You can get House vote data from https://clerk.house.gov/ at each of the vote URLs like http://clerk.house.gov/cgi-bin/vote.asp?year=2023&rollnumber= (e.g., http://clerk.house.gov/cgi-bin/vote.asp?year=2023&rollnumber=25). Since it’s XML, you can extract the bill number. For the Senate, you can visit URLs like https://www.senate.gov/legislative/LIS/roll_call_votes/vote1172/vote_117_2_00421.xml for individual votes. You can also get a whole session’s worth of vote data at URLs like https://www.senate.gov/legislative/LIS/roll_call_lists/vote_menu_117_2.xml. Those XML files also contain bill/amendment data that can be extracted.
Thank you for the information provided. It seems bulk data bill status will achieve what I'm looking for in addition to some of the other endpoints offered from the Library of Congress Api
Hello. FWIW ProPublica has a Votes api https://projects.propublica.org/api-docs/congress-api/votes/
it does look like their store is down, though, so you can't get a API key from them. You might message them about their store, perhaps they're not aware it's down?
To my knowledge, they don't rate limit api requests.
Hello. FWIW ProPublica has a Votes api projects.propublica.org/api-docs/congress-api/votes
Fair warning ProPublica's congress API has a few issues and maintaining the API doesn't seem to be a high priority for them. See their GitHub issues.
Instead of relying on ProPublica I'd recommend scraping clerk.house.gov/Votes for the house and senate.gov/legislative/votes_new.htm for the senate.
Thank you for the suggestions. I personally ended up making my own api that utilizes the senate.gov an house.gov endpoints. Not sure if that'd be worth hosting publicly or not, but it's definitely doable from those endpoints with some data caching to limit requests rates to those endpoints.
Issue #139 is related.
Issue #245 is related.
Hello - the Congress.gov team is in the early stages of investigating the feasibility of 1.) incorporating vote data into Congress.gov and 2.) creating a Vote endpoint in the Congress.gov API. We are currently working towards having a better understanding of what this will entail. While we currently do not have a timeline, we are hopeful to have more information at a later date.
Issue #249 is related.
Issue #285 is related.
Issue #285 is related.
I grabbed all the roll call info from 101 - 118, the lack of standardization between the house and senate is silly - makes it a pain. Thank you for the help man.
why is there not a vote endpoint?