# TV Show Scraper (`dami_studio/tvmaze-scraper`) Actor

TV show scraper for TVMaze: shows, people or a show's full episode list, unaired episodes included. Show rows hold the rating, genres, network, country, status, premiere date, IMDb id, plain-text summary and poster, plus the main cast on request. $2.00 per 1,000 rows.

- **URL**: https://apify.com/dami_studio/tvmaze-scraper.md
- **Developed by:** [Dami's Studio](https://apify.com/dami_studio) (community)
- **Categories:** Integrations, AI, Other
- **Features:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.94 / 1,000 items

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

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

**Type a TV show name and get rows back from TVMaze**: the rating, genres, network, country, status,
premiere date, IMDb id, plain-text summary and poster. Switch modes and the same actor searches
TVMaze's people directory by name, or lists every episode of one show, unaired ones included.

Show search is fuzzy, and that cuts both ways. A vague query comes back with loosely related shows,
and those rows are charged like any other, so keep `maxItems` small while you work out the wording.

| | |
|---|---|
| **Input** | A show name, a person's name, or a TVMaze show id |
| **Output** | One row per show, person or episode. Shows: rating, genres, network, status, dates, IMDb id, summary, poster, and the main cast if you ask |
| **Ceiling** | 2,000 rows per run |
| **Account needed** | None, and no API key |
| **Price** | $2.00 per 1,000 rows on the Free plan, a little less on paid plans. The free plan's $5 a month covers about 2,500 |

### 🔍 What TV Show Scraper does

One run does one of three jobs, picked with `mode`.

**Shows** searches TVMaze by title. Each row carries the rating, genre list, status, runtime, first
and last air dates, country, IMDb id and the poster URL. `network` holds the broadcaster, and for a
streaming-only show it holds the streaming service instead, so you never have to read two fields.
Turn on `includeCast` and each show row also lists its main cast: actor, character and TVMaze person
id.

**People** searches the people directory by name and returns id, country, birthday, gender and
photo. It is a name lookup, not a cast list. Asking it "who was in Breaking Bad" gets you people
called Breaking Bad, which is nobody. For a show's cast, use shows mode with `includeCast`.

**Episodes** takes one numeric TVMaze show id and returns the whole run: season, episode number,
title, air date, runtime, rating and summary. Episodes with a future air date are included, which is
what makes it useful for a release calendar.

Summaries arrive with the HTML tags already stripped out.

### 📋 What data you get from each TV show

| What you get | Field |
|---|---|
| TVMaze's id, the name and the TVMaze page | `id`, `name`, `url` |
| Type, language and genres | `type`, `language`, `genres` |
| Whether it is still running, and its episode length | `status`, `runtime` |
| First and last air dates | `premiered`, `ended` |
| TVMaze's average rating | `rating` |
| The broadcaster or streaming service, and the country | `network`, `country` |
| The IMDb id and the official site | `imdb`, `officialSite` |
| The summary as plain text, and the poster | `summary`, `image` |
| The main cast, with `includeCast` on | `cast` |

### ▶️ How to scrape TVMaze

1. Open [TV Show Scraper](https://apify.com/dami_studio/tvmaze-scraper) and click **Try for free**.
2. Pick a **Mode**.
3. Type the show or person into **Search query**, or put the numeric id into **Show id** for
   episodes mode.
4. Set **Max items**. Ten is plenty while you check the output shape.
5. Click **Start**, then download the dataset as JSON, CSV, Excel or XML.

### 💰 How much does it cost to scrape TVMaze?

**$2.00 per 1,000 rows** on the Free plan. Paid plans pay a little less: $1.98 on Starter, $1.96 on Scale and $1.94 on Business. On the free plan, the $5 Apify
gives you each month covers about 2,500 rows. Shows, people and episodes all cost the same, and a
show row with its cast costs the same as one without.

Duplicate rows, rows past your `maxItems` cap and every diagnostic row are not charged. A search that
finds nothing returns one uncharged row. Set a maximum cost on the run and it stops when it gets
there.

### 📥 What you give it

```json
{
  "mode": "shows",
  "query": "breaking bad",
  "maxItems": 10
}
```

| Field | Default | What it is |
|---|---|---|
| `mode` | `shows` | `shows`, `people` or `episodes`. |
| `query` | none, the form starts with `breaking bad` | The show or person name. Ignored in episodes mode. An API call has to send its own. |
| `showId` | none | TVMaze's numeric show id, required for episodes mode and ignored otherwise. Run `shows` first and take it from `id`. |
| `includeCast` | `false` | Shows mode only. Adds the show's main cast to every show row, at the same price per row. A people or episodes run with it on gets one `BAD_INPUT` row and nothing is charged. |
| `maxItems` | `50` | 1 to 2,000. Rows are deduplicated on id before this cap is applied. |
| `notionConnector` | none | Optional. Writes every delivered row into your Notion. |
| `notionParentId` | none | Optional. The Notion data source to write into. Leave it empty and the pages are created privately in your workspace. |
| `proxyConfiguration` | off | Optional network setting. Off is right for a normal run. |

`showId` is TVMaze's own id, not IMDb's. Breaking Bad is `169` on TVMaze and `tt0903747` on IMDb,
and putting one where the other belongs gets you a `NOT_FOUND` row.

### 📤 What you get back

A real row from a run on 3 October 2026, with the summary cut short:

```json
{
  "ok": true,
  "id": 169,
  "name": "Breaking Bad",
  "type": "Scripted",
  "language": "English",
  "genres": ["Drama", "Crime", "Thriller"],
  "status": "Ended",
  "runtime": 60,
  "premiered": "2008-01-20",
  "ended": "2019-10-11",
  "rating": 9.2,
  "network": "AMC",
  "country": "United States",
  "imdb": "tt0903747",
  "officialSite": "http://www.amc.com/shows/breaking-bad",
  "summary": "Breaking Bad follows protagonist Walter White, a chemistry teacher who lives in New Mexico with his wife and teenage son...",
  "image": "https://static.tvmaze.com/uploads/images/original_untouched/501/1253519.jpg",
  "url": "https://www.tvmaze.com/shows/169/breaking-bad"
}
```

| Field | How to read it |
|---|---|
| `rating` | TVMaze's average, or `null` when too few people have voted. Common on obscure shows and on single episodes. |
| `ended` | `null` while a show is still running. That is how you tell. |
| `network` | The broadcaster, or the streaming service for a show that only has one. |
| `imdb` | Your join key onto anything else you already hold. |
| `summary` | Plain text. Empty summaries come back as `""`, missing ones as `null`. |
| `cast` | Only with `includeCast`. A list of `{personId, name, character}`, one per main cast member. `[]` when TVMaze lists no cast for the show, `null` if the cast could not be read. |

People rows carry `id`, `name`, `country`, `birthday`, `gender`, `image` and `url`. Episode rows
carry `showId`, `episodeId`, `name`, `season`, `number`, `airdate`, `runtime`, `rating`, `summary`
and `url`.

### 🧾 Reading the output

Every real row has `ok: true`. A row that could not be filled has `ok: false` plus an `errorCode`,
and those are never charged.

| Row | How to spot it | Billed |
|---|---|---|
| A show, person or episode | `ok: true` | yes |
| A diagnostic | `ok: false` and an `errorCode` | no |

| Code | What it means |
|---|---|
| `BAD_INPUT` | The mode needs something you did not send: a `query` for shows or people, a positive whole-number `showId` for episodes. Also written when `includeCast` is on outside shows mode. |
| `NOT_FOUND` | That `showId` is not a TVMaze show. Answered straight away, with no retrying. |
| `NO_RESULTS` | The search ran and TVMaze had nothing matching. |
| `TIME_LIMIT` | The run got close to its time limit and stopped on its own. The rows delivered before that are complete and charged. Give the run more time, or ask for fewer rows, to get the rest. |

Anything else that goes wrong lands as one diagnostic row carrying its own code, and the run still
finishes rather than failing. That includes the time limit: if it stopped the run before any row
came back, the `TIME_LIMIT` row and an amber status message say so.

One thing to know about the Console's **Overview** table: it shows a narrow set of columns and drops
season and episode number, so an episode list reads as titles with no numbers, and diagnostic rows
render blank. Everything is present in the JSON, CSV and Excel exports. Switch the table to all
fields, or download the dataset.

### 💡 What people use it for

- Backfilling a media library that only has titles. Run each one through `shows` mode and you come
  out with genres, network, premiere date, poster and an IMDb id to join on.
- Building a release calendar. `episodes` mode returns the whole run, so filtering `airdate` to
  future dates gives you what is still to come.
- Checking whether a show is over. `status` and a `null` `ended` answer it in one row.
- Tagging a back catalogue by genre and country.

From a show name to its release calendar, in three steps:

1. Run `shows` mode with the title in `query` and read the number in `id`.
2. Run `episodes` mode with that number in `showId`.
3. Keep the rows whose `airdate` is after today.

### 🚧 What it does not do

- **The cast is the main cast only**, as TVMaze lists it: no guest stars, no crew, nothing per
  episode. People mode is a name search and cannot answer "who was in this show".
- **One `showId` per run** in episodes mode. Several shows means several runs.
- **Search reads one page of TVMaze matches**, so raising `maxItems` past that page does nothing in
  shows and people modes. The cap earns its keep in episodes mode.
- **`rating` is often `null`** where the vote count is too low to publish an average.
- **No box office, no streaming availability, no ticket links.** TVMaze is a schedule and metadata
  source, and this returns what it holds.
- **Rows are a snapshot.** Ratings move and a running show gains episodes. Re-run for fresh numbers.
- It is not an official TVMaze tool. Dami's Studio is independent and is not affiliated with or endorsed by TVMaze, or by any other company named on this page.

### 🧭 Which film, TV, music or game scraper do you need?

| If you want | Use |
|---|---|
| IMDb IDs for films, shows and people | [IMDb Search Scraper](https://apify.com/dami_studio/imdb-scraper) |
| Critic and audience scores for a film or show | [Rotten Tomatoes Scraper](https://apify.com/dami_studio/rotten-tomatoes-scraper) |
| TV shows, full episode lists and main cast | This one |
| Artists, releases, recordings and labels, with their MBIDs | [MusicBrainz Scraper](https://apify.com/dami_studio/musicbrainz-scraper) |
| Steam games, store details and player reviews | [Steam Scraper](https://apify.com/dami_studio/steam-scraper) |
| Goodreads ratings and rating counts for books | [Goodreads Books Scraper](https://apify.com/dami_studio/goodreads-books-scraper) |
| Wikidata Q-ids and claims for the same people and works | [Wikidata Scraper](https://apify.com/dami_studio/wikidata-scraper) |

### ❓ Questions people ask

#### Do I need a TVMaze account or key?

No. Nothing to apply for.

#### How do I find a show id?

Run `shows` mode with the title and read `id` off the row. That number goes straight into `showId`.

#### Why did my episode list come back with no episode numbers?

The Console's Overview table hides those columns. The numbers are in the data. Download it or switch
the table to all fields.

#### Can I get a show's cast?

Yes. Run shows mode with `includeCast` on and each show row lists its main cast.

#### Why did I get shows I did not ask for?

Fuzzy search. A short or vague query pulls in loose matches, and you pay for the rows. Add more of the
title.

#### Can I call it from code or connect it to an AI assistant?

The [API tab](https://apify.com/dami_studio/tvmaze-scraper/api/python) has code for Python, JavaScript and the CLI.
MCP clients like Claude and ChatGPT use `https://mcp.apify.com/?tools=fetch-actor-details,dami_studio/tvmaze-scraper`;
coding assistants can load [our skill
file](https://api.apify.com/v2/key-value-stores/BTBHU3DdiuoF4JOsK/records/apify-finance-sports-entertainment-SKILL.md).
All three bill your Apify account at the same price.

#### Is scraping TVMaze legal?

People rows carry names and birthdays, which data-protection law covers, so have a reason for collecting them.
Apify's write-up on
[the legality of web scraping](https://blog.apify.com/is-web-scraping-legal/) is a good starting
point, and we are not lawyers.

### 🆘 If something breaks

Open the **Issues** tab on the actor page. Send the input you used and the run ID. The `errorCode` on
the diagnostic row usually names the problem by itself.

# Actor input Schema

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

What to fetch: "shows" searches TV shows by name (needs a query), "people" searches actors/crew by name (needs a query), "episodes" lists all episodes of one show (needs a showId).

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

Search text. For mode "shows" this is a show name (e.g. "breaking bad"); for mode "people" it is a person name (e.g. "bryan cranston"). Ignored in "episodes" mode.

## `showId` (type: `integer`):

TVMaze numeric show id to list episodes for (e.g. 169 = Breaking Bad). Required for mode "episodes"; ignored otherwise. Find ids by running mode "shows" first.

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

Adds a "cast" list to every show row: each actor's name, their TVMaze person id and the character they play, as TVMaze lists the show's main cast. Same price per row. Shows mode only: a people or episodes run with this on stops with a BAD_INPUT row and nothing charged.

## `maxItems` (type: `integer`):

Maximum number of result rows to return (shows, people, or episodes). Deduplicated by id before this limit is applied.

## `notionConnector` (type: `string`):

Optional. Write each item as a page into your Notion when the run finishes. Authorize a Notion connector once in Settings → API & Integrations → MCP connectors, then pick it here. Leave empty to skip (default), results are always saved to the dataset regardless.

## `notionParentId` (type: `string`):

Optional. The Notion data source ID of the database to write into (only used if a Notion connector is set). Leave empty to create the pages privately in your workspace instead.

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

Optional, and not needed for a normal run.

## Actor input object example

```json
{
  "mode": "shows",
  "query": "breaking bad",
  "includeCast": false,
  "maxItems": 50,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

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

Scraped rows are stored in the default dataset (one row per result). Empty or failed runs return a single uncharged diagnostic row instead.

# 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": "breaking bad"
};

// Run the Actor and wait for it to finish
const run = await client.actor("dami_studio/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 = { "query": "breaking bad" }

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

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,dami_studio/tvmaze-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/t7lBcE0v8K3B4c9WD/builds/htTjIw4nkkedUZbvO/openapi.json
