API Documentation

VIPStreams · PirateMedia

Official VIPStreams REST API for live sports, live TV channels, movies, TV, and anime. Resolve stream links, embed branded HLS players, and load iframe players from https://vipstreams.pk. No authentication required for VIPStreams endpoints.

[ Quick Start ]

The API is free to use with no authentication. Base URL: https://vipstreams.pk.

  1. Pick a source alias (try prime) and a match id.
  2. Call streams to list available feeds and embedUrls.
  3. Iframe an embed path for sports, a live TV channel, a movie/TV player, or an anime player.

Basic usage

// Resolve streams for a known alias + match id
fetch('https://vipstreams.pk/api/stream/prime/rally-tv')
  .then((response) => response.json())
  .then((streams) => {
    streams.forEach((s) => console.log(s.embedUrl));
  })
  .catch((error) => console.error(error));

Available endpoints

Resource Description
/api/stream/… Stream links for events — Streams
/embed/… Live sports iframe player — Embed
/api/livetv/… /live/… Live TV channels + EPG — Live TV
/movie/… /tv/… /api/vod/hls Movie/TV HLS player + resolver — Movies & TV
/anime/… /api/anime/hls Anime iframe + HLS resolver — Anime
/api/status Health probes — Status

[ Streams ]

Live stream details for a match id. Each item includes a branded embedUrl on vipstreams.pk ready for an iframe.

GET https://vipstreams.pk/api/stream/{alias}/{id}

Stream object

interface Stream {
  id: string;
  streamNo: number;
  language: string;
  hd: boolean;
  embedUrl: string;   // https://vipstreams.pk/embed/{alias}/…
  source: string;     // Public alias
}

Source aliases

Use these public aliases in /api/stream/{alias}/{id} and /embed/{alias}/{id}/{n}. Try prime first.

Alias Endpoint
primeGET /api/stream/prime/[id]
arenaGET /api/stream/arena/[id]
stadiumGET /api/stream/stadium/[id]
courtGET /api/stream/court/[id]
silverGET /api/stream/silver/[id]
ironGET /api/stream/iron/[id]
steelGET /api/stream/steel/[id]
nitroGET /api/stream/nitro/[id]
pulseGET /api/stream/pulse/[id]
edgeGET /api/stream/edge/[id]

Replace [id] with a source-specific match id. Only letters, numbers, underscores, and hyphens.

How to use

  1. Choose an alias and match id.
  2. Request GET /api/stream/{alias}/{id}.
  3. Iframe each stream's embedUrl (or use embed paths directly).

Usage example

fetch('https://vipstreams.pk/api/stream/prime/rally-tv')
  .then((r) => r.json())
  .then((streams) => {
    streams.forEach((s) => {
      console.log(`#${s.streamNo} ${s.language} ${s.hd ? 'HD' : 'SD'}`);
      console.log(s.embedUrl);
    });
  });

Example response

[
  {
    "id": "rally-tv",
    "streamNo": 1,
    "language": "English",
    "hd": true,
    "embedUrl": "https://vipstreams.pk/embed/prime/rally-tv/1",
    "source": "prime"
  }
]

[ Live TV ]

Live TV channels with branded embed URLs, plus a TV-only EPG schedule. Schedule data is TV channels only — sports event slugs are excluded from GET /api/livetv/schedule.

Stream ids are numeric channel ids (e.g. 345, 51) for 24/7 TV. Sports event slugs (e.g. football/2026-08-08/col-sou) still play via /live/{alias}/{streamId} when you have the id, but they are excluded from the schedule UI.

Endpoints

