GET
/v1/usage
v1Get API usage and quota
Returns current month usage, quota information, daily usage breakdown, and summary statistics for the authenticated API key. Requires API key authentication.
Parameters
| Name | Type | Description |
|---|---|---|
from | integer (int64) | Start of date range (Unix milliseconds). Defaults to 30 days ago. |
to | integer (int64) | End of date range (Unix milliseconds). Defaults to now. |
from integer (int64)Start of date range (Unix milliseconds). Defaults to 30 days ago.
to integer (int64)End of date range (Unix milliseconds). Defaults to now.
Request Examples
bash
curl "https://api.newsrank.ai/v1/usage" \
-H "Authorization: Bearer nrf_your_api_key"Response
json
{
"key_id": "key_abc123",
"tier": "starter",
"quota": {
"monthly_limit": 15000,
"monthly_used": 4231,
"pct_used": 28,
"grace_limit": 16500,
"resets_at_ms": 1740787200000
},
"summary": {
"total_requests": 1023,
"total_bytes": 5242880,
"total_errors": 12,
"avg_latency_ms": 45.2,
"top_endpoints": [
{
"endpoint": "string",
"count": 0
}
]
},
"daily": [
{
"day_ms": 0,
"requests": 0,
"errors": 0,
"bytes": 0
}
]
}Try it
Server
Using sandbox demo key (5 req/min) — no signup required
Authentication
Demo key (sandbox)
Endpoint
GET /v1/usage