TMDb API

⭐ Beginner's Pick Video / API Key Intermediate HTTPS
Varies by plan (check documentation)

Overview

The Movie Database (TMDb) API is a powerful community-driven source of movie and TV show data, including trailers, posters, cast information, and ratings. It is widely used in real-world applications and supports over 40 languages. You need a free API key from themoviedb.org to get started.

💡

Beginner Tip

Use the /search/movie endpoint with a query parameter to find movies by title -- it is the easiest way to start exploring the API. Your API key can be appended as api_key=YOUR_API_KEY in the query string.

Available Data

movie title and year
director and cast
plot summary
IMDb rating
poster image URL
genre and runtime

Example Response

JSON Response
{
  "Title": "Inception",
  "Year": "2010",
  "Rated": "PG-13",
  "Runtime": "148 min",
  "Genre": "Action, Adventure, Sci-Fi",
  "Director": "Christopher Nolan",
  "Actors": "Leonardo DiCaprio, Joseph Gordon-Levitt",
  "Plot": "A thief who steals corporate secrets through dream-sharing technology...",
  "imdbRating": "8.8",
  "Poster": "https://example.com/inception.jpg"
}

Field Reference

id TMDb unique identifier for the movie or TV show.
title Official title of the movie.
overview Short plot summary of the movie.
release_date Release date in YYYY-MM-DD format.
vote_average Average user rating on a scale of 0 to 10.
poster_path Relative path to the movie poster image; prepend the TMDb image base URL.

Implementation Example

// ⚠️ Note: This URL may be a documentation page. Check official docs for actual API endpoint.
const url = "https://www.themoviedb.org/documentation/api";
// Replace headers or query params with the values required by this API.
const response = await fetch(url, {
  headers: {
  "X-API-Key": "YOUR_API_KEY"
  }
});
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = await response.json();
console.log(data);

What Can You Build?

Note: These code examples are AI-generated and unverified. Always refer to the official API documentation for accurate usage.

Common Errors & Troubleshooting

401 Invalid API key The api_key query parameter is missing or the key has not been approved yet.
Register at themoviedb.org, generate an API key, and wait for email approval (usually instant).
404 Not Found Requesting a movie or TV show by an ID that does not exist.
Use /search/movie or /search/tv to find the correct TMDb ID before fetching details.
Image not loading Using the poster_path value directly as a URL without prepending the base image URL.
Prepend https://image.tmdb.org/t/p/w500 to the poster_path value to construct the full image URL.

Matrix Score Breakdown

🌐 Reachability 30/30
⚡ Speed 20/20
🔒 Security 15/15
🛠 Developer XP 12/20
✓ Reliability 10/15

Partially tested on Apr 5, 2026

Technical Specifications

Auth API Key
HTTPS REQUIRED
CORS UNKNOWN
Category Video
Difficulty Intermediate
Verified: 2026-04-07

Similar APIs

View All →