Where-to-stream lookups (TMDB watch providers and the Streaming Availability API)
tmdbjustwatchstreamingapirapidapivanilla-jslocalstorage
To answer "where can I watch this?" for any movie or show, two free or freemium APIs cover nearly everything. StreamScout (~/dev/streamscout, a zero-build vanilla JS PWA, 2026-09) combines them.
TMDB (required)
- Free API key. Endpoints used:
search/multi, trending, and details withappend_to_response=watch/providers,credits(one request for everything on a detail page). - Watch providers come from JustWatch and are per country, grouped into categories (flatrate/subscription, rent, buy, free, ads). They carry no prices and no deep links.
- Accepts a v3 API key as a query parameter or a v4 read token (starts with
eyJ) as a Bearer header; support both. - Attribution required: TMDB's "uses the TMDB API but is not endorsed or certified by TMDB" line and a JustWatch credit for provider data.
Movie of the Night Streaming Availability API v4 (optional, RapidAPI)
GET /shows/movie%2F{tmdbId}?country=xx (or tv%2F...) adds what TMDB lacks: real rent/buy prices, HD/UHD quality badges, expiresSoon flags and deep links into each service. Treat it as an enhancement: if it fails or the key is missing, degrade silently to TMDB-only data.
Handling user-supplied keys in a static app
- No server: the user pastes their own keys on first run; they live only in
localStorage(alongside region and recent searches). Key fields get a show/hide toggle like any password field. - Show an explicit "not streaming in
" empty state rather than a blank list.
Testing without real keys
A QA page that loads the app with a stub script replacing both APIs with canned responses, snapshotting and restoring the real localStorage on pagehide, makes every screen (home, search, detail, empty state) screenshot-testable in headless Chrome.