LibraryOfCongress / api.congress.gov

congress.gov API
601 stars 38 forks source link

API rate limit tracking #244

Closed apreiter18 closed 1 month ago

apreiter18 commented 1 month ago

Feedback from colleagues:

"Has your team considered putting rate limit info (like rate limit and rate limit remaining) in the header returned from the API? Not critical to work on our end but it would simplify some of the tracking of the rate limit we are doing currently. "

ryparker commented 1 month ago

Isn't this already supported? Every request to api.congress.gov returns these two headers

X-Ratelimit-Limit: 5000
X-Ratelimit-Remaining: 4999
apreiter18 commented 1 month ago

Thanks, @ryparker for this information and this reminder!

ryparker commented 1 month ago

No problem!