# 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 web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — 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

Download the OpenAPI definition: https://api.apify.com/v2/actors/LT7XyIpdpAuqn2j06/builds/c9kGdBo5ndHa34uAK/openapi.json
