Search code examples
pythonjsonrestnlpalchemyapi

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?


Solution

  • You can use alchemy_calls_left(api_key) function from Here

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