Checking API requests usage

Scraping Fish API exposes /usage endpoind to let you programmatically check the status of active request packs associated with your account.

Example

To get the current status of API requests available for your account, you can call /usage endpoint with api_key query parameter as follows:

GET
/api/v1/
import requests

response = requests.get("https://scraping.narf.ai/api/v1/usage/?api_key=[your API key]")
print(response.content)

In the response, you get a list of your valid API request packs sorted in ascending order by expiration date, for example:

[
  {
    "total": 100000,
    "left": 69420,
    "expires": "24 Feb 2024 20:00:00 GMT"
  }
]

where:

  • total: the total number of API requests you purchased in this pack,
  • left: the number of API requests left in this pack,
  • expires: API requests pack expiration date in UTC.

This information is also available in the Scraping Fish dashboard after you log in to your account.

If you currently do not have any API requests available, the list in the response will be empty.