{"openapi":"3.1.0","info":{"title":"Watch Order API","version":"1.0.0","summary":"Watch orders for movie and TV franchises: release, chronological, curated orders and routes.","description":"Public, read-only API of Watch Order (https://watchlist.wxlter.dev). No authentication or API key. Use it to answer \"in what order should I watch X?\": list franchises, get a franchise's titles in a given watch order, look up a title, see upcoming releases, where to stream a title, and its cast. Errors are JSON with `error`, `code`, `status`, `hint` and `docs`. Versioning: the version is in the URL path (/api/v1/…); paths without it are aliases of the current version. Breaking changes ship as a new major version (/api/v2/…) and the old one keeps working for at least ${DEPRECATION_NOTICE_MONTHS} months, announced with Deprecation, Sunset and Link rel=\"successor-version\" headers. Rate limit: ${RATE_LIMIT} requests per ${RATE_WINDOW_S} seconds per client, advertised in RateLimit and RateLimit-Policy headers; over the limit you get 429 with Retry-After. Responses are cached at the CDN, so cache them on your side too. Title data comes from TMDB (this product uses the TMDB API but is not endorsed or certified by TMDB).","contact":{"name":"wxlter","email":"work@wxlter.dev","url":"https://watchlist.wxlter.dev/contact"},"termsOfService":"https://watchlist.wxlter.dev/terms"},"x-api-lifecycle":{"currentVersion":"v1","versioning":"url-path","deprecationNoticeMonths":6,"deprecationSignals":["Deprecation","Sunset","Link: rel=successor-version"],"status":"stable"},"externalDocs":{"description":"Developer guide","url":"https://watchlist.wxlter.dev/developers"},"servers":[{"url":"https://watchlist.wxlter.dev"}],"tags":[{"name":"catalog","description":"Franchises, watch orders and titles from the curated catalog."},{"name":"live","description":"Live data from TMDB: upcoming releases, streaming providers and cast."},{"name":"meta","description":"Service status."}],"paths":{"/api/v1/franchises":{"get":{"operationId":"listFranchises","tags":["catalog"],"summary":"List all franchises","description":"Every franchise in the catalog with its id, name, description, number of titles and available watch orders. Use an `id` with getFranchise.","parameters":[{"name":"lang","in":"query","required":false,"description":"Language of names and descriptions.","schema":{"type":"string","enum":["en","es"],"default":"en"}}],"responses":{"200":{"description":"All franchises","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FranchiseList"}}},"headers":{"API-Version":{"$ref":"#/components/headers/API-Version"},"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/api/v1/franchises/{id}":{"get":{"operationId":"getFranchise","tags":["catalog"],"summary":"Get a franchise in a watch order","description":"A franchise with its continuities, available orders, curated routes and the titles of one order (`order`, default the release order). Each item says how important it is (essential, recommended, optional, skippable).","parameters":[{"name":"id","in":"path","required":true,"description":"Franchise id, from listFranchises.","schema":{"type":"string","pattern":"^[a-z0-9]+(-[a-z0-9]+)*$","example":"marvel"}},{"name":"order","in":"query","required":false,"description":"Order id from `orders[].id` (e.g. release, chronological). Defaults to the release order.","schema":{"type":"string","example":"chronological"}},{"name":"lang","in":"query","required":false,"description":"Language of names and descriptions.","schema":{"type":"string","enum":["en","es"],"default":"en"}}],"responses":{"200":{"description":"The franchise and the titles of the requested order","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Franchise"}}},"headers":{"API-Version":{"$ref":"#/components/headers/API-Version"},"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"Invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"API-Version":{"$ref":"#/components/headers/API-Version"},"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"API-Version":{"$ref":"#/components/headers/API-Version"},"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/api/v1/titles/{id}":{"get":{"operationId":"getTitle","tags":["catalog"],"summary":"Get a movie or series","description":"A title's metadata (kind, release date, runtime, seasons, overview, poster, TMDB and IMDb ids) and the franchises it belongs to.","parameters":[{"name":"id","in":"path","required":true,"description":"Title id, from getFranchise (`order.items[].titleId`).","schema":{"type":"string","pattern":"^[a-z0-9]+(-[a-z0-9]+)*$","example":"avengers-endgame-2019"}},{"name":"lang","in":"query","required":false,"description":"Language of names and descriptions.","schema":{"type":"string","enum":["en","es"],"default":"en"}}],"responses":{"200":{"description":"The title","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Title"}}},"headers":{"API-Version":{"$ref":"#/components/headers/API-Version"},"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"API-Version":{"$ref":"#/components/headers/API-Version"},"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/api/v1/upcoming":{"get":{"operationId":"getUpcoming","tags":["live"],"summary":"Upcoming releases of franchises","description":"Releases, new seasons and new episodes in the next 365 days for the given franchises, with dates from TMDB.","parameters":[{"name":"franchise","in":"query","required":true,"description":"One or more franchise ids separated by commas (max 200).","schema":{"type":"string","example":"marvel,star-wars"}}],"responses":{"200":{"description":"Upcoming items sorted by date","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Upcoming"}}},"headers":{"API-Version":{"$ref":"#/components/headers/API-Version"},"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"Invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"API-Version":{"$ref":"#/components/headers/API-Version"},"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"API-Version":{"$ref":"#/components/headers/API-Version"},"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"description":"Upstream (TMDB) error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"API-Version":{"$ref":"#/components/headers/API-Version"},"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}}}}},"/api/v1/providers":{"get":{"operationId":"getProviders","tags":["live"],"summary":"Where to watch a title","description":"Streaming, free, ad-supported, rent and buy offers for a title in a country (JustWatch data via TMDB; show JustWatch attribution).","parameters":[{"name":"tmdbId","in":"query","required":true,"description":"TMDB id of the title (`tmdbId` in GET /api/v1/titles/{id}).","schema":{"type":"integer","minimum":1,"example":299534}},{"name":"type","in":"query","required":true,"description":"TMDB media type (`tmdbType` in GET /api/v1/titles/{id}).","schema":{"type":"string","enum":["movie","tv"]}},{"name":"region","in":"query","required":false,"description":"ISO 3166-1 country code.","schema":{"type":"string","pattern":"^[A-Za-z]{2}$","default":"SV","example":"US"}}],"responses":{"200":{"description":"Offers by type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Providers"}}},"headers":{"API-Version":{"$ref":"#/components/headers/API-Version"},"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"Invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"API-Version":{"$ref":"#/components/headers/API-Version"},"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"API-Version":{"$ref":"#/components/headers/API-Version"},"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"description":"Upstream (TMDB) error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"API-Version":{"$ref":"#/components/headers/API-Version"},"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}}}}},"/api/v1/credits":{"get":{"operationId":"getCredits","tags":["live"],"summary":"Main cast of a title","description":"Up to 24 cast members with the character they play (series add up all their roles).","parameters":[{"name":"tmdbId","in":"query","required":true,"description":"TMDB id of the title (`tmdbId` in GET /api/v1/titles/{id}).","schema":{"type":"integer","minimum":1,"example":299534}},{"name":"type","in":"query","required":true,"description":"TMDB media type (`tmdbType` in GET /api/v1/titles/{id}).","schema":{"type":"string","enum":["movie","tv"]}}],"responses":{"200":{"description":"Cast","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Credits"}}},"headers":{"API-Version":{"$ref":"#/components/headers/API-Version"},"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"400":{"description":"Invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"API-Version":{"$ref":"#/components/headers/API-Version"},"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"API-Version":{"$ref":"#/components/headers/API-Version"},"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"429":{"$ref":"#/components/responses/RateLimited"},"502":{"description":"Upstream (TMDB) error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"API-Version":{"$ref":"#/components/headers/API-Version"},"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}}}}},"/api/v1/health":{"get":{"operationId":"getHealth","tags":["meta"],"summary":"Service health","description":"Returns ok when the functions respond, with the deployed commit.","responses":{"200":{"description":"Healthy","content":{"application/json":{"schema":{"type":"object","required":["ok","time"],"properties":{"ok":{"type":"boolean"},"time":{"type":"string","format":"date-time"},"commit":{"type":"string"}}}}},"headers":{"API-Version":{"$ref":"#/components/headers/API-Version"},"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}}},"429":{"$ref":"#/components/responses/RateLimited"}}}}},"components":{"headers":{"API-Version":{"description":"Major version that served the response (v1).","schema":{"type":"string","example":"v1"}},"RateLimit":{"description":"Remaining quota and seconds until the window resets, e.g. `\"default\";r=59;t=42` (IETF RateLimit header fields).","schema":{"type":"string","example":"\"default\";r=59;t=42"}},"RateLimit-Policy":{"description":"The quota policy: `\"default\";q=60;w=60` is 60 requests per 60 seconds.","schema":{"type":"string","example":"\"default\";q=60;w=60"}}},"responses":{"RateLimited":{"description":"Too many requests (over 60 per 60 seconds). Wait the seconds in Retry-After.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer","minimum":1}},"API-Version":{"$ref":"#/components/headers/API-Version"},"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"schemas":{"Error":{"type":"object","required":["error","code","status","docs"],"properties":{"error":{"type":"string","description":"Human-readable message."},"code":{"type":"string","enum":["invalid_request","unauthorized","not_found","method_not_allowed","conflict","payload_too_large","rate_limited","internal_error","upstream_error"]},"status":{"type":"integer","description":"HTTP status code."},"hint":{"type":"string","description":"How to fix the request."},"docs":{"type":"string","description":"Link to the error documentation."}}},"OrderSummary":{"type":"object","required":["id","type","name"],"properties":{"id":{"type":"string"},"type":{"type":"string","enum":["release","chronological","grouped","curated"]},"name":{"type":"string"}}},"FranchiseSummary":{"type":"object","required":["id","name","description","titleCount","orders","routeCount","url","apiUrl"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"titleCount":{"type":"integer"},"orders":{"type":"array","items":{"$ref":"#/components/schemas/OrderSummary"}},"routeCount":{"type":"integer"},"url":{"type":"string","format":"uri","description":"Page in the app."},"apiUrl":{"type":"string","format":"uri"}}},"FranchiseList":{"type":"object","required":["lang","count","franchises"],"properties":{"lang":{"type":"string"},"count":{"type":"integer"},"franchises":{"type":"array","items":{"$ref":"#/components/schemas/FranchiseSummary"}}}},"OrderItem":{"type":"object","required":["position","titleId","title","kind","releaseDate","importance","continuityId"],"properties":{"position":{"type":"integer","minimum":1},"titleId":{"type":"string"},"season":{"type":"integer","description":"Present when the item is a single season of a series."},"title":{"type":"string"},"kind":{"type":"string","enum":["movie","series","special","short","one-shot","ova"]},"releaseDate":{"type":"string","format":"date"},"importance":{"type":"string","enum":["essential","recommended","optional","skippable"]},"continuityId":{"type":"string"},"section":{"type":"string","description":"Group of a grouped order (e.g. a phase)."}}},"Franchise":{"allOf":[{"$ref":"#/components/schemas/FranchiseSummary"},{"type":"object","required":["lang","continuities","order","routes"],"properties":{"lang":{"type":"string"},"continuities":{"type":"array","items":{"type":"object","required":["id","name","canonLevel"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"canonLevel":{"type":"string","enum":["main","semicanon","alternate","non-canon"]},"hiddenByDefault":{"type":"boolean"}}}},"order":{"type":"object","required":["id","type","name","items"],"properties":{"id":{"type":"string"},"type":{"type":"string"},"name":{"type":"string"},"items":{"type":"array","items":{"$ref":"#/components/schemas/OrderItem"}}}},"routes":{"type":"array","items":{"type":"object","required":["id","kind","name","description","titleIds","url"],"properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["character","theme","prep"]},"name":{"type":"string"},"description":{"type":"string"},"titleIds":{"type":"array","items":{"type":"string"},"description":"Title ids; \"id#2\" is season 2 only."},"targetTitleId":{"type":"string","description":"For prep routes: the release they prepare for."},"url":{"type":"string","format":"uri"}}}}}}]},"Title":{"type":"object","required":["lang","id","title","originalTitle","kind","releaseDate","overview","posterUrl","tmdbId","tmdbType","imdbId","franchises","url"],"properties":{"lang":{"type":"string"},"id":{"type":"string"},"title":{"type":"string"},"originalTitle":{"type":"string"},"kind":{"type":"string","enum":["movie","series","special","short","one-shot","ova"]},"releaseDate":{"type":"string","format":"date"},"runtimeMin":{"type":"integer"},"seasons":{"type":"array","items":{"type":"object","required":["number","episodes"],"properties":{"number":{"type":"integer"},"episodes":{"type":"integer"},"airDate":{"type":"string","format":"date"}}}},"ongoing":{"type":"boolean"},"overview":{"type":["string","null"]},"posterUrl":{"type":["string","null"],"format":"uri"},"tmdbId":{"type":"integer"},"tmdbType":{"type":"string","enum":["movie","tv"]},"imdbId":{"type":["string","null"]},"franchises":{"type":"array","items":{"type":"object","required":["id","name","url"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"url":{"type":"string","format":"uri"}}}},"url":{"type":"string","format":"uri"}}},"Upcoming":{"type":"object","required":["generatedAt","items"],"properties":{"generatedAt":{"type":"string","format":"date-time"},"items":{"type":"array","items":{"type":"object","required":["titleId","franchiseId","date","kind"],"properties":{"titleId":{"type":"string"},"franchiseId":{"type":"string"},"date":{"type":"string","format":"date"},"kind":{"type":"string","enum":["release","season","episode"]},"season":{"type":"integer"},"episode":{"type":"integer"}}}}}},"Provider":{"type":"object","required":["id","name","logoPath"],"properties":{"id":{"type":"integer"},"name":{"type":"string"},"logoPath":{"type":"string","description":"TMDB image path (prefix https://image.tmdb.org/t/p/w92)."}}},"Providers":{"type":"object","required":["region","link","flatrate","free","ads","rent","buy"],"properties":{"region":{"type":"string"},"link":{"type":["string","null"],"format":"uri","description":"TMDB/JustWatch page for the title in that region."},"flatrate":{"type":"array","items":{"$ref":"#/components/schemas/Provider"}},"free":{"type":"array","items":{"$ref":"#/components/schemas/Provider"}},"ads":{"type":"array","items":{"$ref":"#/components/schemas/Provider"}},"rent":{"type":"array","items":{"$ref":"#/components/schemas/Provider"}},"buy":{"type":"array","items":{"$ref":"#/components/schemas/Provider"}}}},"Credits":{"type":"object","required":["cast"],"properties":{"cast":{"type":"array","items":{"type":"object","required":["id","name","character","profilePath"],"properties":{"id":{"type":"integer"},"name":{"type":"string"},"character":{"type":"string"},"profilePath":{"type":["string","null"]},"episodes":{"type":"integer"}}}}}}}}}