Recipe - Food - Nutrition

부분 유료
Verified
분류별 David | 업데이트됨 לפני 21 ימים | Food
인기

9.9 / 10

지연 시간

504ms

서비스 수준

100%

Health Check

N/A

모든 토론으로 돌아가기

API endpoint for checking remaining calls?

Rapid account: Johnwmillr
johnwmillr
לפני 6 שנים

Hi,
Is there a way for me to check how many remaining X-RateLimit-responses and X-RateLimit-requests I have without making a new API request that will count against me? Currently I am making a request to the API and checking the response headers to know how many calls I have left, but I need to be able to check this amount (programmatically) without making the initial request to the API.

Thanks,
John

Rapid account: Johnwmillr
johnwmillr Commented לפני 6 שנים

Thanks for getting back to me, David!

The fix I came up with in the meantime is to make an empty GET request to the root path of the Spoonacular API. There is a 404 response, but I’m then able to check the headers for the RateLimit information. And I think that this empty request does not use up any of my daily allotment.

Thanks for providing such a good API! 😃

John

Rapid account: Spoonacular
spoonacular Commented לפני 6 שנים

Hi John,

The rate limiting is done via the RapidAPI proxy so we can’t create an endpoint since we don’t have this information. Could you please ask RapidAPI directly please?

Btw. thanks for being such an avid user of the API 😃

David

아래에 의견을 추가하고 토론에 참여하세요.

새 댓글을 게시하려면 로그인 / 가입