# TV Shows Scraper (TVMaze) — Episodes & Cast (`hipersoft/tvmaze-scraper`) Actor

Search TV shows and scrape full data from TVMaze: name, genres, network, status, premiere/end dates, rating, IMDb id, summary — plus every episode (season, number, airdate, rating) and full cast. Fast clean HTTP, no key.

- **URL**: https://apify.com/hipersoft/tvmaze-scraper.md
- **Developed by:** [hiper soft](https://apify.com/hipersoft) (community)
- **Categories:** Videos, Other
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.0004 / item scraped

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/docs.md):

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

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python/docs.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/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

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

Search TV shows and pull clean, structured JSON from TVMaze: name, genres, network, status, premiere and end dates, rating, IMDb ID, summary — and optionally every episode and the full cast. It runs over the free public TVMaze API, so it's fast and needs **no account and no API key**. Ideal for building TV databases, powering guides and apps, or running media research.

### Features
- 📺 **Full show data** — `genres`, `network`, `status`, `premiered`/`ended`, `rating`, `runtime`, `imdbId` and cleaned `summary`.
- 🎬 **Episode guide** — enable `includeEpisodes` for every episode's `season`, `number`, `airdate`, `runtime` and `rating`.
- 🎭 **Cast lists** — enable `includeCast` to get actor and character pairs with country, birthday and photo.
- 🆔 **Target by ID** — pass exact TVMaze `showIds` alongside or instead of keyword searches.
- 🔗 **External IDs** — show records include `imdbId` and `tvdbId` for easy cross-referencing.
- 🎚️ **Volume control** — `maxShowsPerSearch` (1–50) caps matches kept per search term.
- 🧱 **Flat, normalized JSON** — typed `show`, `episode` and `cast` records with consistent fields.

### What you get
One flat JSON record per item. Example show:

```json
{
  "type": "show",
  "id": 169,
  "name": "Breaking Bad",
  "showType": "Scripted",
  "language": "English",
  "genres": ["Drama", "Crime", "Thriller"],
  "status": "Ended",
  "runtime": 60,
  "premiered": "2008-01-20",
  "ended": "2013-09-29",
  "rating": 9.2,
  "network": "AMC",
  "country": "United States",
  "scheduleDays": ["Sunday"],
  "scheduleTime": "22:00",
  "officialSite": "http://www.amc.com/shows/breaking-bad",
  "imdbId": "tt0903747",
  "tvdbId": 81189,
  "image": "https://static.tvmaze.com/uploads/images/original_untouched/0/2400.jpg",
  "summary": "A high school chemistry teacher turned methamphetamine producer.",
  "url": "https://www.tvmaze.com/shows/169/breaking-bad"
}
````

### Input

```json
{
  "searches": ["breaking bad", "the office"],
  "showIds": [],
  "includeEpisodes": true,
  "includeCast": true,
  "maxShowsPerSearch": 10
}
```

| Field | Description |
| --- | --- |
| `searches` | TV show titles or keywords, one per line. |
| `showIds` | Specific TVMaze show IDs (optional). |
| `includeEpisodes` | Also fetch every episode of each show. |
| `includeCast` | Also fetch each show's cast (actor and character). |
| `maxShowsPerSearch` | How many matches to keep per search term (1–50). |

### Use cases

- Build a TV database with genres, networks, ratings and IMDb IDs.
- Generate a full episode guide (seasons, airdates, ratings) for any show.
- Map cast and character relationships across shows.
- Cross-reference titles to IMDb/TheTVDB via `imdbId` and `tvdbId`.

### Pricing

Pay-per-event: you're billed a small amount per run and per item scraped — you only pay for what you get. See the **Pricing** tab for current rates.

### FAQ

**Do I need an account or API key?**
No. The Actor runs over the free public [TVMaze](https://www.tvmaze.com) API, so there's no account and no API key to set up.

**How many shows can I get per run?**
Set `maxShowsPerSearch` (1–50) to cap matches kept per search term. Pass multiple titles in `searches`, or target exact `showIds`, to scale a single run.

**Can I download episodes or video?**
No. This Actor returns public metadata only — show, episode and cast details. It does not download any video content.

**What's the output format?**
Flat, normalized JSON with typed `show`, `episode` and `cast` records and consistent fields. Export as JSON, CSV or Excel.

**Can I get episodes and cast, not just show details?**
Yes. Enable `includeEpisodes` for every episode's season, number, airdate, runtime and rating, and `includeCast` for actor and character pairs with photos.

### Related Actors

Building a media or entertainment dataset? Pair this with our other entertainment scrapers:

- [YouTube Scraper](https://apify.com/hipersoft/youtube-scraper) — video metadata, transcripts, comments and channel profiles.
- [Steam Games Scraper](https://apify.com/hipersoft/steam-games-scraper) — game prices, genres, platforms and Metacritic scores.
- [Apple Podcasts Scraper](https://apify.com/hipersoft/apple-podcasts-scraper) — podcast shows and episodes with RSS feeds and artwork.
- [Spotify Scraper](https://apify.com/hipersoft/spotify-scraper) — tracks, artists, albums and playlists with no login or API key.

### Notes

This Actor uses the public TVMaze API and returns public metadata only — no video content. Not affiliated with, endorsed by, or connected to TVMaze; all trademarks belong to their respective owners.

# Actor input Schema

## `searches` (type: `array`):

TV show titles or keywords (e.g. "breaking bad", "the office"), one per line.

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

Specific TVMaze show IDs (e.g. 169). One per line.

## `includeEpisodes` (type: `boolean`):

Also fetch every episode of each show (season, number, airdate, rating, summary).

## `includeCast` (type: `boolean`):

Also fetch each show's cast (actor and character).

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

How many matches to keep per search term.

## `proxyConfiguration` (type: `object`):

Optional. The TVMaze API works without a proxy.

## Actor input object example

```json
{
  "searches": [
    "breaking bad"
  ],
  "showIds": [],
  "includeEpisodes": false,
  "includeCast": false,
  "maxShowsPerSearch": 10,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# 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 = {
    "searches": [
        "breaking bad"
    ],
    "showIds": []
};

