{
  "openapi": "3.0.1",
  "info": {
    "title": "TheMoviedb Scraper",
    "description": "Introducing TheMoviedb Scraper! This versatile actor extracts rich movie, TV, and celebrity data from TheMovieDB. It offers two modes: use the official API for fast, stable results, or scrape directly without a key. Your complete media data solution.",
    "version": "0.0",
    "x-build-id": "4kRSo2IfTydM9OTYf"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/shahidirfan~TheMoviedb-Scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-shahidirfan-TheMoviedb-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/shahidirfan~TheMoviedb-Scraper/runs": {
      "post": {
        "operationId": "runs-sync-shahidirfan-TheMoviedb-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/shahidirfan~TheMoviedb-Scraper/run-sync": {
      "post": {
        "operationId": "run-sync-shahidirfan-TheMoviedb-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",
        "properties": {
          "apiKey": {
            "title": "TMDb API Key (Optional)",
            "type": "string",
            "description": "Your TMDb API key (v3 auth). If provided, uses TMDb API for fast and reliable data extraction with fallback to website scraping. Get one at https://www.themoviedb.org/settings/api"
          },
          "useApiFirst": {
            "title": "Use API First (when available)",
            "type": "boolean",
            "description": "If true and API key is provided, attempts to use TMDb API first. If false, uses website scraping as primary and API for fallbacks.",
            "default": true
          },
          "contentType": {
            "title": "Content Type",
            "enum": [
              "movie",
              "tv",
              "person",
              "both"
            ],
            "type": "string",
            "description": "Type of content to scrape: movies, TV shows, people, or both movies and TV shows.",
            "default": "tv"
          },
          "searchQueries": {
            "title": "Search Queries",
            "type": "string",
            "description": "Comma-separated list of search terms to query TMDb for. Each query will be searched separately. Leave empty to use discover mode with filters.",
            "default": ""
          },
          "genreIds": {
            "title": "Genre IDs",
            "type": "string",
            "description": "Comma-separated TMDb genre IDs to filter by. For Movies: 28=Action, 12=Adventure, 16=Animation, 35=Comedy, 18=Drama, 27=Horror, 878=Science Fiction, 53=Thriller. For TV: 10759=Action&Adventure, 16=Animation, 35=Comedy, etc.",
            "default": ""
          },
          "peopleQuery": {
            "title": "People Search Query (Optional)",
            "type": "string",
            "description": "Optional comma-separated list of people search terms, to collect people data via API (if API key provided).",
            "default": ""
          },
          "resultsWanted": {
            "title": "Maximum Results",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum number of content items to collect per search query.",
            "default": 5
          },
          "maxPages": {
            "title": "Maximum Pages",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum number of API result pages to fetch (each page contains ~20 items).",
            "default": 5
          },
          "sortBy": {
            "title": "Sort By",
            "enum": [
              "popularity.desc",
              "popularity.asc",
              "vote_average.desc",
              "vote_average.asc",
              "primary_release_date.desc",
              "primary_release_date.asc",
              "first_air_date.desc",
              "first_air_date.asc"
            ],
            "type": "string",
            "description": "Sorting for discover endpoints when using filters (see TMDb discover API docs).",
            "default": "popularity.desc"
          },
          "minVoteCount": {
            "title": "Minimum Vote Count",
            "minimum": 0,
            "type": "integer",
            "description": "Minimum number of votes for discover filters (to avoid very obscure content).",
            "default": 0
          },
          "minVoteAverage": {
            "title": "Minimum Vote Average",
            "minimum": 0,
            "maximum": 10,
            "type": "number",
            "description": "Minimum average vote for discover filters.",
            "default": 0
          },
          "collectPeople": {
            "title": "Collect people data (API)",
            "type": "boolean",
            "description": "If true and API key provided, collects people/credits info for content items and/or people search queries.",
            "default": false
          },
          "collectReviews": {
            "title": "Collect reviews (API)",
            "type": "boolean",
            "description": "If true and API key provided, collects user reviews for each content item.",
            "default": false
          },
          "collectImages": {
            "title": "Collect images metadata (API)",
            "type": "boolean",
            "description": "If true and API key provided, collects backdrops, posters, and profile image metadata.",
            "default": false
          },
          "collectKeywords": {
            "title": "Collect keywords (API)",
            "type": "boolean",
            "description": "If true and API key provided, collects keywords/tags associated with content.",
            "default": false
          },
          "collectVideos": {
            "title": "Collect videos (API)",
            "type": "boolean",
            "description": "If true and API key provided, collects videos/trailers metadata.",
            "default": false
          },
          "collectWatchProviders": {
            "title": "Collect watch providers (API)",
            "type": "boolean",
            "description": "If true and API key provided, collects watch providers (streaming platforms) data.",
            "default": false
          },
          "minDelayMs": {
            "title": "Minimum delay between requests (ms)",
            "minimum": 0,
            "type": "integer",
            "description": "Minimum random delay between HTTP requests, in milliseconds.",
            "default": 500
          },
          "maxDelayMs": {
            "title": "Maximum delay between requests (ms)",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum random delay between HTTP requests, in milliseconds.",
            "default": 2000
          },
          "maxConcurrency": {
            "title": "Maximum concurrency",
            "minimum": 4,
            "maximum": 30,
            "type": "integer",
            "description": "Maximum number of concurrent detail requests (API or web).",
            "default": 10
          },
          "requestTimeoutMs": {
            "title": "Request timeout (ms)",
            "minimum": 1000,
            "type": "integer",
            "description": "Timeout for HTTP requests in milliseconds.",
            "default": 35000
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Proxy settings for web scraping. Residential proxies are recommended for better reliability.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          },
          "metamorph": {
            "title": "Metamorph",
            "type": "string",
            "description": "Actor ID to metamorph into after completion (for chaining actors)."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}