Method Path Description
GET/api/livetv/channelsTV channels with branded embedUrl
GET/api/livetv/scheduleTV channel EPG (day × country)
GET/api/livetv/hls?channelId=518HLS resolve for numeric channel ids
GET/api/livetv/logos/*Proxied channel logos
GET/api/livetv/stream/{channelId}Single channel metadata + embed URL
GET/api/livetv/infoCatalog metadata
GET/live/{alias}/{streamId}Branded player shell

Optional query ?alias=prime on API routes sets the alias used in embedUrl paths (same aliases as sports streams).

Channel / stream object

interface LiveTvChannel {
  channel_id: string;       // sports slug e.g. "football/2026-08-08/col-sou" or numeric "518"
  channel_name: string;
  logo_url: string | null;  // poster or proxied logo (/api/livetv/logos/…)
  category?: string;        // sport slug
  category_label?: string;
  status?: "live" | "upcoming";
  startAt?: string;         // ISO8601
  stopAt?: string;
  embedUrl: string;         // https://vipstreams.pk/live/prime/{channel_id}
}

Usage example

fetch('https://vipstreams.pk/api/livetv/channels?alias=prime')
  .then((r) => r.json())
  .then(({ data }) => {
    data.slice(0, 5).forEach((ch) => {
      console.log(ch.channel_name, ch.embedUrl);
    });
  });

Example response (channels)

{
  "success": true,
  "filterType": "category",
  "count": 82,
  "categories": {
    "football": { "count": 24, "label": "Football" },
    "basketball": { "count": 3, "label": "Basketball" }
  },
  "data": [{
    "channel_id": "football/2026-08-08/col-sou",
    "channel_name": "Colchester United vs. Southampton",
    "logo_url": "https://vipstreams.pk/api/livetv/logos/…",
    "category": "football",
    "status": "live",
    "startAt": "2026-08-08T18:30:00.000Z",
    "stopAt": "2026-08-08T20:30:00.000Z",
    "embedUrl": "https://vipstreams.pk/live/prime/football/2026-08-08/col-sou"
  }]
}

Embed a sports stream

<iframe
  src="https://vipstreams.pk/live/prime/football/2026-08-08/col-sou"
  width="100%"
  height="480"
  frameborder="0"
  allow="autoplay *; encrypted-media *; picture-in-picture *; fullscreen *"
  allowfullscreen></iframe>

Embed a 24/7 channel (numeric id)

<iframe
  src="https://vipstreams.pk/live/prime/518"
  width="100%"
  height="480"
  frameborder="0"
  allow="autoplay *; encrypted-media *; picture-in-picture *; fullscreen *"
  allowfullscreen></iframe>

Numeric channel ids and sports slugs both play in the branded shell at /live/{alias}/{streamId}.

TV schedule (EPG)

Channel EPG data is available via GET /api/livetv/schedule. Direct channel playback uses /live/{alias}/{streamId}.

[ Embed ]

Embed a live sports stream in an iframe using the branded player path, or the embedUrl returned by the Streams API.

GET https://vipstreams.pk/embed/{alias}/{id}/{n}

{n} is the stream number (usually 1). IDs like ppv-… or clean slugs such as rally-tv work. The player shell loads streams via same-origin /play/live/s1/….

<div style="aspect-ratio:16/9;width:100%">
  <iframe
    src="https://vipstreams.pk/embed/prime/rally-tv/1"
    style="width:100%;height:100%;border:0"
    allowfullscreen
    allow="autoplay *; encrypted-media *; picture-in-picture *; fullscreen *"
  ></iframe>
</div>

[ Movies & TV ]

TMDB-backed movie and TV players with native HLS playback (custom controls, subtitles, cast). Use numeric TMDB ids.

GET https://vipstreams.pk/movie/{alias}/{TMDB_ID}
GET https://vipstreams.pk/tv/{alias}/{TMDB_ID}/{season}/{episode}

Iframe embed

<!-- Fight Club (TMDB 550) -->
<iframe
  src="https://vipstreams.pk/movie/prime/550"
  width="100%" height="100%"
  frameborder="0" allowfullscreen
  allow="autoplay *; encrypted-media *; picture-in-picture *; fullscreen *"
></iframe>

<!-- Breaking Bad S1E1 (TMDB 1396) -->
<iframe
  src="https://vipstreams.pk/tv/prime/1396/1/1"
  width="100%" height="100%"
  frameborder="0" allowfullscreen
  allow="autoplay *; encrypted-media *; picture-in-picture *; fullscreen *"
></iframe>

Legacy paths without an alias redirect to /movie/prime/… and /tv/prime/…. TV paths with alias but no season/episode (/tv/{alias}/{id}) redirect to season 1, episode 1. The alias is branding; HLS resolution is the same for all aliases.

Branding aliases

Same alias names as sports. For movie/TV they only affect shell branding (accent colour, labels).

Alias Example movie URL
prime/movie/prime/550
arena/movie/arena/550
stadium/movie/stadium/550
court/movie/court/550
silver/movie/silver/550
iron/movie/iron/550
steel/movie/steel/550
nitro/movie/nitro/550
pulse/movie/pulse/550
edge/movie/edge/550

HLS resolver

Returns a same-origin proxied HLS URL for custom players (hls.js, Video.js, etc.). The hosted player shell calls this automatically on load.

GET https://vipstreams.pk/api/vod/hls?kind=movie|tv&id={TMDB_ID}&s={season}&e={episode}

TV requires s (season) and e (episode). Movies omit season/episode.

interface VodHlsResponse {
  url: string;           // Proxied m3u8 on vipstreams.pk
  tracks: Array<{ file: string; label: string; kind: string; default: boolean }>;
  intro: { start: number; end: number } | null;
  outro: { start: number; end: number } | null;
}

Usage example

// Movie
fetch('https://vipstreams.pk/api/vod/hls?kind=movie&id=550')
  .then((r) => r.json())
  .then((data) => console.log(data.url));

// TV episode
fetch('https://vipstreams.pk/api/vod/hls?kind=tv&id=1396&s=1&e=1')
  .then((r) => r.json())
  .then((data) => console.log(data.url));

Prewarm & health (self-hosted)

On VPS deployments, background prewarm queues popular TMDB titles for instant playback. Useful for monitoring and batch warm jobs.

GET  https://vipstreams.pk/api/vod/health
GET  https://vipstreams.pk/api/vod/prewarm/status
POST https://vipstreams.pk/api/vod/prewarm/catalog
GET  https://vipstreams.pk/api/vod/prewarm/batch?movies=550,603&tv=1396
GET  https://vipstreams.pk/api/vod/warm?kind=movie&id=550

How to use

  1. Find the TMDB id (e.g. 550 for Fight Club) from themoviedb.org.
  2. Embed /movie/{alias}/{id} or /tv/{alias}/{id}/{s}/{e} in an iframe, or
  3. Call /api/vod/hls and pass url to your HLS player.

A 404 from /api/vod/hls usually means that title is not available yet (unreleased or very new). Not every TMDB entry is streamable.

[ Anime ]

VIPStreams-only. AniList ID, episode number, and audio track (sub or dub). The alias is for branding; playback is the same for all aliases.

GET https://vipstreams.pk/anime/{alias}/{ANILIST_ID}/{episode}/{sub|dub}
<iframe
  src="https://vipstreams.pk/anime/prime/21/1/sub"
  width="100%" height="100%"
  frameborder="0" allowfullscreen
  allow="autoplay *; encrypted-media *; picture-in-picture *; fullscreen *"
></iframe>

HLS resolver (optional)

Returns a proxied HLS manifest URL for custom players. Segments are relayed through /api/media with ad segments stripped from playlists.

GET https://vipstreams.pk/api/anime/hls?id={ANILIST_ID}&ep={episode}&type=sub|dub
interface AnimeHlsResponse {
  url: string;       // Proxied m3u8 on vipstreams.pk
  tracks: Array<{ file: string; label: string; kind: string; default: boolean }>;
  intro: { start: number; end: number } | null;
  outro: { start: number; end: number } | null;
  language: "sub" | "dub";
}
fetch('https://vipstreams.pk/api/anime/hls?id=21&ep=1&type=sub')
  .then((r) => r.json())
  .then((data) => console.log(data.url));

[ Status & Mirrors ]

GET https://vipstreams.pk/api/status
GET https://vipstreams.pk/api/check/{domain}

[ Errors ]

Status When
400 Invalid path, alias, or id characters
404 Unknown route, or no streams for a VOD title
502 Lookup or proxy failed

[ Notes ]

  • Movie/TV: HLS via /api/vod/hls; segments via /api/media.
  • CORS: JSON APIs send Access-Control-Allow-Origin: *.
  • Embeds allow framing from any origin (frame-ancestors *).
  • Short public caches on live stream responses (≈15–60s).
  • This site does not host media files.
  • Rate limits: none currently; that may change.