# 📺 TVMaze Intelligence - Shows, Episodes & Cast Data (`benthepythondev/tvmaze-intelligence`) Actor

Extract comprehensive TV show data from TVMaze's database of 60,000+ shows. Search by title, get episode lists, cast info, airing schedules for broadcast TV and streaming platforms. Access ratings, genres, networks, IMDb IDs, and show summaries.

- **URL**: https://apify.com/benthepythondev/tvmaze-intelligence.md
- **Developed by:** [Ben](https://apify.com/benthepythondev) (community)
- **Categories:** Developer tools, Other, News
- **Stats:** 4 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 results

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

## TVMaze TV Shows Intelligence

**Extract comprehensive TV show data from TVMaze - episodes, cast, schedules, ratings and more**

### What you get

- **Clean, validated JSON** ready for your pipeline
- **Pre-built dataset Overview** in the Apify Console for instant inspection
- **Reliable & maintained** — patched whenever the source changes

### Why this actor (vs. alternatives)

| | Build your own | Generic scraper | **This actor** |
|---|---|---|---|
| Maintenance | You patch every change | Often broken | Patched continuously |
| Structured output | Manual parsing | Inconsistent | Validated schema |
| Setup time | Days | Hours | Minutes |
| Pay only for results | N/A | Varies | Yes (pay-per-use) |

### Input

| Field | Type | Description |
|---|---|---|
| `mode` **(required)** | `string` | How to search for TV shows Options: `search`, `show_details`, `schedule`, `streaming`, `people` |
| `query` | `string` | Search query for shows or people |
| `showId` | `integer` | TVMaze show ID for getting detailed information |
| `country` | `string` | Country code for schedule (e.g., US, GB, CA) |
| `date` | `string` | Date for schedule in YYYY-MM-DD format (defaults to today) |
| `includeEpisodes` | `boolean` | Include episode list when getting show details |
| `includeCast` | `boolean` | Include cast list when getting show details |
| `maxResults` | `integer` | Maximum number of results to return |

### Example Input

```json
{
  "mode": "search",
  "country": "US",
  "includeEpisodes": false,
  "includeCast": false,
  "maxResults": 100
}
```

### Use cases

- **Content / catalog apps** — populate listings with rich metadata
- **AI assistants** — ground LLM responses in real reference data
- **Education platforms** — teach with structured real-world data
- **Research** — analyze trends across the dataset
- **Recommendation engines** — power suggestions with metadata

### Pricing

**Pay-Per-Event:**

- $0.001 per result
- $0.00005 actor-start fee

#### Example runs

| Use case | Results | Cost |
|---|---|---|
| Quick scan | 100 | **$0.10** |
| Standard run | 500 | **$0.50** |
| Bulk dataset | 2,000 | **$2.00** |

### FAQ

**Q: How fresh is the data?**\
A: Real-time — every run fetches live from the source.

**Q: Do I pay for failed or empty runs?**\
A: You pay per result returned, plus a tiny actor-start fee.

**Q: Can I schedule recurring runs?**\
A: Yes — use the Apify Console scheduler for daily/weekly automation.

**Q: Can I export the data?**\
A: Yes — JSON, CSV, Excel, and API access are all supported by Apify.

### Related actors

- **[book-intelligence](https://apify.com/benthepythondev/book-intelligence)** — 20M+ books
- **[openlibrary-book-intelligence](https://apify.com/benthepythondev/openlibrary-book-intelligence)** — Open Library books
- **[recipe-intelligence](https://apify.com/benthepythondev/recipe-intelligence)** — recipe database
- **[cocktail-intelligence](https://apify.com/benthepythondev/cocktail-intelligence)** — cocktail recipes

### Legal & compliance

This actor retrieves publicly accessible data only. You are responsible for respecting the source's Terms of Service, honoring robots.txt, and complying with GDPR / applicable regulations for any personal data.

### Support & feature requests

Open an issue on the Actor page or contact via Apify Console messaging. Custom features welcome.

# Actor input Schema

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

How to search for TV shows

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

Search query for shows or people

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

TVMaze show ID for getting detailed information

## `country` (type: `string`):

Country code for schedule (e.g., US, GB, CA)

## `date` (type: `string`):

Date for schedule in YYYY-MM-DD format (defaults to today)

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

Include episode list when getting show details

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

Include cast list when getting show details

## `maxResults` (type: `integer`):

Maximum number of results to return

## Actor input object example

```json
{
  "mode": "search",
  "country": "US",
  "includeEpisodes": false,
  "includeCast": false,
  "maxResults": 100
}
```

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("benthepythondev/tvmaze-intelligence").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 = {}

# Run the Actor and wait for it to finish
run = client.actor("benthepythondev/tvmaze-intelligence").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 '{}' |
apify call benthepythondev/tvmaze-intelligence --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/acts/VLwNixqVDknOAnVdk/builds/NlAL1fM5pOrYDfdQz/openapi.json
