{
  "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": "CisZMIwKwIgbmLzVR"
  },
  "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). When provided, the official TMDb API is used. Leave empty to use the public no-key endpoints. Get a key at https://www.themoviedb.org/settings/api"
          },
          "useApiFirst": {
            "title": "Use API First (when available)",
            "type": "boolean",
            "description": "When an API key is provided, use the official TMDb API first and switch to the public no-key endpoints if it fails.",
            "default": true
          },
          "contentType": {
            "title": "Content Type",
            "enum": [
              "movie",
              "tv",
              "person",
              "both"
            ],
            "type": "string",
            "description": "Type of content to collect: movies, TV shows, people, or both movies and TV shows.",
            "default": "tv"
          },
          "searchQueries": {
            "title": "Search Queries",
            "type": "string",
            "description": "Comma-separated search terms. Each term runs as a separate search. Leave empty to use discover mode with the filters below.",
            "default": ""
          },
          "genreIds": {
            "title": "Genre IDs",
            "type": "string",
            "description": "Comma-separated TMDb genre IDs for discover mode. Movies: 28=Action, 12=Adventure, 16=Animation, 35=Comedy, 18=Drama, 27=Horror, 878=Science Fiction, 53=Thriller. TV: 10759=Action & Adventure, 10765=Sci-Fi & Fantasy, 18=Drama, 35=Comedy.",
            "default": ""
          },
          "yearFrom": {
            "title": "Year From",
            "minimum": 1870,
            "maximum": 3000,
            "type": "integer",
            "description": "Earliest release year for discover mode. Applies to movie release dates and TV first air dates."
          },
          "yearTo": {
            "title": "Year To",
            "minimum": 1870,
            "maximum": 3000,
            "type": "integer",
            "description": "Latest release year for discover mode. Applies to movie release dates and TV first air dates."
          },
          "peopleQuery": {
            "title": "People Search Query (Optional)",
            "type": "string",
            "description": "Comma-separated names to collect as people records. Each name runs as a separate search.",
            "default": ""
          },
          "resultsWanted": {
            "title": "Maximum Results",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Maximum number of content items to collect per search query or discover run.",
            "default": 5
          },
          "peopleResultsWanted": {
            "title": "Maximum People Results",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Maximum number of people records to collect per people query.",
            "default": 3
          },
          "maxPages": {
            "title": "Maximum Pages",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Maximum number of result pages to request per query. Each page holds up to 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": "Sort order for discover mode. Release date sorts apply to movies only, first air date sorts apply to TV shows only.",
            "default": "popularity.desc"
          },
          "minVoteCount": {
            "title": "Minimum Vote Count",
            "minimum": 0,
            "type": "integer",
            "description": "Minimum number of votes for discover mode, to skip titles with very few ratings.",
            "default": 0
          },
          "minVoteAverage": {
            "title": "Minimum Vote Average",
            "minimum": 0,
            "maximum": 10,
            "type": "number",
            "description": "Minimum average rating for discover mode.",
            "default": 0
          },
          "collectPeople": {
            "title": "Include cast and crew",
            "type": "boolean",
            "description": "Add cast and crew details to each movie or TV result.",
            "default": false
          },
          "collectReviews": {
            "title": "Include reviews",
            "type": "boolean",
            "description": "Add user reviews for each movie or TV result.",
            "default": false
          },
          "collectImages": {
            "title": "Include images",
            "type": "boolean",
            "description": "Add posters, backdrops, logos, and profile images.",
            "default": false
          },
          "collectKeywords": {
            "title": "Include keywords",
            "type": "boolean",
            "description": "Add keywords and tags for each movie or TV result.",
            "default": false
          },
          "collectVideos": {
            "title": "Include videos",
            "type": "boolean",
            "description": "Add videos and trailer metadata.",
            "default": false
          },
          "collectWatchProviders": {
            "title": "Include watch providers",
            "type": "boolean",
            "description": "Add streaming provider availability by country.",
            "default": false
          },
          "collectCollections": {
            "title": "Include movie collections",
            "type": "boolean",
            "description": "Add the full collection record for movies that belong to a franchise.",
            "default": false
          },
          "maxReviewsPerContent": {
            "title": "Maximum Reviews Per Title",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum number of reviews to keep for each movie or TV result.",
            "default": 25
          },
          "maxImagesPerContent": {
            "title": "Maximum Images Per Title",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum number of images to keep per image group (posters, backdrops, logos) for each result.",
            "default": 20
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Choose to use no proxy, Apify Proxy, or provide custom proxy URLs.",
            "default": {}
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}