npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

flixhq-api

v1.0.4

Published

A robust Node.js API for scraping movies, TV shows, and streaming sources from FlixHQ.

Readme

FlixHQ API

A specialized Node.js library that provides an API for obtaining movie and TV show information, including metadata, seasons, episodes, and streaming sources from FlixHQ.

npm version NPM Downloads

Features

  • Home Data: Fetch trending movies, TV shows, and latest releases.
  • Search: Advanced search functionality for movies and series.
  • Stats: Retrieve real-time counts of total movies and TV shows available (with auto-caching).
  • Filters: Filter content by type (Movie/TV), Genre, Country, and Top IMDB.
  • Details: Scrape full metadata including plot, year, country, and cast.
  • Episodes: Retrieve full season and episode lists for TV series.
  • Streaming: Extract server lists and streaming sources (HLS/m3u8).

Installation

npm i flixhq-api

Quick Start

const FlixHQ = require('flixhq-api');

const flixhq = new FlixHQ();

(async () => {
  const data = await flixhq.search("The Last of Us");
  console.log(data);
})();

API Methods

Content Discovery

fetchHome()

Fetches data from the homepage, including Trending Movies, Trending TV, Latest Movies, and Latest TV.

const home = await flixhq.fetchHome();
console.log(home.trendingMovies);

fetchStats()

Fetches the total count of movies and TV shows available on the platform.

  • Note: This method includes a 6-hour cache to prevent rate-limiting and improve performance.
const stats = await flixhq.fetchStats();
/* Returns:
{
  movies: 49748,
  tv: 17223,
  total: 66971,
  last_updated: "2026-02-04T02:15:37.304Z"
}
*/

fetchMovies(page)

Fetches a list of movies.

  • page (number, optional): Default is 1.
const movies = await flixhq.fetchMovies(1);

fetchTVShows(page)

Fetches a list of TV shows.

  • page (number, optional): Default is 1.
const tvShows = await flixhq.fetchTVShows(1);

fetchTopIMDB(type, page)

Fetches content sorted by IMDB rating.

  • type (string, optional): 'all', 'movie', or 'tv'. Default 'all'.
  • page (number, optional): Default is 1.
const topRated = await flixhq.fetchTopIMDB('movie', 1);

Search & Filters

search(query)

Search for movies or TV shows by title.

const results = await flixhq.search("Breaking Bad");
// Returns: [{ id: 'breaking-bad-12345', title: 'Breaking Bad', ... }]

fetchGenres() & fetchCountries()

Returns a list of available genres and countries for filtering.

const genres = await flixhq.fetchGenres();
const countries = await flixhq.fetchCountries();

filter(type, value, page)

Filter content by specific criteria.

  • type: The filter category (e.g., 'genre', 'country').
  • value: The specific slug (e.g., 'action', 'us').
const actionMovies = await flixhq.filter('genre', 'action', 1);

Metadata & Media Info

getDetails(slug)

Get detailed information about a specific media item.

  • slug: The unique string ID (e.g., movie/watch-avatar-12345).
const info = await flixhq.getDetails("movie/watch-avatar-12345");
/* Returns:
{
  id: "12345",
  title: "Avatar",
  description: "...",
  year: 2009,
  released: "2009-12-18",
  genres: ["Action", "Sci-Fi"]
}
*/

getSeasons(slug)

Get available seasons for a TV show.

const seasons = await flixhq.getSeasons("tv/watch-stranger-things-39444");

getEpisodes(seasonId)

Get all episodes for a specific season ID.

const episodes = await flixhq.getEpisodes("12345"); // seasonId returned from getSeasons

Streaming

getServers(contentId, type)

Get available streaming servers for a movie or episode.

  • contentId: The ID of the movie or the specific episode ID.
  • type: 'movie' or 'tv'.
// For a movie
const servers = await flixhq.getServers("12345", "movie"); // id of movie

// For an episode
const servers = await flixhq.getServers("67890", "tv"); //id of episode returned from getEpisodes(seasonId)

fetchSource(serverId)

Extracts the streaming link (m3u8) for a specific server ID.

const source = await flixhq.fetchSource("54321"); // sourceID of getServers(contentId, type)
/* Returns:
{
  source: "https://.../master.m3u8",
  type: "hls",
  tracks: [],
  encrypted: false
}
*/

Dependencies

  • Axios: For HTTP requests.
  • Cheerio: For DOM parsing and scraping.

Disclaimer

This library is for educational purposes only. The authors do not endorse or promote copyright infringement. Users are responsible for ensuring they comply with local laws and terms of service of the target websites.