# TV Shows Scraper - Details, Episodes & Cast (TVMaze) (`get_anything/tv-shows-scraper`) Actor

Search TV shows and get full details (rating, genres, network, status, premiere, runtime, summary, IMDb id), plus episodes and cast. Free TVMaze API, no API key. Export JSON, CSV or Excel for TV apps, tracking and research.

- **URL**: https://apify.com/get\_anything/tv-shows-scraper.md
- **Developed by:** [Get Anything](https://apify.com/get_anything) (community)
- **Categories:** Videos
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

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

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## 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.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## TV Shows Scraper — Details, Episodes & Cast (TVMaze)

Search **TV shows** and get full details (**rating, genres, network, status, premiere, runtime, summary, IMDb id**), plus **episodes** and **cast**, from the free **TVMaze API**. **No API key.**

### What it does

- **Search** shows by name, or look up by **TVMaze ID** or **IMDb ID**.
- **Details** — type, language, genres, status, runtime, premiere/end dates, rating, network, official site, IMDb/TVDB ids, image, summary.
- **Episodes** — full list with season/number, air date, runtime, rating, summary.
- **Cast** — actor + character, with country, birthday and photo.
- Export to **JSON, CSV, or Excel**, or pull via the Apify API.

### Input

| Field | Description |
|-------|-------------|
| `searchTerms` | Show names to search. |
| `showIds` | TVMaze numeric IDs. |
| `imdbIds` | IMDb IDs (`tt0903747`). |
| `maxShowsPerSearch` | Cap per search term. |
| `getEpisodes` | Also pull the episode list. |
| `getCast` | Also pull the cast. |

#### Example

```json
{ "searchTerms": ["Breaking Bad"], "getEpisodes": true, "getCast": true }
```

### Output

```json
{ "resultType": "show", "name": "Breaking Bad", "rating": 9.2,
  "genres": ["Drama","Crime","Thriller"], "network": "AMC", "imdb": "tt0903747" }
```

```json
{ "resultType": "episode", "show": "Breaking Bad", "season": 1, "number": 1,
  "name": "Pilot", "airdate": "2008-01-20", "rating": 8.9 }
```

### Use cases

- **TV apps & trackers** — catalog, episode guides, air dates.
- **Recommendation & analytics** — ratings and genres across shows.
- **Media research** — cast/crew and network data.
- **AI/RAG** — feed show and episode summaries to an LLM.

### FAQ

**Do I need an API key?** No — TVMaze's API is free.

**Can I match to IMDb?** Yes — look up by IMDb id, and each show record includes its `imdb` id.

*Data licensed by TVMaze under CC BY-SA; attribute TVMaze where required.*

### 🤖 Use with Claude or ChatGPT (MCP)

Run this actor from Claude, ChatGPT, Cursor or any MCP client via the [Apify MCP server](https://mcp.apify.com). In **Claude Desktop**: Settings → Connectors → Add custom connector → `https://mcp.apify.com`. Or expose just this tool:

```json
{ "mcpServers": { "apify": { "url": "https://mcp.apify.com?tools=get_anything/tv-shows-scraper" } } }
```

Full guide: [Connect Apify actors to Claude & ChatGPT](https://dev.to/get_anything/connect-any-apify-scraper-to-claude-or-chatgpt-in-2-minutes-mcp-37he).

### ⭐ Found this useful?

If this Actor saved you time, please leave a rating on its [Apify page](https://apify.com/get_anything/tv-shows-scraper) — reviews genuinely help others discover it and help me keep improving it.

# Actor input Schema

## `searchTerms` (type: `array`):

Show names to search, e.g. 'Breaking Bad', 'The Office'.

## `showIds` (type: `array`):

Specific shows by TVMaze numeric id, e.g. '169'.

## `imdbIds` (type: `array`):

Look up shows by IMDb id, e.g. 'tt0903747'.

## `maxShowsPerSearch` (type: `integer`):

Cap on shows returned per search term.

## `getEpisodes` (type: `boolean`):

Also pull the full episode list for each show.

## `getCast` (type: `boolean`):

Also pull the cast (actor + character) for each show.

## Actor input object example

```json
{
  "searchTerms": [
    "Breaking Bad"
  ],
  "showIds": [],
  "imdbIds": [],
  "maxShowsPerSearch": 10,
  "getEpisodes": false,
  "getCast": false
}
```

# Actor output Schema

## `results` (type: `string`):

Structured results in the default dataset - one item per show, episode or cast member.

# 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 = {
    "searchTerms": [
        "Breaking Bad"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("get_anything/tv-shows-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 = { "searchTerms": ["Breaking Bad"] }

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

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

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

```

## CLI example

```bash
echo '{
  "searchTerms": [
    "Breaking Bad"
  ]
}' |
apify call get_anything/tv-shows-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,get_anything/tv-shows-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/9H4rtbTf5EuSLftCh/builds/3NuiVCPyIxpJy0Wgb/openapi.json
