# TMDB Scraper — Movies, TV Shows & People (`ponderable_hydrometer/tmdb-scraper`) Actor

Movies, TV & people from TMDB — search, full details (cast, crew, budget, genres), trending & discover with filters. Bring your own free TMDB key. For media apps & datasets.

- **URL**: https://apify.com/ponderable\_hydrometer/tmdb-scraper.md
- **Developed by:** [Ponderable Hydrometer](https://apify.com/ponderable_hydrometer) (community)
- **Categories:** Developer tools, Automation, E-commerce
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## TMDB Scraper — Movies, TV Shows & People

**The richest clean media API in one actor — movies, TV and people from The Movie Database (TMDB):
search, full details (cast, crew, director, budget, revenue, genres, keywords, runtime, IMDb id),
trending, and full Discover queries with filters.** Multi-language, normalized schema, image URLs.
Bring your own free TMDB v3 key.

Perfect for media apps, recommendation engines, catalogs, movie/TV datasets and enrichment pipelines.

### What you get

- **search-movie / search-tv / search-person / multi-search** — search results with title, date,
  rating, popularity, genre ids, language and poster/backdrop URLs
- **trending** — trending movies/TV/people for a day or week window
- **discover-movie** — TMDB Discover with any filters (sort, rating, year, genre, min votes)
- **movie-detail / tv-detail** — full records: `tagline`, `runtime`, `status`, `genres`, `budget`,
  `revenue`, `productionCompanies`, `imdbId`, `homepage`, `director`, top-15 `cast`, `keywords`
  (TV adds `numberOfSeasons`, `numberOfEpisodes`, `networks`, `creators`, air dates)

### Bring your own key (free)

TMDB requires a free **v3 API key** — get one at
[themoviedb.org/settings/api](https://www.themoviedb.org/settings/api) and set it in the `apiKey`
input (stored as a secret). It is **required**: without a valid key the actor stops immediately with
a clear error instead of returning bad data.

### Input

| Field | Type | Default | Description |
|-------|------|---------|-------------|
| `mode` | enum | `search-movie` | `search-movie`, `search-tv`, `search-person`, `multi-search`, `trending`, `discover-movie`, `movie-detail`, `tv-detail` |
| `query` | string | — | Search term (search modes) |
| `ids` | array | — | TMDB ids (detail modes) |
| `mediaType` | enum | `all` | For trending: `all`/`movie`/`tv`/`person` |
| `timeWindow` | enum | `week` | For trending: `day`/`week` |
| `discoverFilters` | object | — | For discover-movie: raw TMDB Discover params |
| `includeCredits` | boolean | `true` | Detail modes: also fetch cast, crew & keywords |
| `language` | string | `en-US` | ISO language tag, e.g. `ro-RO`, `fr-FR` |
| `apiKey` | string (secret) | — | **Required** — your free TMDB v3 key |
| `maxResults` | integer | `100` | Cap for search/trending/discover |

#### Example input

```json
{"mode":"movie-detail","ids":["27205","157336"],"includeCredits":true,"apiKey":"<YOUR_TMDB_KEY>"}
````

Search movies:

```json
{"mode":"search-movie","query":"matrix","maxResults":50,"apiKey":"<YOUR_TMDB_KEY>"}
```

Discover top-rated 2023 films:

```json
{"mode":"discover-movie","discoverFilters":{"sort_by":"vote_average.desc","vote_count.gte":5000,"primary_release_year":2023},"apiKey":"<YOUR_TMDB_KEY>"}
```

### Output (movie-detail)

Fields below are the real normalizer output:

```json
{
  "mediaType": "movie",
  "id": 27205,
  "title": "Inception",
  "originalTitle": "Inception",
  "tagline": "Your mind is the scene of the crime.",
  "releaseDate": "2010-07-15",
  "runtime": 148,
  "status": "Released",
  "overview": "Cobb, a skilled thief who commits corporate espionage...",
  "genres": ["Action", "Science Fiction", "Adventure"],
  "voteAverage": 8.4,
  "voteCount": 35000,
  "popularity": 82.5,
  "budget": 160000000,
  "revenue": 825532764,
  "language": "en",
  "productionCompanies": ["Legendary Pictures", "Syncopy"],
  "productionCountries": ["United States of America"],
  "imdbId": "tt1375666",
  "homepage": "https://www.warnerbros.com/movies/inception",
  "director": "Christopher Nolan",
  "cast": [{ "name": "Leonardo DiCaprio", "character": "Dom Cobb" }],
  "keywords": ["dream", "heist", "subconscious"],
  "poster": "https://image.tmdb.org/t/p/w500/edv5CZvWj09upOsy2Y6IwDhK8bt.jpg",
  "url": "https://www.themoviedb.org/movie/27205"
}
```

Search modes return a lighter shape (`title`, `releaseDate`, `voteAverage`, `poster`, …). Poster and
backdrop paths are expanded to full image URLs.

### Why this actor

- **Breadth + depth** — movies, TV and people; search, detail, trending and full Discover filters.
- **BYO-key** — you stay on your own TMDB agreement (clean commercial path); the actor never ships a key.
- **Normalized schema** with ready-to-use image URLs and IMDb cross-ids.

### Pricing

Pay per result — **$2.00 per 1,000 results** (one result = one movie / show / person). No subscription
or platform fees.

### Related actors

- **TVMaze Scraper** — TV shows, full episode lists and cast (keyless).
- **JustWatch Scraper** — where to stream / rent / buy any title, per country.
- **Google Books Scraper** — books, ISBNs and prices.

### Notes

- BYO-key: supply your own free TMDB v3 key (kept secret). If the key is missing/invalid the actor
  exits with an error rather than returning empty results.
- This product uses the TMDB API but is **not endorsed or certified by TMDB**.

# Actor input Schema

## `mode` (type: `string`):

What to fetch.

## `query` (type: `string`):

Search term for search-movie / search-tv / search-person / multi-search.

## `ids` (type: `array`):

TMDB IDs for movie-detail / tv-detail, e.g. \["27205"].

## `mediaType` (type: `string`):

For trending: all, movie, tv or person.

## `timeWindow` (type: `string`):

For trending: day or week.

## `discoverFilters` (type: `object`):

For discover-movie: TMDB discover params, e.g. {"sort\_by":"vote\_average.desc","vote\_count.gte":5000,"primary\_release\_year":2023,"with\_genres":"28"}.

## `includeCredits` (type: `boolean`):

For detail modes: also fetch cast, crew and keywords.

## `language` (type: `string`):

ISO language tag, e.g. "en-US", "ro-RO", "fr-FR".

## `apiKey` (type: `string`):

Your free TMDB v3 API key (get one at themoviedb.org/settings/api). Required. Kept secret.

## `maxResults` (type: `integer`):

Cap on results for search/trending/discover modes.

## Actor input object example

```json
{
  "mode": "search-movie",
  "query": "inception",
  "mediaType": "all",
  "timeWindow": "week",
  "includeCredits": true,
  "language": "en-US",
  "maxResults": 100
}
```

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "query": "inception"
};

// Run the Actor and wait for it to finish
const run = await client.actor("ponderable_hydrometer/tmdb-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "query": "inception" }

# Run the Actor and wait for it to finish
run = client.actor("ponderable_hydrometer/tmdb-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "query": "inception"
}' |
apify call ponderable_hydrometer/tmdb-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=ponderable_hydrometer/tmdb-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "TMDB Scraper — Movies, TV Shows & People",
        "description": "Movies, TV & people from TMDB — search, full details (cast, crew, budget, genres), trending & discover with filters. Bring your own free TMDB key. For media apps & datasets.",
        "version": "0.1",
        "x-build-id": "vDvPiXHan9ErD7PcG"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/ponderable_hydrometer~tmdb-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-ponderable_hydrometer-tmdb-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/ponderable_hydrometer~tmdb-scraper/runs": {
            "post": {
                "operationId": "runs-sync-ponderable_hydrometer-tmdb-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/ponderable_hydrometer~tmdb-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-ponderable_hydrometer-tmdb-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "apiKey"
                ],
                "properties": {
                    "mode": {
                        "title": "Mode",
                        "enum": [
                            "search-movie",
                            "search-tv",
                            "search-person",
                            "multi-search",
                            "trending",
                            "discover-movie",
                            "movie-detail",
                            "tv-detail"
                        ],
                        "type": "string",
                        "description": "What to fetch.",
                        "default": "search-movie"
                    },
                    "query": {
                        "title": "Query (search modes)",
                        "type": "string",
                        "description": "Search term for search-movie / search-tv / search-person / multi-search."
                    },
                    "ids": {
                        "title": "IDs (detail modes)",
                        "type": "array",
                        "description": "TMDB IDs for movie-detail / tv-detail, e.g. [\"27205\"].",
                        "items": {
                            "type": "string"
                        }
                    },
                    "mediaType": {
                        "title": "Media type (trending)",
                        "enum": [
                            "all",
                            "movie",
                            "tv",
                            "person"
                        ],
                        "type": "string",
                        "description": "For trending: all, movie, tv or person.",
                        "default": "all"
                    },
                    "timeWindow": {
                        "title": "Time window (trending)",
                        "enum": [
                            "day",
                            "week"
                        ],
                        "type": "string",
                        "description": "For trending: day or week.",
                        "default": "week"
                    },
                    "discoverFilters": {
                        "title": "Discover filters",
                        "type": "object",
                        "description": "For discover-movie: TMDB discover params, e.g. {\"sort_by\":\"vote_average.desc\",\"vote_count.gte\":5000,\"primary_release_year\":2023,\"with_genres\":\"28\"}."
                    },
                    "includeCredits": {
                        "title": "Include credits (detail modes)",
                        "type": "boolean",
                        "description": "For detail modes: also fetch cast, crew and keywords.",
                        "default": true
                    },
                    "language": {
                        "title": "Language",
                        "type": "string",
                        "description": "ISO language tag, e.g. \"en-US\", \"ro-RO\", \"fr-FR\".",
                        "default": "en-US"
                    },
                    "apiKey": {
                        "title": "TMDB API key (v3)",
                        "type": "string",
                        "description": "Your free TMDB v3 API key (get one at themoviedb.org/settings/api). Required. Kept secret."
                    },
                    "maxResults": {
                        "title": "Max results",
                        "minimum": 1,
                        "type": "integer",
                        "description": "Cap on results for search/trending/discover modes.",
                        "default": 100
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
