Usage per product for a date range. Counts requests and credits per product from the request log. from and to accept an ISO date (UTC) or date-time. A date-only to includes that whole day. The default range is the last 30 days.
GET https://YOUR_API_HOST/v1/usage
Credits
Free. This endpoint never spends credits.
Query parameters
| Field | Type | Required | Notes |
|---|---|---|---|
from | string | no | Example 2026-10-01. |
to | string | no | Example 2026-10-31. |
Example request
curl https://YOUR_API_HOST/v1/usage \
-H "Authorization: Bearer $LOOKVALID_API_KEY"
const response = await fetch("https://YOUR_API_HOST/v1/usage", {
headers: { Authorization: `Bearer ${process.env.LOOKVALID_API_KEY}` },
});
console.log(await response.json());
import os
import requests
response = requests.get(
"https://YOUR_API_HOST/v1/usage",
headers={"Authorization": f"Bearer {os.environ['LOOKVALID_API_KEY']}"},
timeout=30,
)
print(response.json())
Response
| Field | Type | Notes |
|---|---|---|
from | string | Inclusive start. Format: date-time. |
to | string | Exclusive end. Format: date-time. |
total | object | - |
total.requests | integer | - |
total.credits_charged | integer | - |
products | array of object | - |
products[].product | string | - |
products[].requests | integer | - |
products[].found | integer | Lookups that returned data, including cache hits. |
products[].not_found | integer | - |
products[].failed | integer | Invalid input, rate limited, unknown product, unavailable provider, insufficient credits or internal error. |
products[].cache_hits | integer | - |
products[].credits_charged | integer | - |
Response shape
Each value is a stand-in that shows the field type.
{
"from": "string",
"to": "string",
"total": {
"requests": 0,
"credits_charged": 0
},
"products": [
{
"product": "string",
"requests": 0,
"found": 0,
"not_found": 0,
"failed": 0,
"cache_hits": 0,
"credits_charged": 0
}
]
}
Errors
400invalid_input: The request input is invalid.401unauthorized: The API key is missing, malformed, revoked or unknown.429rate_limited: Too many requests for this API key.