IMDb chart
GET https://api.api.sh/imdb/v1/chart
Every response includes credits_used: the credits this call cost.
Part of the IMDb API: 30 endpoints with prices, use cases and example responses.
Parameters
| name | type | description |
|---|---|---|
type | string | Example: top |
Every endpoint also takes fresh, raw, fields (see lean responses and caching).
Example
curl "https://api.api.sh/imdb/v1/chart?type=top" \
-H "x-api-key: $APISH_KEY" import os, requests
res = requests.get(
"https://api.api.sh/imdb/v1/chart",
params={"type": "top"},
headers={"x-api-key": os.environ["APISH_KEY"]},
timeout=120,
)
res.raise_for_status()
data = res.json() const url = new URL("https://api.api.sh/imdb/v1/chart");
url.searchParams.set("type", "top");
const res = await fetch(url, { headers: { "x-api-key": process.env.APISH_KEY } });
if (!res.ok) throw new Error(`${res.status} ${await res.text()}`);
const data = await res.json(); Response
A JSON object with the fields described above, plus raw (the source's own data), cached, fetched_at and credits_used. Errors return {"success": false, "error": "…"} with the HTTP status (see errors). A lookup that ran but found nothing (404) costs the price above; refused calls and errors on our side are free (what's charged).
Example response (real call, trimmed: lists cut to 2 items, long text shortened, raw left out)
{"type": "top","entries": [{"rank": 1,"id": "tt0111161","url": "https://www.imdb.com/title/tt0111161/","name": "The Shawshank Redemption","original_name": "The Shawshank Redemption","type": "Movie","year": 1994,"rating_value": 9.3,"rating_count": 3256525,"content_rating": "R","runtime_minutes": 142,"genre": ["Drama"],"image": "https://m.media-amazon.com/images/M/MV5BMDAyY2FhYjctNDc5OS00MDNlLThiMGUtY2UxYWVkNGY2ZjljXkEyXkFqcGc@._V1_.jpg","title_type_id": "movie","end_year": null,"release_date": "1994-10-14","plot": "After a banker is sentenced to life in Shawshank Prison, he forms an unlikely friendship with a seasoned inmate and clings to hope amid crue…","image_width": 1200,"image_height": 1800,"popularity_rank": 49,"popularity_change": {"direction": "DOWN","difference": 6}},{"rank": 2,"id": "tt0068646","url": "https://www.imdb.com/title/tt0068646/","name": "The Godfather","original_name": "The Godfather","type": "Movie","year": 1972,"rating_value": 9.2,"rating_count": 2267384,"content_rating": "R","runtime_minutes": 175,"genre": ["Crime","Drama"],"image": "https://m.media-amazon.com/images/M/MV5BNGEwYjgwOGQtYjg5ZS00Njc1LTk2ZGEtM2QwZWQ2NjdhZTE5XkEyXkFqcGc@._V1_.jpg","title_type_id": "movie","end_year": null,"release_date": "1972-03-24","plot": "The aging patriarch of an organized crime dynasty transfers control of his clandestine empire to his reluctant son.","image_width": 1396,"image_height": 1982,"popularity_rank": 108,"popularity_change": {"direction": "DOWN","difference": 18}},"… 248 more"],"count": 250,"chart_type": "TOP_RATED_MOVIES","credits_used": 1,"cached": false} The fastest way to see the full response is the playground: it runs this endpoint with your account and shows the exact JSON.