Fetch and Axios
The same two calls in a browser, a Node script or a serverless function.
Native fetch
const response = await fetch(
"https://scraper.aznime.com/anilist/v1/search?q=naruto",
{ headers: { "x-api-key": process.env.SCRAPER_API_KEY } }
);
const payload = await response.json();
if (!payload.success) {
throw new Error(payload.error.code + ": " + payload.error.message);
}
console.log(payload.data.results.length, "results");Axios
const axios = require("axios");
const { data } = await axios.get(
"https://scraper.aznime.com/anilist/v1/anime/16498",
{
headers: { "x-api-key": process.env.SCRAPER_API_KEY },
timeout: 12000,
}
);
console.log(data.data.title.romaji);Path and query parameters
| Kind | Where it goes | Example |
|---|---|---|
| Path | Declared in the endpoint path as :name | /anilist/v1/anime/16498 |
| Query | After the endpoint path, encoded | /anilist/v1/search?q=naruto&page=2 |
Unknown query parameters are ignored so a tracking suffix cannot break a call. A missing required parameter is a 422 with the name in the message.
Caching
Each endpoint declares its own window and the platform keeps that answer in memory, per instance. Responses are sent with Cache-Control: no-store so a CDN never serves a stale rate limit or a body without a log entry, and x-cache tells you whether the answer came from the store (HIT) or upstream (MISS).