{
  "openapi": "3.0.1",
  "info": {
    "title": "TVmaze Scraper · TV Shows, Episodes, Casts & Networks",
    "description": "Scrape TV shows, episode details, cast members, ratings, genres, and network broadcast data from TVmaze's public database. Pay-per-event pricing per show record.",
    "version": "1.0",
    "x-build-id": "c43BZ3ijVBj3JBbxO"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/reapx~tvmaze-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-reapx-tvmaze-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/reapx~tvmaze-scraper/runs": {
      "post": {
        "operationId": "runs-sync-reapx-tvmaze-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/reapx~tvmaze-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-reapx-tvmaze-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "required": [
          "maxShows"
        ],
        "properties": {
          "searchQuery": {
            "title": "Show Search Keyword",
            "type": "string",
            "description": "Search query string to search TV shows by title or keyword on TVmaze (e.g. <code>drama</code>, <code>star</code>, or <code>game</code>).<br><br>Leaving this field empty retrieves TV shows sequentially from the main database index. Specifying a search term targets specific show titles, narrowing the search scope and lowering overall execution cost.<br><br>Leave this field empty to skip this filter."
          },
          "genre": {
            "title": "Genre Filter",
            "type": "string",
            "description": "Filter shows by primary genre tag (e.g. <code>Drama</code>, <code>Comedy</code>, <code>Action</code>, <code>Science-Fiction</code>, <code>Thriller</code>, or <code>Crime</code>).<br><br>Leave this field empty to include TV shows across all genres without filtering. Selecting a specific genre filters results client-side, reducing unnecessary dataset rows and lowering event charges."
          },
          "network": {
            "title": "Network / Streaming Platform",
            "type": "string",
            "description": "Filter TV shows by broadcast network or web channel name (e.g. <code>CBS</code>, <code>HBO</code>, <code>Netflix</code>, <code>BBC One</code>, or <code>NBC</code>).<br><br>Leaving this field empty includes shows from all television networks and streaming providers worldwide. Entering a network name isolates specific network catalogs, speeding up processing time and controlling run cost.<br><br>Leave this field empty to skip this filter."
          },
          "country": {
            "title": "Country of Origin",
            "type": "string",
            "description": "Filter TV shows by network or broadcast country of origin (e.g. <code>United States</code>, <code>United Kingdom</code>, <code>Japan</code>, <code>Canada</code>, or <code>France</code>).<br><br>Leave empty to scrape TV series produced in any country globally. Specifying a country name filters shows by network origin, focusing the output data and reducing compute time."
          },
          "status": {
            "title": "Show Status Filter",
            "type": "string",
            "description": "Filter shows by current production status (e.g. <code>Running</code>, <code>Ended</code>, <code>To Be Determined</code>, or <code>In Development</code>).<br><br>Leaving this field empty includes active, completed, and upcoming TV series. Selecting a status focuses the scraper on active or ended shows, preventing irrelevant records from incurring charges.<br><br>Leave this field empty to skip this filter."
          },
          "minRating": {
            "title": "Minimum Average Rating",
            "minimum": 0,
            "maximum": 10,
            "type": "number",
            "description": "Minimum TVmaze user rating threshold from 0.0 to 10.0 (e.g. <code>7.0</code> or <code>8.5</code>).<br><br>Leaving this field empty includes shows regardless of user rating score. Setting a higher minimum rating filters out low-rated or unrated titles, ensuring only high-quality show entries are saved."
          },
          "startPage": {
            "title": "Start Index Page",
            "minimum": 0,
            "type": "integer",
            "description": "Starting page index for sequential database pagination (0 to 1000). Prefilled with 0.<br><br>Leaving this empty defaults to starting from page 0. Adjusting the starting page allows resuming pagination from a specific offset, helping scrape specific historical blocks without redundant requests."
          },
          "maxShows": {
            "title": "Maximum Shows to Extract",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Maximum number of TV show records to extract and save into the default dataset (1 to 5000). Prefilled with 50.<br><br>Higher limits result in longer execution times and higher total event charges. Setting a smaller limit caps the run cost and ensures execution completes within your budget.<br><br>The higher the number, the longer the run takes and the more you are charged, because you pay per row returned.",
            "default": 50
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}