// Run the Actor and wait for it to finish
const run = await client.actor("hipersoft/tvmaze-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 = {
    "searches": ["breaking bad"],
    "showIds": [],
}

# Run the Actor and wait for it to finish
run = client.actor("hipersoft/tvmaze-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 '{
  "searches": [
    "breaking bad"
  ],
  "showIds": []
}' |
apify call hipersoft/tvmaze-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "TV Shows Scraper (TVMaze) — Episodes & Cast",
        "description": "Search TV shows and scrape full data from TVMaze: name, genres, network, status, premiere/end dates, rating, IMDb id, summary — plus every episode (season, number, airdate, rating) and full cast. Fast clean HTTP, no key.",
        "version": "1.0",
        "x-build-id": "c9kGdBo5ndHa34uAK"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/hipersoft~tvmaze-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-hipersoft-tvmaze-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/hipersoft~tvmaze-scraper/runs": {
            "post": {
                "operationId": "runs-sync-hipersoft-tvmaze-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/hipersoft~tvmaze-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-hipersoft-tvmaze-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",
                "properties": {
                    "searches": {
                        "title": "Show searches",
                        "type": "array",
                        "description": "TV show titles or keywords (e.g. \"breaking bad\", \"the office\"), one per line.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "showIds": {
                        "title": "Show IDs (optional)",
                        "type": "array",
                        "description": "Specific TVMaze show IDs (e.g. 169). One per line.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "includeEpisodes": {
                        "title": "Include episodes",
                        "type": "boolean",
                        "description": "Also fetch every episode of each show (season, number, airdate, rating, summary).",
                        "default": false
                    },
                    "includeCast": {
                        "title": "Include cast",
                        "type": "boolean",
                        "description": "Also fetch each show's cast (actor and character).",
                        "default": false
                    },
                    "maxShowsPerSearch": {
                        "title": "Max shows per search",
                        "minimum": 1,
                        "maximum": 50,
                        "type": "integer",
                        "description": "How many matches to keep per search term.",
                        "default": 10
                    },
                    "proxyConfiguration": {
                        "title": "Proxy (optional)",
                        "type": "object",
                        "description": "Optional. The TVMaze API works without a proxy.",
                        "default": {
                            "useApifyProxy": false
                        }
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
