{
  "openapi": "3.0.1",
  "info": {
    "title": "Rotten Tomatoes Intelligence Scraper (Trailers + Discovery)",
    "description": "Collects Rotten Tomatoes trailers and discovery metadata for movies and TV in one actor, including scores, filters, and optional detail enrichment.",
    "version": "0.0",
    "x-build-id": "mlmpFqqaOH6ygR2Ub"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/pimi_dev~rotten-tomatoes-tv-trailers-actor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-pimi_dev-rotten-tomatoes-tv-trailers-actor",
        "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/pimi_dev~rotten-tomatoes-tv-trailers-actor/runs": {
      "post": {
        "operationId": "runs-sync-pimi_dev-rotten-tomatoes-tv-trailers-actor",
        "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/pimi_dev~rotten-tomatoes-tv-trailers-actor/run-sync": {
      "post": {
        "operationId": "run-sync-pimi_dev-rotten-tomatoes-tv-trailers-actor",
        "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": {
          "mode": {
            "title": "Mode",
            "enum": [
              "trailers",
              "discover"
            ],
            "type": "string",
            "description": "Scrape YouTube trailers or Rotten Tomatoes discovery pages.",
            "default": "discover"
          },
          "browseSection": {
            "title": "Discover section",
            "enum": [
              "movies_in_theaters",
              "movies_at_home",
              "movies_coming_soon",
              "tv_series_browse"
            ],
            "type": "string",
            "description": "Pick which Rotten Tomatoes discovery section to scrape when mode is discover.",
            "default": "movies_in_theaters"
          },
          "sort": {
            "title": "Sort",
            "enum": [
              "",
              "popular",
              "newest",
              "a_z",
              "critic_highest",
              "critic_lowest",
              "audience_highest",
              "audience_lowest",
              "box_office"
            ],
            "type": "string",
            "description": "Discovery sort order.",
            "default": "popular"
          },
          "genres": {
            "title": "Genres",
            "type": "array",
            "description": "Discovery genre filters.",
            "items": {
              "type": "string",
              "enum": [
                "action",
                "adventure",
                "animation",
                "anime",
                "biography",
                "comedy",
                "crime",
                "documentary",
                "drama",
                "entertainment",
                "faith_and_spirituality",
                "fantasy",
                "game_show",
                "lgbtq",
                "health_and_wellness",
                "history",
                "holiday",
                "horror",
                "house_and_garden",
                "kids_and_family",
                "music",
                "musical",
                "mystery_and_thriller",
                "nature",
                "news",
                "reality",
                "romance",
                "sci_fi",
                "short",
                "soap",
                "special_interest",
                "sports",
                "stand_up",
                "talk_show",
                "travel",
                "variety",
                "war",
                "western"
              ],
              "enumTitles": [
                "Action",
                "Adventure",
                "Animation",
                "Anime",
                "Biography",
                "Comedy",
                "Crime",
                "Documentary",
                "Drama",
                "Entertainment",
                "Faith & Spirituality",
                "Fantasy",
                "Game Show",
                "LGBTQ+",
                "Health & Wellness",
                "History",
                "Holiday",
                "Horror",
                "House & Garden",
                "Kids & Family",
                "Music",
                "Musical",
                "Mystery & Thriller",
                "Nature",
                "News",
                "Reality",
                "Romance",
                "Sci-Fi",
                "Short",
                "Soap",
                "Special Interest",
                "Sports",
                "Stand-Up",
                "Talk Show",
                "Travel",
                "Variety",
                "War",
                "Western"
              ]
            },
            "default": []
          },
          "ratings": {
            "title": "Ratings",
            "type": "array",
            "description": "Discovery rating filters.",
            "items": {
              "type": "string",
              "enum": [
                "g",
                "pg",
                "pg13",
                "r",
                "nc17",
                "not_rated",
                "unrated",
                "tvy",
                "tvy7",
                "tvg",
                "tvpg",
                "tv14",
                "tvma"
              ],
              "enumTitles": [
                "G",
                "PG",
                "PG-13",
                "R",
                "NC-17",
                "Not rated",
                "Unrated",
                "TV-Y",
                "TV-Y7",
                "TV-G",
                "TV-PG",
                "TV-14",
                "TV-MA"
              ]
            },
            "default": []
          },
          "audience": {
            "title": "Popcornmeter filters",
            "type": "array",
            "description": "Audience filters.",
            "items": {
              "type": "string",
              "enum": [
                "upright",
                "spilled"
              ],
              "enumTitles": [
                "Hot",
                "Stale"
              ]
            },
            "default": []
          },
          "critics": {
            "title": "Tomatometer filters",
            "type": "array",
            "description": "Critics filters.",
            "items": {
              "type": "string",
              "enum": [
                "fresh",
                "rotten"
              ],
              "enumTitles": [
                "Fresh",
                "Rotten"
              ]
            },
            "default": []
          },
          "certifiedFresh": {
            "title": "Certified Fresh only",
            "type": "boolean",
            "description": "Apply Certified Fresh filter when supported by selected section.",
            "default": false
          },
          "verifiedHot": {
            "title": "Verified Hot only",
            "type": "boolean",
            "description": "Apply Verified Hot filter when supported by selected section.",
            "default": false
          },
          "affiliates": {
            "title": "Where to watch",
            "type": "array",
            "description": "Streaming platform filters.",
            "items": {
              "type": "string",
              "enum": [
                "theaters",
                "fandango-at-home",
                "apple-tv-plus",
                "netflix",
                "prime-video",
                "disney-plus",
                "max",
                "peacock",
                "hulu",
                "paramount-plus",
                "amc-plus",
                "acorn-tv",
                "apple-tv"
              ],
              "enumTitles": [
                "Theaters",
                "Fandango at Home",
                "Apple TV+",
                "Netflix",
                "Prime Video",
                "Disney+",
                "HBO Max",
                "Peacock",
                "Hulu",
                "Paramount+",
                "AMC+",
                "Acorn TV",
                "Apple TV"
              ]
            },
            "default": []
          },
          "browsePages": {
            "title": "How many discover pages to fetch",
            "minimum": 1,
            "type": "integer",
            "description": "Number of discovery pages to fetch.",
            "default": 1
          },
          "browseStartPage": {
            "title": "Start page",
            "minimum": 1,
            "type": "integer",
            "description": "First discovery page number to fetch.",
            "default": 1
          },
          "enrichDetails": {
            "title": "Enrich discover details",
            "type": "boolean",
            "description": "When enabled (discover mode), fetch each title page for synopsis, runtime, cast, genres, and external IDs.",
            "default": true
          },
          "playlistUrls": {
            "title": "YouTube playlist URLs",
            "type": "array",
            "description": "Choose one or more Rotten Tomatoes trailer playlists to scrape in trailers mode. Items from selected playlists are combined and sorted by publish time (newest first).",
            "items": {
              "type": "string",
              "enum": [
                "https://www.youtube.com/playlist?list=PLTovKDoAy18KZ6sUQcmK2RDQeYkm2xUNt",
                "https://www.youtube.com/playlist?list=PLScC8g4bqD44fn40y9VtH5QUkPOF1MgpV",
                "https://www.youtube.com/playlist?list=PLScC8g4bqD47c-qHlsfhGH3j6Bg7jzFy-",
                "https://www.youtube.com/playlist?list=PLScC8g4bqD44EJnOXpEHpv3BGrq0AN_sR"
              ],
              "enumTitles": [
                "New TV Trailers & Exclusives",
                "Interviews",
                "HOT New Trailers & Exclusives",
                "New Trailers This Week"
              ]
            },
            "default": [
              "https://www.youtube.com/playlist?list=PLScC8g4bqD44EJnOXpEHpv3BGrq0AN_sR"
            ]
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum number of output items.",
            "default": 30
          },
          "maxContinuationPages": {
            "title": "Max continuation pages",
            "minimum": 1,
            "type": "integer",
            "description": "Safety cap for additional playlist pages loaded through YouTube continuation tokens.",
            "default": 5
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}