Wyzie Subs

Using the Wyzie NPM Package#

The Wyzie Subs NPM package is the best way to use Wyzie Subs if your project is in JavaScript or TypeScript. Wyzie Lib (the NPM package) is fast, simple, and reliable, as well as having an onboard VTT parser for parsing subtitles into VTT format. Additionally, it has no dependencies, making it lightweight and reliable. Read the code

Installation#

npm install wyzie-lib

Usage#

import { type SubtitleData, searchSubtitles, parseToVTT } from "wyzie-lib";
 
// Fetches all subtitles for the media with the TMDB ID 286217
const data: SubtitleData[] = await searchSubtitles({ tmdb_id: 286217, format: "srt" });
console.log(data[0].id); // Prints the ID of the first subtitle object

Parameters#

For more information (or if you are stuck), please visit the Wyzie Subs homepage. If you have any questions, start there.

ParameterNameDescription
tmdb_idTmdbIdThe TMDB ID of the movie or TV show. (tmdb_id or imdb_id is required)
imdb_idImdbIdThe IMDB ID of the movie or TV show. (imdb_id or tmdb_id is required)
formatformatThe file format of the subtitles returned. (srt, txt, sub, ssa, ass)
seasonseasonDesired season of subtitles (this requires the episode parameter as well)
episodeepisodeThe episode of the given season.
languagelanguageThe ISO 3166-2 code of the provided subtitles.
encodingencodingThe character encoding of the file.
hiisHearingImpairedA boolean indicating if the subtitles are hearing impaired.

Types#

  • SearchSubtitlesParams: All valid parameters recognized by the API.
  • QueryParams: All parameters (optional and required) available for the wyzie-subs API.
  • SubtitleData: All returned values from the API with their respective types.

Our types are very simple and well-documented. Check out the types.ts file here.