Skip to main content
GET
Movie Sources
Opens a Server-Sent Events connection and queries all configured providers in parallel. Results stream in as each provider resolves — you don’t wait for all providers to finish before playback can begin. The meta event fires first with TMDB metadata and subtitles. Each working source arrives as its own source event. A final done event closes the stream. Every url in a source event is fully qualified and already routed through the proxy. HLS sources have M3U8 segment paths rewritten — pass to hls.loadSource(). MP4 sources can be set directly as video.src.
This endpoint requires a standard or partner API key, or a session token from POST /api/auth. The public key will receive a 403 response.

Query Parameters

string
required
TMDB movie ID. Find it on themoviedb.org — it’s the number in the URL.Example: themoviedb.org/movie/550id=550
string
Comma-separated list of provider keys to query. When omitted, all active providers are queried.Example: sources=vidlink,vixsrcUse GET /api?sources_meta=1 to retrieve the full list of available provider keys.

Request


SSE Event Reference

meta

Emitted first, before any provider resolves.
string
required
Always "meta".
object | null
Raw TMDB movie metadata. null if no TMDB_API_KEY is configured on the server.
Subtitle[]
required
Available subtitle tracks. Empty array [] if none are found.

source

Emitted once per verified, working provider.
string
required
Always "source".
Source
required

done

Emitted when all providers have resolved or timed out.
string
required
Always "done".
number
required
The total number of working source events that were emitted during this stream.

Example SSE Stream


Status Codes

There is no 502 at the HTTP level for movies. If all providers fail, the stream will emit zero source events and then a done event with total: 0. Always check that you received at least one source event before attempting playback.

Notes

Pass a comma-separated list of provider keys to query only specific providers:
Keys that don’t match any active provider are silently ignored. If none of the requested keys match, the response will emit done with total: 0. Omit the parameter entirely to query all active providers.
The meta event fires almost instantly. Individual source events arrive throughout the stream as providers resolve — typically within 3–8 seconds of opening the connection. The stream closes after the slowest configured provider times out.
Sources arrive in the order providers resolve, which generally correlates with speed. Use the first source event to begin playback and queue the rest as fallbacks.
If all providers fail, you’ll receive a done event with total: 0 and no source events. Check /api/health to see which providers are up.
EventSource does not support custom headers, so you cannot send X-Session-Token through it. Use the fetch + ReadableStream approach shown in the examples above when authenticating with a session token.