Skip to content
Gregor Leban edited this page Oct 14, 2026 · 5 revisions

When using Event Registry through the API, your actions consume so-called tokens. Different queries can use a different number of tokens. The tokens and their use are described in detail on the pricing page.

Access to the data in Event Registry depends on your account. If you are a free user without a paid licence, you can perform a limited number of requests and are allowed to use a limited set of functionalities (for example, data is limited to the last month only). The users without a paid licence are also not allowed to use the obtained data for commercial purposes. The terms of service are described on the Terms of Service page. In order to avoid these restrictions please contact us about the available plans.

Checking your usage from the SDK

The SDK provides several methods for tracking how many tokens/requests you have used:

  • EventRegistry.getUsageInfo() returns the number of used and total available tokens for your account, as a dict with the usedTokens and availableTokens properties. It can be called at any time.
  • EventRegistry.getRemainingAvailableRequests() and EventRegistry.getDailyAvailableRequests() return the remaining and the total number of requests for the day. The values are populated from the response headers, so they are available only after at least one request has been made.
  • EventRegistry.printLastReqStats() prints how many tokens were used by the last executed request and whether the archive was used.
from eventregistry import *
er = EventRegistry(apiKey = YOUR_API_KEY)
usage = er.getUsageInfo()
print("used %s of %s tokens" % (usage["usedTokens"], usage["availableTokens"]))

res = er.execQuery(QueryArticles(keywords = "Tesla"))
# prints the number of tokens used by the request, the performed action and whether the archive was used
er.printLastReqStats()

Queries that search the archive (content older than 31 days) use more tokens than queries on the recent content. If you only need recent content, create the instance with EventRegistry(allowUseOfArchive = False). What happens when you run out of tokens and how to avoid making too many requests at once is described on the Errors and troubleshooting page; the Quickstart recipes explain how many requests an iterator makes.

Clone this wiki locally