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

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

## Pricing

from $0.0005 / 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.
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

## 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. Ideal for building TV databases, powering guides and apps, or running media research.

![TV Shows Scraper (TVMaze) input — searches, showIds and include toggles in the Apify Console](https://api.apify.com/v2/key-value-stores/SUfvnaFLd9z9eBCtV/records/tvmaze-scraper-input.png?v=2)

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

![TV Shows Scraper (TVMaze) output example — show, episode and cast rows as structured JSON](https://api.apify.com/v2/key-value-stores/SUfvnaFLd9z9eBCtV/records/tvmaze-scraper-output.png?v=5)

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"
}
```

#### Output schema

| Field | Type | Description |
| --- | --- | --- |
| `type` | string | Record type — `show`, `episode` or `cast`. |
| `id` | integer | TVMaze numeric ID for the show. |
| `name` | string | Show title. |
| `showType` | string | Format of the show, e.g. `Scripted`. |
| `language` | string | Primary language the show is produced in. |
| `genres` | array | List of genre labels for the show. |
| `status` | string | Airing status, e.g. `Running` or `Ended`. |
| `runtime` | integer | Typical episode length in minutes. |
| `premiered` | string | First air date (`YYYY-MM-DD`). |
| `ended` | string | Last air date, or empty if still running. |
| `rating` | number | Average viewer rating out of 10. |
| `network` | string | Name of the broadcasting network. |
| `country` | string | Country the network is based in. |
| `scheduleDays` | array | Days of the week the show airs. |
| `scheduleTime` | string | Local air time (`HH:MM`). |
| `officialSite` | string (URL) | Link to the show's official website. |
| `imdbId` | string | IMDb identifier for cross-referencing. |
| `tvdbId` | integer | TheTVDB numeric identifier. |
| `image` | string (URL) | Link to the show's poster image. |
| `summary` | string | Plain-text synopsis of the show. |
| `url` | string (URL) | TVMaze page URL for the show. |

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

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

**Can I connect this to other apps and services?**
The TV Shows Scraper can be connected with almost any cloud service or web app thanks to [integrations on the Apify platform](https://apify.com/integrations). It works with [Make](https://apify.com/integrations/make), [Zapier](https://apify.com/integrations/zapier), [Slack](https://docs.apify.com/platform/integrations/slack), [Airbyte](https://docs.apify.com/platform/integrations/airbyte), [GitHub](https://docs.apify.com/platform/integrations/github), [Google Drive](https://docs.apify.com/platform/integrations/drive) and [many more](https://apify.com/integrations), plus the [Apify API](https://docs.apify.com/api/v2), JavaScript/Python clients and MCP. Or use [webhooks](https://docs.apify.com/platform/integrations/webhooks) to trigger an action whenever a run finishes.

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

### 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(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 '{
  "searches": [
    "breaking bad"
  ],
  "showIds": []
}' |
apify call hipersoft/tvmaze-scraper --silent --output-dataset

```

## MCP server setup

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