{
  "openapi": "3.0.1",
  "info": {
    "title": "TMDB + Rotten Tomatoes + Metacritic Scraper",
    "description": "Unified movie/TV/person metadata from three sources. TMDB official API (search, popular, trending, discover, credits). Rotten Tomatoes (Tomatometer + Audience Score). Metacritic (Metascore + User Score). One actor, switch via the `platform` dropdown.",
    "version": "1.0",
    "x-build-id": "YfRBPW2FCZotWXlVB"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/crawlerbros~tmdb-rt-metacritic-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-crawlerbros-tmdb-rt-metacritic-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/crawlerbros~tmdb-rt-metacritic-scraper/runs": {
      "post": {
        "operationId": "runs-sync-crawlerbros-tmdb-rt-metacritic-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/crawlerbros~tmdb-rt-metacritic-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-crawlerbros-tmdb-rt-metacritic-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": [
          "platform",
          "mode"
        ],
        "properties": {
          "platform": {
            "title": "Platform",
            "enum": [
              "tmdb",
              "rottentomatoes",
              "metacritic"
            ],
            "type": "string",
            "description": "Which source to scrape.",
            "default": "rottentomatoes"
          },
          "mode": {
            "title": "Mode",
            "enum": [
              "search",
              "byTitle",
              "byUrl",
              "byPerson",
              "byGenre",
              "byYear",
              "popular",
              "topRated",
              "trending",
              "upcoming",
              "nowPlaying",
              "discover"
            ],
            "type": "string",
            "description": "What to fetch. Available modes vary by platform — see README.",
            "default": "popular"
          },
          "mediaType": {
            "title": "Media type",
            "enum": [
              "movie",
              "tv",
              "person",
              "multi"
            ],
            "type": "string",
            "description": "Movie, TV show, person, or all (multi). Some modes only apply to one type — see README.",
            "default": "movie"
          },
          "tmdbApiKey": {
            "title": "TMDB API key (required when platform=tmdb)",
            "type": "string",
            "description": "Free TMDB v3 API key — sign up at https://www.themoviedb.org/settings/api. Leave empty if scraping Rotten Tomatoes or Metacritic only."
          },
          "searchQuery": {
            "title": "Search query (mode=search)",
            "type": "string",
            "description": "Free-text query. e.g. `oppenheimer`, `breaking bad`, `Christopher Nolan`.",
            "default": "oppenheimer"
          },
          "titles": {
            "title": "Titles / IDs / slugs (mode=byTitle)",
            "type": "array",
            "description": "List of TMDB numeric IDs, RT slugs (`oppenheimer_2023`), or Metacritic slugs (`oppenheimer`). Mixed inputs work — the actor disambiguates by platform.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "urls": {
            "title": "URLs (mode=byUrl)",
            "type": "array",
            "description": "Full URLs. Examples: `https://www.themoviedb.org/movie/872585`, `https://www.rottentomatoes.com/m/oppenheimer_2023`, `https://www.metacritic.com/movie/oppenheimer/`.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "personId": {
            "title": "Person ID (mode=byPerson, TMDB only)",
            "type": "string",
            "description": "TMDB person ID (e.g. `525`). Returns full filmography."
          },
          "tmdbList": {
            "title": "TMDB curated list (mode=popular/topRated/upcoming/nowPlaying)",
            "enum": [
              "popular",
              "top_rated",
              "upcoming",
              "now_playing",
              "airing_today",
              "on_the_air"
            ],
            "type": "string",
            "description": "Which TMDB curated movie list to fetch (only when platform=tmdb)."
          },
          "trendingWindow": {
            "title": "Trending time window (mode=trending, TMDB)",
            "enum": [
              "day",
              "week"
            ],
            "type": "string",
            "description": "TMDB trending window — daily or weekly.",
            "default": "week"
          },
          "genre": {
            "title": "Genre (mode=byGenre / discover)",
            "enum": [
              "Action",
              "Adventure",
              "Animation",
              "Anime",
              "Biography",
              "Comedy",
              "Crime",
              "Documentary",
              "Drama",
              "Family",
              "Fantasy",
              "History",
              "Horror",
              "Kids",
              "Music",
              "Musical",
              "Mystery",
              "News",
              "Reality",
              "Romance",
              "Science Fiction",
              "Soap",
              "Sport",
              "Talk",
              "Thriller",
              "TV Movie",
              "War",
              "War & Politics",
              "Western"
            ],
            "type": "string",
            "description": "Genre name. TMDB maps to numeric IDs; RT/MC apply substring filtering on the page."
          },
          "year": {
            "title": "Year (mode=byYear / discover)",
            "minimum": 1900,
            "maximum": 2100,
            "type": "integer",
            "description": "Primary release year (TMDB) / browse-by-year (RT, MC)."
          },
          "sortBy": {
            "title": "Sort order",
            "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",
              "revenue.desc",
              "vote_count.desc"
            ],
            "type": "string",
            "description": "Sort order. TMDB discover uses these values directly; RT/MC translate to their own sort options.",
            "default": "popularity.desc"
          },
          "language": {
            "title": "Language (TMDB `language` param)",
            "enum": [
              "en-US",
              "en-GB",
              "es-ES",
              "es-MX",
              "fr-FR",
              "de-DE",
              "it-IT",
              "pt-BR",
              "pt-PT",
              "ja-JP",
              "ko-KR",
              "zh-CN",
              "zh-TW",
              "ru-RU",
              "ar-SA",
              "hi-IN",
              "tr-TR",
              "nl-NL",
              "pl-PL",
              "sv-SE",
              "da-DK",
              "fi-FI",
              "no-NO",
              "el-GR",
              "he-IL",
              "th-TH",
              "id-ID",
              "vi-VN",
              "uk-UA",
              "cs-CZ",
              "hu-HU",
              "ro-RO",
              "bg-BG"
            ],
            "type": "string",
            "description": "Two-letter ISO 639-1 language code, optionally with country (e.g. `en-US`, `fr-FR`). TMDB localises titles, overviews, and genre names. RT/MC are English-only.",
            "default": "en-US"
          },
          "region": {
            "title": "Region (TMDB `region` ISO-3166)",
            "enum": [
              "US",
              "GB",
              "CA",
              "AU",
              "DE",
              "FR",
              "ES",
              "IT",
              "JP",
              "KR",
              "CN",
              "BR",
              "MX",
              "IN",
              "RU",
              "TR",
              "NL",
              "SE",
              "PL",
              "AR"
            ],
            "type": "string",
            "description": "Two-letter country code for region-specific release dates and certifications (TMDB)."
          },
          "minVoteCount": {
            "title": "Min vote count (TMDB filter)",
            "minimum": 0,
            "maximum": 1000000,
            "type": "integer",
            "description": "Drop TMDB records with fewer votes than this. Useful for filtering out obscure / un-rated entries."
          },
          "minRating": {
            "title": "Min rating",
            "minimum": 0,
            "maximum": 100,
            "type": "number",
            "description": "Drop records below this rating. TMDB: 0-10 (vote_average). RT: 0-100 (Tomatometer). MC: 0-100 (Metascore)."
          },
          "maxRating": {
            "title": "Max rating",
            "minimum": 0,
            "maximum": 100,
            "type": "number",
            "description": "Drop records above this rating (same scale as `minRating`)."
          },
          "yearMin": {
            "title": "Min year",
            "minimum": 1900,
            "maximum": 2100,
            "type": "integer",
            "description": "Drop records released before this year."
          },
          "yearMax": {
            "title": "Max year",
            "minimum": 1900,
            "maximum": 2100,
            "type": "integer",
            "description": "Drop records released after this year."
          },
          "containsKeyword": {
            "title": "Title contains",
            "type": "string",
            "description": "Case-insensitive substring filter on the title."
          },
          "includeAdult": {
            "title": "Include adult content (TMDB)",
            "type": "boolean",
            "description": "When true, TMDB includes adult titles in results. Default false.",
            "default": false
          },
          "rtBrowseList": {
            "title": "Rotten Tomatoes browse list (RT popular/topRated/upcoming/nowPlaying)",
            "enum": [
              "movies_in_theaters",
              "movies_at_home",
              "movies_coming_soon",
              "tv_series_browse",
              "movies_at_home/sort:popular",
              "movies_at_home/sort:top_box_office",
              "movies_at_home/sort:newest"
            ],
            "type": "string",
            "description": "Which RT browse listing to scrape."
          },
          "mcBrowseSort": {
            "title": "Metacritic browse sort",
            "enum": [
              "metascore_desc",
              "metascore_asc",
              "userscore_desc",
              "releasedate_desc",
              "releasedate_asc",
              "alpha_asc"
            ],
            "type": "string",
            "description": "How to sort Metacritic browse listings.",
            "default": "metascore_desc"
          },
          "fetchDetail": {
            "title": "Fetch full detail page",
            "type": "boolean",
            "description": "If true (default), the actor follows each list-item to its detail page to populate full metadata (synopsis, cast, full ratings). Disable for faster, lighter list-only output.",
            "default": true
          },
          "appendToResponse": {
            "title": "TMDB append_to_response (mode=byTitle / popular / topRated)",
            "uniqueItems": true,
            "type": "array",
            "description": "TMDB extras to append to detail responses. Common: `credits`, `videos`, `images`, `reviews`, `similar`, `recommendations`, `keywords`, `release_dates`, `external_ids`.",
            "items": {
              "type": "string",
              "enum": [
                "credits",
                "videos",
                "images",
                "reviews",
                "similar",
                "recommendations",
                "keywords",
                "release_dates",
                "external_ids",
                "alternative_titles",
                "translations"
              ],
              "enumTitles": [
                "Cast & crew",
                "Videos / trailers",
                "Images / posters",
                "Reviews",
                "Similar titles",
                "Recommendations",
                "Keywords",
                "Release dates per region",
                "External IDs (IMDb/TVDB/...)",
                "Alternative titles",
                "Translations"
              ]
            },
            "default": [
              "credits"
            ]
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Hard cap on emitted records.",
            "default": 10
          },
          "autoEscalateOnBlock": {
            "title": "Auto-escalate to Apify proxy on HTTP block",
            "type": "boolean",
            "description": "When true (default), automatically engages Apify Proxy on HTTP 403/429 from RT or Metacritic. Has no effect on TMDB (no proxy needed for the official API).",
            "default": true
          },
          "proxyGroups": {
            "title": "Apify proxy groups (used on auto-escalation)",
            "type": "array",
            "description": "Apify proxy groups to use when auto-escalating after a block. Empty = datacenter (default), then residential fallback.",
            "default": [],
            "items": {
              "type": "string"
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}