How can I see my token usage and request history?
- Your dashboard shows the tokens used this month and the request log: each request, its parameters, the tokens it used and the IP address it came from. Use it to find unexpected usage, e.g. a forgotten script or a leaked key.
- Programmatically, use the usage endpoint described in the documentation (newsapi.ai/documentation). In the Python SDK,
er.getUsageInfo(). - Each API response also contains headers with the tokens used by that request.
- Request logs are kept for the last 3 months.
Token counts reset on the 1st of each month.