{
  "openapi": "3.0.1",
  "info": {
    "title": "TVMaze Scraper — TV Shows, Episodes, Cast & Schedule API",
    "description": "TV show data API powered by the open TVMaze REST API — no key, no browser. Search shows, pull show details, ratings, full episode lists, cast & characters, people and a country's daily TV air schedule. Export TV datasets to JSON, CSV or Excel for analytics, ML and recommendations.",
    "version": "1.0",
    "x-build-id": "zkzs6zJ9vUM7PILsc"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/logiover~tvmaze-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-logiover-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/logiover~tvmaze-scraper/runs": {
      "post": {
        "operationId": "runs-sync-logiover-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/logiover~tvmaze-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-logiover-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": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "Mode",
            "enum": [
              "showIndex",
              "searchShows",
              "showDetails",
              "episodes",
              "cast",
              "schedule",
              "people"
            ],
            "type": "string",
            "description": "Which TVMaze endpoint to run.\n\n• **showIndex** — the full TVMaze catalogue, 250 shows per page, paginated (highest volume — default)\n• **searchShows** — free-text search for TV shows by name\n• **showDetails** — full details for one or more show IDs (batch), optional cast embed\n• **episodes** — every episode of a series (a long-running show returns hundreds)\n• **cast** — cast members and the characters they play, for a show\n• **schedule** — a full day of TV airings for a country (100+ across the US)\n• **people** — free-text people search, or details for one/more person IDs",
            "default": "showIndex"
          },
          "query": {
            "title": "Search query",
            "type": "string",
            "description": "Free-text term for **searchShows** (a show name) or **people** (a person name)."
          },
          "showId": {
            "title": "Show ID",
            "type": "string",
            "description": "TVMaze show ID (a plain integer), e.g. `169` (Breaking Bad) or `83` (The Simpsons). Used by **showDetails**, **episodes**, **cast**. It is the number in a TVMaze show URL: tvmaze.com/shows/**169**/…"
          },
          "showIds": {
            "title": "Show IDs (batch, showDetails)",
            "type": "array",
            "description": "Array of TVMaze show IDs (integers) for batch **showDetails**.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "embedCast": {
            "title": "Embed cast (showDetails)",
            "type": "boolean",
            "description": "When true, **showDetails** also attaches a compact `cast[]` list (actor + character) to each show via `?embed[]=cast`.",
            "default": false
          },
          "personId": {
            "title": "Person ID (people)",
            "type": "string",
            "description": "TVMaze person ID (an integer), e.g. `1`. Used by **people** mode. It is the number in a TVMaze person URL: tvmaze.com/people/**1**/…"
          },
          "personIds": {
            "title": "Person IDs (batch)",
            "type": "array",
            "description": "Array of TVMaze person IDs (integers) for batch **people** lookups.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "country": {
            "title": "Country (schedule)",
            "type": "string",
            "description": "ISO 3166-1 alpha-2 country code for **schedule** mode, e.g. `US`, `GB`, `DE`, `TR`. A full US day returns 100+ airings.",
            "default": "US"
          },
          "date": {
            "title": "Date (schedule, YYYY-MM-DD)",
            "type": "string",
            "description": "Day to pull the **schedule** for, format `YYYY-MM-DD`. Leave empty for today."
          },
          "startPage": {
            "title": "Start page (showIndex)",
            "minimum": 0,
            "type": "integer",
            "description": "Page number to start the **showIndex** pagination from (0-based). Each page is 250 shows. Use it to resume or skip ahead through the catalogue.",
            "default": 0
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 1,
            "maximum": 500000,
            "type": "integer",
            "description": "Upper bound on rows returned. For showIndex this drives pagination through the catalogue; for other modes it caps the returned list.",
            "default": 250
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}