Authentication
Reads are open by default and rate limited by address. A key raises the ceiling and identifies your traffic in the logs.
Sending a key
The key goes in x-api-key. An Authorization: Bearer header is accepted as well, for clients that only expose that field.
curl https://scraper.aznime.com/anilist/v1/search?q=naruto \ -H "x-api-key: sk_scr_xxxxxxxxxxxxxxxxxxxxxxxx"
Getting a key
Keys are issued from the admin dashboard. Each one has a name, a prefix you can recognise in logs, its own per minute limit, and an on or off switch. The full key is shown once, when it is created; only its hash is stored.
If the deployment sets REQUIRE_API_KEY=true, every request without a valid key is answered with 401 UNAUTHORIZED.
Rate limits
| Caller | Default limit | Headers |
|---|---|---|
| No key | 40 requests per minute per address | x-ratelimit-limit, x-ratelimit-remaining |
| Key | 240 requests per minute, set per key |
A request over the limit returns 429 RATE_LIMITED with the window reset time in the hint. Counters live in the function instance, so a burst spread across several instances can briefly exceed the nominal number.
Handling a rejection
const response = await fetch(url, { headers: { "x-api-key": key } });
if (response.status === 401) {
// the key is wrong or revoked: stop retrying
}
if (response.status === 429) {
// back off until the reset time in the hint
}See Errors for the full list, or try a request without a key.