API Documentation
Complete guide to embedding movies and TV shows on your website using VidSrc. One iframe, one URL — no API key, no sign-up required.
Quick Start
<iframe
src="https://vidsrc.io/embed/movie/tt1300854"
width="100%" height="560"
frameborder="0" allowfullscreen
></iframe>
<iframe
src="https://vidsrc.io/embed/tv/1399/1/1"
width="100%" height="560"
frameborder="0" allowfullscreen
></iframe>
Custom Domain
Point your own domain to VidSrc and use it as a player URL — with reduced ads and no player branding.
player.yoursite.com/embed/movie/tt1300854
autoplay=1) works on custom domains only; the official/default domains always show a play button first.
Setup Tutorial
Point your domain DNS to VidSrc
Create a Cloudflare account and add your domain. Then go to DNS → Records and add a CNAME record:
Type: CNAME
Name: @ (root domain)
Value: vidsrc-ip.com
Proxy: Proxied (orange cloud ON)
Configure SSL in Cloudflare
In your Cloudflare dashboard, go to SSL/TLS → Overview → Configure.
Set SSL mode to Flexible
In the Configure panel, set Custom SSL/TLS to Flexible and click Save.
https://yourdomain.com/embed/movie/tt1300854/embed/movie/{id}Movie Embed
Embed a movie player by providing an IMDB ID. Returns a fully responsive, auto-updated player.
Parameters
{id}YesIMDB ID (starts with tt, e.g. tt1300854) or numeric TMDB ID.Examples
https://vidsrc.io/embed/movie/tt1300854
<iframe
src="https://vidsrc.io/embed/movie/tt1300854"
width="100%" height="560"
frameborder="0" allowfullscreen
></iframe>
/embed/tv/{id}/{season}/{episode}/embed/tv/{id}/{season}-{episode}TV Show Embed
Embed a specific episode, or the whole series with a built-in season/episode picker.
Parameters
{id}YesIMDB ID (e.g. tt0944947) or numeric TMDB ID (e.g. 1399).{season}OptionalSeason number. Omit season & episode to show the season/episode picker.{episode}OptionalEpisode number within the season.Examples
https://vidsrc.io/embed/tv/1399/1/1
<iframe
src="https://vidsrc.io/embed/tv/1399/1/1"
width="100%" height="560"
frameborder="0" allowfullscreen
></iframe>
/embed/tv/1399 (no season/episode) opens the series with a picker and resumes the last-watched episode and position automatically./embed/movie?imdb={id}Query String Format
An alternative way to pass IDs via query string instead of URL path segments. Useful for programmatic URL construction.
# Movie by IMDB
https://vidsrc.io/embed/movie?imdb=tt1300854
# TV Show by TMDB
https://vidsrc.io/embed/tv?tmdb=1399&season=1&episode=1
# TV Show by IMDB
https://vidsrc.io/embed/tv?imdb=tt0944947&season=1&episode=1
Query Parameters
All embed endpoints support optional query parameters appended to the URL for customization.
Playback
autoplay0 / 1OptionalForce autoplay on (1) or off (0). Direct autoplay (opening straight into the player with no play button) works on custom domains only — the official/default domains always show a play button first, and this param then only controls whether playback starts automatically after that click. Browsers may block unmuted autoplay; the player falls back to muted with an unmute prompt.autonext0 / 1OptionalTV only. Set 1 to auto-play the next episode when the current one ends (shows an "Up next" countdown). Works for both /embed/tv/{id} (no season/episode) and specific-episode URLs. Off by default.startAtFloatOptionalStart playback at a specific time in seconds — e.g. startAt=300 starts at 5 minutes.Subtitles
ds_langStringOptionalDefault subtitle language for auto-selection. Accepts ISO 639-1 codes (e.g. en) or 3-letter codes (e.g. eng). You can pass a comma-separated priority list of up to 3 — e.g. en,fr,de — and the player picks the first language that has a subtitle.sub_urlURLOptionalLoad your own external subtitle file (.vtt or .srt) as a selectable, auto-applied track. The file is fetched and converted to WebVTT entirely in the viewer's browser — our servers never download it — so the file's host must send CORS headers (Access-Control-Allow-Origin). Must be an https:// URL.sub_labelStringOptionalDisplay name for the sub_url track (e.g. English). Defaults to “Custom subtitle”.sub_langStringOptionalLanguage code for the sub_url track (e.g. en).Examples with Parameters
# Enable autoplay
https://vidsrc.io/embed/movie/tt1300854?autoplay=1
# English subtitles default
https://vidsrc.io/embed/movie/tt1300854?ds_lang=en
# Start at 5 minutes + autoplay
https://vidsrc.io/embed/movie/tt1300854?autoplay=1&startAt=300
# TV: auto-play next episode (whole show, starts at S1E1 / resume)
https://vidsrc.io/embed/tv/tt0944947?autonext=1
Subtitles
VidSrc automatically sources subtitles from multiple providers, plus tracks extracted from the video itself.
ds_lang to set the default language.Default Language Example
# Default subtitle language: German
https://vidsrc.io/embed/movie/tt1300854?ds_lang=de
# Priority list (max 3): try English, then French, then German —
# the player uses the first language that has a subtitle
https://vidsrc.io/embed/movie/tt1300854?ds_lang=en,fr,de
Custom Remote Subtitle (sub_url)
sub_url file is downloaded and converted to WebVTT by the viewer's browser only — our servers never fetch it (so no server IP is exposed to the file's host). Because of that, the host must allow cross-origin requests (send an Access-Control-Allow-Origin header) or the browser will block the download.# Load a custom .vtt/.srt subtitle track (label + language optional)
https://vidsrc.io/embed/movie/tt1300854?sub_url=https://example.com/subs/en.vtt&sub_label=English&sub_lang=en
Player Events
The player sends postMessage events to the parent window so your page can react to playback state — track progress, auto-load next episodes, save watch history, and more.
Event Payload
{
"type": "PLAYER_EVENT",
"data": {
"player_info": {
"imdb": "tt1300854", // IMDB ID or null
"tmdb": null, // TMDB ID or null
"mediaType": "movie", // "movie" or "tv"
"season": null, // season number (TV only)
"episode": null // episode number (TV only)
},
"player_status": "playing", // see statuses below
"player_progress": 125.4, // current time (seconds)
"player_duration": 7200 // total duration (seconds)
}
}
Player Statuses
playingPlayback starts/resumes, and every ~5 s during playback (progress updates)pausedUser pauses the videocompletedVideo reaches the endseekedUser seeks to a different positionListening for Events
window.addEventListener('message', (event) => {
if (event.data.type !== 'PLAYER_EVENT') return;
const { player_info, player_status, player_progress } = event.data.data;
switch (player_status) {
case 'playing':
// Save progress for resume
localStorage.setItem(`progress_${player_info.imdb || player_info.tmdb}`, player_progress);
break;
case 'paused':
console.log('Paused at', player_progress, 's');
break;
case 'completed':
console.log('Finished');
break;
}
});
Auto-load Next Episode
window.addEventListener('message', (event) => {
if (event.data.type !== 'PLAYER_EVENT') return;
if (event.data.data.player_status !== 'completed') return;
const { tmdb, imdb, season, episode } = event.data.data.player_info;
const id = tmdb || imdb;
const nextEp = parseInt(episode) + 1;
document.querySelector('iframe').src =
`https://vidsrc.io/embed/tv/${id}/${season}/${nextEp}`;
});
Resume Playback
Save and restore a viewer's watch position using player_progress from events and the startAt query parameter.
startAtOptionalStart at this timestamp in seconds — e.g. ?startAt=300 starts at 5 minutesSave & Restore Example
// Save progress from player events
window.addEventListener('message', (e) => {
if (e.data.type !== 'PLAYER_EVENT') return;
const { player_info, player_status, player_progress } = e.data.data;
if (player_status === 'playing') {
const id = player_info.imdb || player_info.tmdb;
localStorage.setItem(`progress_${id}`, player_progress);
}
});
// Restore position when creating the iframe
const id = 'tt1300854';
const saved = localStorage.getItem(`progress_${id}`);
const src = `https://vidsrc.io/embed/movie/${id}${saved ? `?startAt=${saved}` : ''}`;
document.querySelector('iframe').src = src;
https://vidsrc.io/embed/movie/tt1300854?startAt=300
Latest Content Lists
Paginated JSON feeds of the most recently added movies, TV shows and episodes — 50 results per page, newest first. No API key required.
/movies/latest/page-{N}.jsonLatest added movies/tvshows/latest/page-{N}.jsonLatest added TV shows/episodes/latest/page-{N}.jsonLatest added episodeshttps://vidsrc.io/movies/latest/page-1.json
Response
Every response is { "result": [ … ], "pages": <total> }. Walk the whole catalogue by requesting page-1 through page-{pages}.
{
"result": [
{
"imdb_id": "tt1300854",
"tmdb_id": "68721",
"title": "Iron Man 3 2013",
"embed_url": "https://vidsrc.io/embed/movie?imdb=tt1300854",
"embed_url_tmdb": "https://vidsrc.io/embed/movie?tmdb=68721",
"quality": "1080p",
"time_added": "2026-08-04 20:50:35"
}
],
"pages": 1833
}
Fields
imdb_idallIMDB id — e.g. tt1300854tmdb_idallTMDB id (may be null)titlemovies, tvshowsTitle with yearshow_titleepisodesSeries title with yearseason, episodeepisodesSeason and episode numbersembed_urlallReady-to-embed URL (IMDB)embed_url_tmdballReady-to-embed URL (TMDB) — present when a TMDB id existsquality, time_addedmovies, episodesBest quality label and when it was addedpagesallTotal number of pages availablepage-1 holds the newest items; higher page numbers reach further back in time.Content ID Lists
Download plain-text files containing every IMDB and TMDB ID available on VidSrc. One ID per line, updated daily, served from /ids/ with CORS enabled. Useful for syncing your catalog or building import scripts.
movie_imdb.txtAll movie IMDB IDs — format: tt1234567movie_tmdb.txtAll movie TMDB IDs — format: 385687tv_imdb.txtAll TV show IMDB IDs — format: tt0944947tv_tmdb.txtAll TV show TMDB IDs — format: 1399eps_tmdb.txtAll episode TMDB IDs — format: 314541_1x3eps_imdb.txtAll episode IMDB IDs — format: tt0944947_1x1https://vidsrc.io/ids/movie_imdb.txt