nysenate/OpenLegislation

API maximum number of result issue

Closed this issue · 6 comments

http://legislation.nysenate.gov/api/3/bills/2016?key=mykey&limit=1000&offset=10001&full=true

Hey, team. I am using your guys API and found an issue last Friday I think.
I cannot get any result when I did the query above. the following is the response JSON.
{
"success" : false,
"message" : "There was error retrieving your search results. Make sure that the query is valid.",
"responseType" : "error",
"errorCode" : 100,
"errorData" : "Unexpected Search Exception!",
"errorDataType" : "string"
}

And the same issue happened on the website version of API. Here is the snapshot.
looks like I cannot get more than 10000 records

Fixed

多谢

Sorry about that @Fenhanwang, the fix had not been deployed yet. The fix is now in production.

Also, on an unrelated note, I see that you are querying http://legislation.nysenate.gov/api/3/bills/2016 . Not sure if you are aware, but bills are grouped into two year sessions, which start on odd numbered years. This api returns bills by session, so http://legislation.nysenate.gov/api/3/bills/2016 will return the same bills as http://legislation.nysenate.gov/api/3/bills/2015.

@McSquirrel
Thank you for the reminder.
I am aware that NY has a carry-over session which means it is 2015-2016 session.

Thank you @Fenhanwang, we appreciate your feedback.