Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to check how many calls left in AlchemyAPI? python

The free user for AlchemyAPI can call 1000 requests a day (http://www.alchemyapi.com/products/pricing/).

I have been accessing the API with python as such:

from alchemyapi import AlchemyAPI
demo_text = 'Yesterday dumb Bob destroyed my fancy iPhone in beautiful Denver, Colorado. I guess I will have to head over to the Apple Store and buy a new one.'
response = alchemyapi.keywords('text', demo_text)
json_output = json.dumps(response, indent=4)
print json_output

I know I ran out of calls since the requests were response returning None.

How do I check how many calls I have left through the python interface?

Will the check count as one request?

like image 863
alvas Avatar asked Dec 08 '25 04:12

alvas


2 Answers

You can use alchemy_calls_left(api_key) function from Here

and no it won't count as a call itself.

like image 193
smohamed Avatar answered Dec 10 '25 18:12

smohamed


This URL will return you the daily call used info.

Replace the API_KEY with your key.

http://access.alchemyapi.com/calls/info/GetAPIKeyInfo?apikey=API_KEY&outputMode=json

like image 45
Naffi Avatar answered Dec 10 '25 17:12

Naffi



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!