{
  "openapi": "3.0.1",
  "info": {
    "title": "TVmaze Scraper",
    "description": "TVmaze Scraper is a Python tool designed to extract TV show metadata, episode guides, cast details, air dates, and schedules from TVmaze. It exports structured television data into clean CSV or JSON formats for entertainment analytics and media tracking.",
    "version": "0.0",
    "x-build-id": "dueOql5DVEFygczeW"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/real-estate-api~TVmaze-Scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-real-estate-api-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/real-estate-api~TVmaze-Scraper/runs": {
      "post": {
        "operationId": "runs-sync-real-estate-api-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/real-estate-api~TVmaze-Scraper/run-sync": {
      "post": {
        "operationId": "run-sync-real-estate-api-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": [
              "search",
              "shows",
              "episodes",
              "people",
              "schedule",
              "updates",
              "index"
            ],
            "type": "string",
            "description": "What to collect: show search, one show, all episodes, people, a country or web schedule, recently updated shows, or the show index.",
            "default": "search"
          },
          "queries": {
            "title": "Search queries",
            "type": "array",
            "description": "Show titles for search mode, or person names for people mode. One query per line.",
            "items": {
              "type": "string"
            }
          },
          "bestMatchOnly": {
            "title": "Best match only (singlesearch)",
            "type": "boolean",
            "description": "Use TVmaze singlesearch and keep one show per query. A miss is saved as a NOT_FOUND row.",
            "default": false
          },
          "showIds": {
            "title": "Show IDs, tvmaze URLs, IMDb (tt…) or TheTVDB IDs (tvdb:81189)",
            "type": "array",
            "description": "TVmaze show ids (169), show URLs, IMDb ids (tt0903747 or imdb:tt0903747), or TheTVDB ids (tvdb:81189). Used by shows and episodes modes.",
            "items": {
              "type": "string"
            }
          },
          "includeEpisodes": {
            "title": "Include episodes",
            "type": "boolean",
            "description": "In shows mode, load episodes with the show. Turn off to skip that request.",
            "default": true
          },
          "includeSpecials": {
            "title": "Include specials",
            "type": "boolean",
            "description": "Ask for specials=1 on the episodes endpoint. This replaces the episodes embed so specials are included.",
            "default": false
          },
          "includeCast": {
            "title": "Include cast",
            "type": "boolean",
            "description": "In shows mode, embed the cast on the show request.",
            "default": true
          },
          "includeCrew": {
            "title": "Include crew",
            "type": "boolean",
            "description": "In shows mode, load crew as an extra request.",
            "default": false
          },
          "includeSeasons": {
            "title": "Include seasons",
            "type": "boolean",
            "description": "In shows mode, load seasons as an extra request.",
            "default": false
          },
          "includeAkas": {
            "title": "Include alternate titles",
            "type": "boolean",
            "description": "In shows mode, load alternate titles (akas) as an extra request.",
            "default": false
          },
          "episodeRows": {
            "title": "Output episodes as separate rows",
            "type": "boolean",
            "description": "In shows mode, write each episode as its own dataset row instead of nesting them on the show.",
            "default": false
          },
          "countries": {
            "title": "Schedule countries (ISO-2)",
            "type": "array",
            "description": "ISO 3166-1 alpha-2 country codes for schedule mode, one per line. Empty uses US.",
            "items": {
              "type": "string"
            }
          },
          "dates": {
            "title": "Schedule dates (YYYY-MM-DD)",
            "type": "array",
            "description": "Dates for the country schedule and the web schedule. Empty means today (UTC).",
            "items": {
              "type": "string"
            }
          },
          "includeWebSchedule": {
            "title": "Include streaming/web schedule",
            "type": "boolean",
            "description": "Also call the web schedule for each date. The show sits under the embedded show object.",
            "default": false
          },
          "updatedSince": {
            "title": "Updated since",
            "enum": [
              "day",
              "week",
              "month"
            ],
            "type": "string",
            "description": "How far back the updates feed should look: the last day, week, or month.",
            "default": "day"
          },
          "fetchUpdatedShows": {
            "title": "Fetch full details for updated shows",
            "type": "boolean",
            "description": "After the updates feed, load each show and save a show row as well as the update row.",
            "default": false
          },
          "indexStartPage": {
            "title": "Index start page",
            "minimum": 0,
            "type": "integer",
            "description": "First page of the show index. Page 0 is the start. The run stops at the first 404.",
            "default": 0
          },
          "maxItems": {
            "title": "Max rows",
            "minimum": 1,
            "maximum": 20000,
            "type": "integer",
            "description": "Stop after this many dataset rows, including error rows. Free cap 20,000. Nested episode lists are also capped.",
            "default": 200
          },
          "callsPer10s": {
            "title": "API calls per 10 s",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Ceiling for TVmaze calls in any 10 second window. TVmaze allows at least 20 calls per 10 seconds per IP. Default is 18.",
            "default": 18
          },
          "timeoutSecs": {
            "title": "Run timeout (seconds)",
            "minimum": 1,
            "maximum": 3600,
            "type": "integer",
            "description": "Stop the run after this many seconds and keep rows already saved.",
            "default": 300
          },
          "requestTimeoutSecs": {
            "title": "Request timeout (seconds)",
            "minimum": 1,
            "maximum": 120,
            "type": "integer",
            "description": "How long to wait for one TVmaze response before treating it as a failed request.",
            "default": 30
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional proxy for TVmaze requests. Leave Apify Proxy off unless your IP is rate limited.",
            "default": {
              "useApifyProxy": false
            }
          }
        }
      },
      "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}