# TVmaze Scraper (`anyxsolutions/tvmaze-scraper`) Actor

Scrape TV shows from TVmaze by search, IMDb ID, link or daily TV and streaming schedule: genres, status, network, air times, ratings, premiere dates, cast, seasons, episodes and next episode, with IMDb and TheTVDB IDs. Clean JSON, no login.

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

## Pricing

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

![banner](https://anyx.solutions/banners/tvmaze-scraper.png)

## TVmaze Scraper

**TV shows from TVmaze, with genres, networks, air times, ratings, cast, seasons, episodes and daily TV and streaming schedules, as clean JSON.**

[TVmaze](https://www.tvmaze.com/) is a community-maintained TV guide covering tens of thousands of
shows from broadcast networks and streaming services worldwide. Scrape TV shows from TVmaze by
search, IMDb ID, link or daily TV and streaming schedule. Get each show's type, language, genres,
status, runtime, premiere and end dates, official site, weekly air time, network or streaming
service, rating, IMDb and TheTVDB IDs, poster and summary, plus its number of seasons, next and
previous episode, cast (actor and character) and crew, and on request its full episode list. Paste
any tvmaze.com search, show, episode, person or schedule page, type search terms, list IMDb IDs, or
pick a date to get every episode airing that day on TV in a country and on streaming services. A
person's page returns every show they appeared in, with the character they played. There is no
login and no proxy to configure. Built for watchlists and release calendars, entertainment apps
and EPGs, catalogue enrichment, media research, and feeding TV metadata into search, RAG and
recommendation pipelines.

### ⚡ Quick start

```json
{
  "startUrls": [
    {
      "url": "https://www.tvmaze.com/search?q=star+trek"
    }
  ],
  "maxItems": 5
}
```

Or look up shows by IMDb ID with their episodes, and get tomorrow's UK TV and streaming schedule:

```json
{
  "imdbIds": ["tt0096697", "tt0386676"],
  "includeEpisodes": true,
  "scheduleDate": "+1 day",
  "scheduleCountry": "GB",
  "maxItems": 100
}
```

### 🧩 Input

| Field                | Type    | Required | Default                      | Description                                                                                                                                                                                                                                                                       |
| -------------------- | ------- | -------- | ---------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `startUrls`          | array   | no       | —                            | tvmaze.com pages: a search (`tvmaze.com/search?q=…`), a show (`/shows/83/the-simpsons`), an episode (`/episodes/47640/…`), a person (`/people/19396/…`) for every show they appeared in, a schedule (`/schedule?country=GB&date=2026-10-12`) or `/shows` for the whole catalogue. |
| `searchTerms`        | array   | no       | —                            | Show names or keywords, one search per line. Each search returns TVmaze's ten best matches.                                                                                                                                                                                       |
| `imdbIds`            | array   | no       | —                            | IMDb title IDs (`tt0096697`) or imdb.com title links of TV series. Each returns the matching show.                                                                                                                                                                                |
| `scheduleDate`       | string  | no       | —                            | Day of the schedule: a date (`2026-10-12`), `today`, `tomorrow`, or a relative value such as `+1 day`. Set it to get every episode airing that day.                                                                                                                               |
| `scheduleCountry`    | string  | no       | `"US"`                       | Two-letter code of the schedule's country (`US`, `GB`, `CA`, `AU`, `DE`, …).                                                                                                                                                                                                      |
| `scheduleType`       | string  | no       | `"all"`                      | Which releases the schedule covers: `all` (TV and streaming), `tv` or `streaming`. Also applies to schedule URLs.                                                                                                                                                                 |
| `includeCast`        | boolean | no       | `true`                       | Add each show's cast (actor and character) and crew.                                                                                                                                                                                                                              |
| `includeEpisodes`    | boolean | no       | `false`                      | Add each show's full episode list.                                                                                                                                                                                                                                                |
| `maxItems`           | integer | no       | —                            | Maximum number of shows (or schedule episodes) per start URL, search term, IMDb ID or schedule. The input form starts at 5; leave it empty to get every match.                                                                                                                    |
| `proxyConfiguration` | object  | no       | `{ "useApifyProxy": false }` | Proxy settings. TVmaze needs no proxy.                                                                                                                                                                                                                                            |

Add at least one start URL, search term, IMDb ID or schedule date.

**Schedules.** A schedule returns one row per episode airing that day. TV releases are those of
the country's channels, with air times in the country's local time. Streaming releases are those
of the country's own services plus worldwide ones such as Netflix, Disney+ and Prime Video.
`airstamp` gives every release in UTC. The schedule page on tvmaze.com works too: pick a country
and date there and paste the address bar into `startUrls`.

### 📤 Output

Each show is one dataset row, linked to its tvmaze.com page. Schedules and episode links return
episode rows instead, each with its show and network. `itemType` tells them apart: `show` or
`episode`. A field TVmaze has no value for is `null`, and a list it has nothing for is empty. Lists
you did not ask for (`cast` and `crew` with `includeCast` off, `episodes` with `includeEpisodes`
off) are `null`.

#### Fields

| Field             | Type   | Description                                                                                                                                                                          |
| ----------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `itemType`        | string | `show` or `episode`.                                                                                                                                                                 |
| `id`              | number | TVmaze ID of the show or episode.                                                                                                                                                    |
| `url`             | string | The show's or episode's page on tvmaze.com.                                                                                                                                          |
| `name`            | string | Show name or episode title.                                                                                                                                                          |
| `type`            | string | Show type (`Scripted`, `Animation`, `Reality`, `Documentary`, `Talk Show`, …) or episode type (`regular`, `significant_special`, …).                                                 |
| `language`        | string | Show language.                                                                                                                                                                       |
| `genres`          | array  | Show genres.                                                                                                                                                                         |
| `status`          | string | `Running`, `Ended`, `To Be Determined` or `In Development`.                                                                                                                          |
| `runtime`         | number | Runtime in minutes.                                                                                                                                                                  |
| `averageRuntime`  | number | Average episode runtime in minutes.                                                                                                                                                  |
| `premiered`       | string | First air date (`YYYY-MM-DD`).                                                                                                                                                       |
| `ended`           | string | Last air date, for ended shows.                                                                                                                                                      |
| `officialSite`    | string | The show's official website.                                                                                                                                                         |
| `schedule`        | object | Weekly air slot in the network's local time: `time` and `days`.                                                                                                                      |
| `rating`          | number | Average TVmaze user rating out of 10.                                                                                                                                                |
| `weight`          | number | TVmaze popularity score from 0 to 100.                                                                                                                                               |
| `network`         | object | TV network: `id`, `name`, `country` (two-letter code), `countryName` and `officialSite`. `null` for streaming-only shows.                                                            |
| `webChannel`      | object | Streaming service, with the same fields as `network`. `country` is `null` for worldwide services.                                                                                    |
| `imdbId`          | string | IMDb ID.                                                                                                                                                                             |
| `thetvdbId`       | number | TheTVDB ID.                                                                                                                                                                          |
| `image`           | string | Poster (shows) or still (episodes), full size.                                                                                                                                       |
| `summary`         | string | Summary as HTML.                                                                                                                                                                     |
| `summaryText`     | string | Summary as plain text.                                                                                                                                                               |
| `updatedAt`       | string | When the show was last updated on TVmaze (ISO 8601).                                                                                                                                 |
| `seasonsCount`    | number | Number of seasons.                                                                                                                                                                   |
| `cast`            | array  | Cast, each with `personId`, `personName`, `personUrl`, `characterName`, `characterUrl`, `self` (plays themselves) and `voice` (voice role). Needs `includeCast`.                     |
| `crew`            | array  | Crew, each with `type` (Creator, Executive Producer, …), `personId`, `personName` and `personUrl`. Needs `includeCast`.                                                              |
| `episodes`        | array  | Every episode, each with `id`, `url`, `name`, `season`, `number`, `type`, `airdate`, `airtime`, `airstamp`, `runtime`, `rating`, `image` and `summaryText`. Needs `includeEpisodes`. |
| `nextEpisode`     | object | The next episode to air, with the same fields as an `episodes` entry.                                                                                                                |
| `previousEpisode` | object | The latest episode that aired, with the same fields as an `episodes` entry.                                                                                                          |
| `credit`          | object | Rows from a person's page: `personId`, `personName`, `personUrl`, `characterName`, `self` and `voice` for that person's part in the show. `null` otherwise.                          |
| `season`          | number | Episode rows: season number.                                                                                                                                                         |
| `number`          | number | Episode rows: episode number within the season.                                                                                                                                      |
| `airdate`         | string | Episode rows: air date in the network's local time.                                                                                                                                  |
| `airtime`         | string | Episode rows: air time in the network's local time.                                                                                                                                  |
| `airstamp`        | string | Episode rows: release time in UTC (ISO 8601).                                                                                                                                        |
| `showId`          | number | Episode rows: TVmaze ID of the show.                                                                                                                                                 |
| `showName`        | string | Episode rows: name of the show.                                                                                                                                                      |
| `showUrl`         | string | Episode rows: the show's page on tvmaze.com.                                                                                                                                         |

<details><summary>Example output</summary>

A show with `includeEpisodes` on (cast, crew and episodes shortened here):

```json
{
  "itemType": "show",
  "id": 83,
  "url": "https://www.tvmaze.com/shows/83/the-simpsons",
  "name": "The Simpsons",
  "type": "Animation",
  "language": "English",
  "genres": ["Comedy", "Family"],
  "status": "Running",
  "runtime": 30,
  "averageRuntime": 30,
  "premiered": "1989-12-17",
  "ended": null,
  "officialSite": "http://www.fox.com/the-simpsons",
  "schedule": {
    "time": "20:00",
    "days": ["Sunday"]
  },
  "rating": 8.1,
  "weight": 100,
  "network": {
    "id": 4,
    "name": "FOX",
    "country": "US",
    "countryName": "United States",
    "officialSite": "https://www.fox.com/"
  },
  "webChannel": null,
  "imdbId": "tt0096697",
  "thetvdbId": 71663,
  "image": "https://static.tvmaze.com/uploads/images/original_untouched/637/1594614.jpg",
  "summary": "<p><b>The Simpsons</b> is the longest running scripted show in US television history. It captures the adventures of Homer, Marge, Maggie, Bart and Lisa who are living in a fictional town called Springfield.</p>",
  "summaryText": "The Simpsons is the longest running scripted show in US television history. It captures the adventures of Homer, Marge, Maggie, Bart and Lisa who are living in a fictional town called Springfield.",
  "updatedAt": "2026-10-09T06:03:39.000Z",
  "seasonsCount": 38,
  "cast": [
    {
      "personId": 14854,
      "personName": "Dan Castellaneta",
      "personUrl": "https://www.tvmaze.com/people/14854/dan-castellaneta",
      "characterName": "Homer Simpson",
      "characterUrl": "https://www.tvmaze.com/characters/16544/the-simpsons-homer-simpson",
      "self": false,
      "voice": true
    },
    {
      "personId": 14855,
      "personName": "Julie Kavner",
      "personUrl": "https://www.tvmaze.com/people/14855/julie-kavner",
      "characterName": "Marge Simpson",
      "characterUrl": "https://www.tvmaze.com/characters/16545/the-simpsons-marge-simpson",
      "self": false,
      "voice": true
    }
  ],
  "crew": [
    {
      "type": "Executive Story Editor",
      "personId": 283,
      "personName": "Andrew Kreisberg",
      "personUrl": "https://www.tvmaze.com/people/283/andrew-kreisberg"
    }
  ],
  "episodes": [
    {
      "id": 4998,
      "url": "https://www.tvmaze.com/episodes/4998/the-simpsons-1x01-simpsons-roasting-on-an-open-fire",
      "name": "Simpsons Roasting on an Open Fire",
      "season": 1,
      "number": 1,
      "type": "regular",
      "airdate": "1989-12-17",
      "airtime": "20:00",
      "airstamp": "1989-12-18T01:00:00+00:00",
      "runtime": 30,
      "rating": 7.9,
      "image": "https://static.tvmaze.com/uploads/images/original_untouched/489/1223249.jpg",
      "summaryText": "Homer's Christmas bonus is canceled and the rainy-day funds are needed to pay for Bart's tattoo removal in the first full-length episode of the subversive animated satire about Springfield's hapless first family."
    }
  ],
  "nextEpisode": {
    "id": 3773294,
    "url": "https://www.tvmaze.com/episodes/3773294/the-simpsons-38x03-treehouse-of-horror-presents-the-revengening",
    "name": "Treehouse of Horror Presents: The Revengening",
    "season": 38,
    "number": 3,
    "type": "regular",
    "airdate": "2026-10-18",
    "airtime": "20:00",
    "airstamp": "2026-10-19T00:00:00+00:00",
    "runtime": 30,
    "rating": null,
    "image": null,
    "summaryText": "All hell breaks loose on Halloween when a killer comes to Springfield and hacks their way through town. No Simpson is safe from... THE REVENGENING!"
  },
  "previousEpisode": {
    "id": 3765220,
    "url": "https://www.tvmaze.com/episodes/3765220/the-simpsons-38x02-diary-of-a-chimpy-kid",
    "name": "Diary of a Chimpy Kid",
    "season": 38,
    "number": 2,
    "type": "regular",
    "airdate": "2026-10-04",
    "airtime": "20:00",
    "airstamp": "2026-10-05T00:00:00+00:00",
    "runtime": 30,
    "rating": 7.5,
    "image": "https://static.tvmaze.com/uploads/images/original_untouched/643/1608319.jpg",
    "summaryText": "Bart and Lisa adopt an abandoned baby chimp and clash over their surprisingly different parenting styles. When the chimp is abducted by a private wild animal zoo, the family goes on a mission to rescue him. Homer is conflicted about saving the ape, because he's convinced the chimp will tear off his face and groin."
  },
  "credit": null
}
```

</details>

An episode row from the streaming schedule of 2026-10-12:

```json
{
  "itemType": "episode",
  "id": 3680022,
  "url": "https://www.tvmaze.com/episodes/3680022/wwe-monday-night-raw-33x41-1741-brookshire-grocery-arena-in-bossier-city-la",
  "name": "#1741 - Brookshire Grocery Arena in Bossier City, LA",
  "season": 33,
  "number": 41,
  "type": "regular",
  "airdate": "2026-10-12",
  "airtime": null,
  "airstamp": "2026-10-12T12:00:00+00:00",
  "runtime": null,
  "rating": null,
  "image": null,
  "summary": "<p>Tonight, The Usos will join forces with their estranged brother Sikoa against The 946 in what promises to be a wild Six-Man Tag Team Match. </p><p>Intercontinental Champion Chad Gable will defend the title against AAA Cruiserweight Champion Rey Fenix.</p><p>After Big Cass assaulted Rey Mysterio and Dragon Lee last week, The Master of the 619 will seek payback in a collision with the seven-footer. </p>",
  "summaryText": "Tonight, The Usos will join forces with their estranged brother Sikoa against The 946 in what promises to be a wild Six-Man Tag Team Match.\n\nIntercontinental Champion Chad Gable will defend the title against AAA Cruiserweight Champion Rey Fenix.\n\nAfter Big Cass assaulted Rey Mysterio and Dragon Lee last week, The Master of the 619 will seek payback in a collision with the seven-footer.",
  "showId": 802,
  "showName": "WWE Monday Night RAW",
  "showUrl": "https://www.tvmaze.com/shows/802/wwe-monday-night-raw",
  "network": null,
  "webChannel": {
    "id": 1,
    "name": "Netflix",
    "country": null,
    "countryName": null,
    "officialSite": "https://www.netflix.com/"
  }
}
```

A row from a person's page (Rainn Wilson) carries their part in the show:

```json
{
  "credit": {
    "personId": 19396,
    "personName": "Rainn Wilson",
    "personUrl": "https://www.tvmaze.com/people/19396/rainn-wilson",
    "characterName": "Dwight Kurt Schrute",
    "self": false,
    "voice": false
  }
}
```

### 💡 Use cases

- **Watchlists and release calendars** — track the next episode of every show you follow, or list everything premiering tonight on TV and streaming.
- **Entertainment apps and EPGs** — fill a TV guide with daily schedules, air times, networks, posters and summaries.
- **Catalogue enrichment** — turn a list of IMDb IDs into genres, status, networks, ratings, cast and episode lists, and map them to TVmaze and TheTVDB IDs.
- **Media and market research** — compare networks and streaming services by output, genre, language and audience rating.
- **Cast and crew research** — list every show an actor appeared in and the character they played, or a show's creators and producers.
- **Search, RAG and recommendation pipelines** — feed summaries, genres and cast into embeddings, classifiers or LLMs.

### ❓ FAQ

- **Do I need an account or an API key?** No. TVmaze's data is public and the Actor reads it without a login.
- **Can I use the data commercially?** TVmaze's data is licensed under [CC BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/): credit TVmaze and link back to it, and share what you build from it under the same license. Every row carries its tvmaze.com link for that.
- **Do I need a proxy?** No. It runs without one by default and keeps to TVmaze's request rate.
- **Why does a search return at most ten shows?** TVmaze returns its ten best matches for a search. For more, use a more specific term, or paste `https://www.tvmaze.com/shows` to get the whole catalogue.
- **How fast is it?** About two shows a second with cast or episodes. Turn both off for large lists: search, person and catalogue rows then come straight from the list (the catalogue at 250 shows per request), without `seasonsCount`, `nextEpisode` and `previousEpisode`.
- **Which time zone are air times in?** `airdate`, `airtime` and the show's `schedule` are in the network's local time. `airstamp` is the same moment in UTC.
- **Why is `nextEpisode` empty?** The show has ended, or TVmaze has no date for its next episode yet.
- **Why is `rating` empty on some shows?** Only shows and episodes TVmaze users have rated carry a rating.
- **Can I get one episode?** Yes. Paste its tvmaze.com episode link, such as `https://www.tvmaze.com/episodes/47640/the-office-1x01-pilot`.

### 🔗 More scrapers by Anyx

- [Letterboxd Scraper](https://apify.com/anyxsolutions/letterboxd-scraper)
- [Apple Podcasts Scraper](https://apify.com/anyxsolutions/apple-podcasts-scraper)
- [Wikipedia Scraper](https://apify.com/anyxsolutions/wikipedia-scraper)
- [Goodreads Scraper](https://apify.com/anyxsolutions/goodreads-scraper)

### 🤝 Anyx Solutions

We build custom scrapers and data-extraction pipelines.

- Email: tantosthor@gmail.com

### 🖼 Image credit

Image credit: [tvmaze.com](https://www.tvmaze.com/)

# Actor input Schema

## `startUrls` (type: `array`):

tvmaze.com pages: a search such as https://www.tvmaze.com/search?q=star+trek, a show (https://www.tvmaze.com/shows/83/the-simpsons), an episode (https://www.tvmaze.com/episodes/47640/the-office-1x01-pilot), a person for every show they appeared in (https://www.tvmaze.com/people/19396/rainn-wilson), a schedule (https://www.tvmaze.com/schedule?country=GB\&date=2026-10-12) or https://www.tvmaze.com/shows for the whole catalogue.

## `searchTerms` (type: `array`):

Show names or keywords to search TVmaze for, one search per line, for example the office or "breaking bad". Each search returns TVmaze's ten best matches.

## `imdbIds` (type: `array`):

IMDb title IDs or imdb.com title links of TV series, one per line, for example tt0096697. Each returns the matching show.

## `scheduleDate` (type: `string`):

Day of the schedule, for example 2026-10-12, or a relative value such as 0 days for today or +1 day for tomorrow. Leave empty to skip the schedule.

## `scheduleCountry` (type: `string`):

Two-letter code of the country whose schedule to get, for example US, GB, CA, AU or DE. Streaming releases cover that country's services plus worldwide ones such as Netflix.

## `scheduleType` (type: `string`):

Which releases the schedule covers: TV channels and streaming services, TV channels only, or streaming services only. Also applies to schedule URLs.

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

Add each show's cast (actor and character) and crew (creators, producers, writers). With cast and episodes both off, search, person and catalogue rows come straight from the list, faster but without seasons and next episode.

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

Add each show's full episode list, with season, number, title, air date, runtime, rating and summary. Long-running shows have hundreds of episodes.

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

Maximum number of shows (or schedule episodes) to return per start URL, search term, IMDb ID or schedule. Leave empty to get every match.

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

Proxy settings. TVmaze needs no proxy; the Actor keeps within TVmaze's request rate.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://www.tvmaze.com/search?q=star+trek"
    }
  ],
  "scheduleCountry": "US",
  "scheduleType": "all",
  "includeCast": true,
  "includeEpisodes": false,
  "maxItems": 5,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `overview` (type: `string`):

No description

## `schedule` (type: `string`):

No description

# 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 = {
    "startUrls": [
        {
            "url": "https://www.tvmaze.com/search?q=star+trek"
        }
    ],
    "maxItems": 5
};

// Run the Actor and wait for it to finish
const run = await client.actor("anyxsolutions/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 = {
    "startUrls": [{ "url": "https://www.tvmaze.com/search?q=star+trek" }],
    "maxItems": 5,
}

# Run the Actor and wait for it to finish
run = client.actor("anyxsolutions/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 '{
  "startUrls": [
    {
      "url": "https://www.tvmaze.com/search?q=star+trek"
    }
  ],
  "maxItems": 5
}' |
apify call anyxsolutions/tvmaze-scraper --silent --output-dataset

```

## MCP server setup

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