{
  "openapi": "3.0.1",
  "info": {
    "title": "JustWatch + Trakt Scraper",
    "description": "Combined movies/TV scraper covering JustWatch (60+ countries, streaming-availability + offers) and Trakt (movies/shows/episodes/people, popular/trending/anticipated). One actor, two surfaces, switchable via the `platform` input.",
    "version": "1.1",
    "x-build-id": "beVnmNjf8GxVoCbWx"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/crawlerbros~justwatch-trakt-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-crawlerbros-justwatch-trakt-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~justwatch-trakt-scraper/runs": {
      "post": {
        "operationId": "runs-sync-crawlerbros-justwatch-trakt-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~justwatch-trakt-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-crawlerbros-justwatch-trakt-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": [
              "justwatch",
              "trakt"
            ],
            "type": "string",
            "description": "Which source to scrape. JustWatch = streaming availability + offers. Trakt = popular/trending/anticipated movies & shows + per-user lists.",
            "default": "justwatch"
          },
          "mode": {
            "title": "Mode",
            "enum": [
              "search",
              "byTitle",
              "byProvider",
              "popular",
              "trending",
              "anticipated",
              "byUser",
              "calendarReleases"
            ],
            "type": "string",
            "description": "What to scrape. JustWatch supports: search, byTitle (URL/path), byProvider, popular, trending. Trakt supports: search, byTitle, popular, trending, anticipated, byUser (public lists), calendarReleases.",
            "default": "popular"
          },
          "searchQuery": {
            "title": "Search query (mode=search)",
            "type": "string",
            "description": "Free-text query. Required for mode=search."
          },
          "urls": {
            "title": "Title URLs / IDs (mode=byTitle)",
            "type": "array",
            "description": "JustWatch full URLs (https://www.justwatch.com/us/movie/the-matrix) or Trakt URLs (https://trakt.tv/movies/the-matrix-1999) / Trakt slugs (e.g. `the-matrix-1999`) / Trakt numeric IDs.",
            "default": [
              "https://www.justwatch.com/us/movie/the-matrix"
            ],
            "items": {
              "type": "string"
            }
          },
          "country": {
            "title": "Country (ISO 3166-1 alpha-2)",
            "enum": [
              "US",
              "GB",
              "CA",
              "AU",
              "NZ",
              "IE",
              "ZA",
              "DE",
              "FR",
              "IT",
              "ES",
              "PT",
              "NL",
              "BE",
              "AT",
              "CH",
              "SE",
              "NO",
              "DK",
              "FI",
              "IS",
              "PL",
              "CZ",
              "SK",
              "HU",
              "RO",
              "BG",
              "GR",
              "TR",
              "RU",
              "UA",
              "EE",
              "LV",
              "LT",
              "HR",
              "SI",
              "RS",
              "BR",
              "MX",
              "AR",
              "CL",
              "CO",
              "PE",
              "VE",
              "EC",
              "BO",
              "PY",
              "UY",
              "JP",
              "KR",
              "CN",
              "TW",
              "HK",
              "SG",
              "MY",
              "TH",
              "ID",
              "PH",
              "VN",
              "IN",
              "PK",
              "AE",
              "SA",
              "EG",
              "IL",
              "MA",
              "DZ",
              "TN",
              "NG",
              "GH",
              "KE"
            ],
            "type": "string",
            "description": "Country code. JustWatch availability/offers are country-specific (60+ supported). Trakt mostly ignores country.",
            "default": "US"
          },
          "language": {
            "title": "Language (ISO 639-1)",
            "enum": [
              "en",
              "es",
              "pt",
              "fr",
              "de",
              "it",
              "nl",
              "pl",
              "sv",
              "no",
              "da",
              "fi",
              "ja",
              "ko",
              "zh",
              "ru",
              "tr",
              "el",
              "cs",
              "sk",
              "hu",
              "ro",
              "bg",
              "hr",
              "sl",
              "uk",
              "ar",
              "he",
              "hi",
              "th",
              "id",
              "ms",
              "vi",
              "tl"
            ],
            "type": "string",
            "description": "Language of returned titles/descriptions/genres. Falls back to country default if unsupported.",
            "default": "en"
          },
          "titleType": {
            "title": "Title type filter",
            "enum": [
              "all",
              "movie",
              "show",
              "episode",
              "person",
              "list"
            ],
            "type": "string",
            "description": "Restrict to movies, shows, episodes, people, or lists. Defaults to all.",
            "default": "all"
          },
          "streamingProvider": {
            "title": "Streaming provider (mode=byProvider, JustWatch)",
            "enum": [
              "netflix",
              "amazonprime",
              "disneyplus",
              "hulu",
              "max",
              "appletvplus",
              "paramountplus",
              "peacocktv",
              "starz",
              "showtime",
              "discoveryplus",
              "crunchyroll",
              "fubotv",
              "amc",
              "britbox",
              "acorntv",
              "sundancenow",
              "shudder",
              "mubi",
              "criterionchannel",
              "kanopy",
              "hoopla",
              "tubi",
              "pluto",
              "freevee",
              "youtube",
              "play",
              "itunes",
              "amazon",
              "vudu",
              "now",
              "skyshowtime",
              "canalplus",
              "rakutenviki",
              "wakanim",
              "globoplay",
              "claroplay",
              "starplus",
              "lionsgateplus",
              "nowtv",
              "videoland",
              "pathethuis",
              "sky",
              "filmin",
              "movistarplus",
              "rai",
              "mediasetinfinity",
              "telecomitalia"
            ],
            "type": "string",
            "description": "Streaming-service technical name. Use `mode=byProvider` to list titles available on this service in the chosen country. (JustWatch only.)"
          },
          "monetizationType": {
            "title": "Monetization type filter (JustWatch)",
            "enum": [
              "all",
              "FLATRATE",
              "FREE",
              "ADS",
              "RENT",
              "BUY",
              "CINEMA",
              "FAST"
            ],
            "type": "string",
            "description": "Restrict offers shown to a single monetization model.",
            "default": "all"
          },
          "objectType": {
            "title": "Object type filter (JustWatch popular/search)",
            "enum": [
              "all",
              "MOVIE",
              "SHOW"
            ],
            "type": "string",
            "description": "Filter JustWatch results to movies only, shows only, or both.",
            "default": "all"
          },
          "minYear": {
            "title": "Min release year",
            "minimum": 1900,
            "maximum": 2100,
            "type": "integer",
            "description": "Drop titles with original release year before this."
          },
          "maxYear": {
            "title": "Max release year",
            "minimum": 1900,
            "maximum": 2100,
            "type": "integer",
            "description": "Drop titles with original release year after this."
          },
          "minImdbScore": {
            "title": "Min IMDb score (JustWatch)",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Drop titles whose IMDb score is below this. JustWatch results only."
          },
          "traktClientId": {
            "title": "Trakt API key (client_id)",
            "type": "string",
            "description": "REQUIRED when platform=trakt. Free key from https://trakt.tv/oauth/applications — create an app, copy the Client ID. Trakt rejects requests without a valid key."
          },
          "traktSort": {
            "title": "Trakt sort (mode=search)",
            "enum": [
              "popularity",
              "trending",
              "rating",
              "votes",
              "recently_updated",
              "released"
            ],
            "type": "string",
            "description": "Sort order for Trakt search results. Trakt only.",
            "default": "popularity"
          },
          "traktUsername": {
            "title": "Trakt username (mode=byUser)",
            "type": "string",
            "description": "Trakt username whose public lists & list items to scrape. Trakt only."
          },
          "traktListSlug": {
            "title": "Trakt list slug (mode=byUser)",
            "type": "string",
            "description": "Optional: specific public list slug under the user. If empty, returns all public lists' metadata. Trakt only."
          },
          "calendarStartDate": {
            "title": "Calendar start date (mode=calendarReleases, Trakt)",
            "type": "string",
            "description": "ISO date (YYYY-MM-DD) for the start of the calendar window. Defaults to today."
          },
          "calendarDays": {
            "title": "Calendar days (mode=calendarReleases, Trakt)",
            "minimum": 1,
            "maximum": 31,
            "type": "integer",
            "description": "Number of days to include from the start date. 1–31.",
            "default": 7
          },
          "calendarKind": {
            "title": "Calendar kind (mode=calendarReleases, Trakt)",
            "enum": [
              "movies",
              "shows",
              "new-shows",
              "premieres",
              "dvd"
            ],
            "type": "string",
            "description": "Type of releases to include in the calendar.",
            "default": "movies"
          },
          "includeOffers": {
            "title": "Include streaming offers (JustWatch)",
            "type": "boolean",
            "description": "Whether to enrich each JustWatch title with its full offer list (which providers, rent/buy/sub, prices). Adds 1 fetch per title — slower but richer. JustWatch only.",
            "default": true
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Hard cap on number of records to push.",
            "default": 30
          },
          "autoEscalateOnBlock": {
            "title": "Auto-escalate to Apify proxy on block",
            "type": "boolean",
            "description": "If true, the actor automatically engages Apify Proxy when it hits HTTP 403/429 from a raw datacenter IP. Default true.",
            "default": true
          },
          "rehostMediaUrls": {
            "title": "Rehost JustWatch images to Apify storage (recommended)",
            "type": "boolean",
            "description": "JustWatch's image CDN (images.justwatch.com) blocks direct downloads with HTTP 400 from outside a browser session — its anti-hotlink protection rejects size profiles outside its allowlist regardless of Referer. With this on (the default), the actor downloads each poster/backdrop/provider icon once and rehosts it on Apify's Key-Value Store, so the URLs you receive in your dataset are permanent, anonymous, and downloadable from any client. The original JustWatch URL is preserved on a parallel `<field>Original` field for traceability. Turn off if you have your own browser-side image proxy and want raw upstream URLs.",
            "default": true
          },
          "proxyGroups": {
            "title": "Apify proxy groups (used on auto-escalation)",
            "type": "array",
            "description": "Apify proxy groups to use when auto-escalating. 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}