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

football-webpages-api

v1.0.6

Published

TypeScript library for fetching football data from footballwebpages.co.uk

Downloads

675

Readme

Football Web Pages API

A TypeScript library for fetching football data from footballwebpages.co.uk.

Installation

bun add football-webpages-api cheerio parse5

Usage

import { FootballWebPages } from "football-webpages-api";

const api = new FootballWebPages();

API

Leagues

Get league table and matches:

const { table, matches } = await api.getLeague("premier-league");

Get just the league table:

const { table } = await api.getLeagueTable("premier-league");

Get just matches:

const matches = await api.getMatches("premier-league");

Competition Paths

Supported competitions (use these paths):

| Path | Competition | |------|------------| | premier-league | Premier League | | championship | Sky Bet Championship | | league-one | Sky Bet League One | | league-two | Sky Bet League Two | | national-league | Enterprise National League | | scottish-premiership | William Hill Premiership | | champions-league | UEFA Champions League | | europa-league | UEFA Europa League | | europa-conference | UEFA Europa Conference | | womens-super-league | Barclays Women's Super League | | And 70+ more... | |

Vidiprinter (Live Scores)

Get all live scores:

const matches = await api.getVidiprinter();

Get specific competitions by ID:

const matches = await api.getVidiprinter([1, 2]); // Premier League + Championship

Get specific competitions by name:

const matches = await api.getVidiprinter(["premier-league", "championship"]);

Get specific competitions by mixed ID and name:

const matches = await api.getVidiprinter(["premier-league", 2]);

Get configuration (all available competitions):

const config = await api.getVidiprinterConfig();
console.log(config.enabledCompetitions); // IDs of enabled competitions
console.log(config.allCompetitions);       // All 138 available competitions

Head to Head

const h2h = await api.getHeadToHead("arsenal", "chelsea");
console.log(h2h.summary); // { totalMatches, homeWins, draws, awayWins, ... }
console.log(h2h.matches); // Array of past matches

World Cup

const worldcup = await api.getWorldCup(2026);
console.log(worldcup.year);
console.log(worldcup.knockout);

Match Details

Get full match info including lineups and stats:

const match = await api.getMatch("/match/2025-2026/premier-league/afc-bournemouth/sunderland/529924");

console.log(match.match.homeTeam.name);
console.log(match.match.awayTeam.name);
console.log(match.match.homeScore, "-", match.match.awayScore);

// Lineups
console.log(match.lineup.home.starting); // Starting XI
console.log(match.lineup.home.substitutes);

// Stats
console.log(match.stats?.possession); // { home: 62, away: 38 }
console.log(match.stats?.shots);
console.log(match.stats?.corners);

Player Events

Player events include goals, cards, and substitutions:

match.lineup.home.starting.forEach(player => {
  console.log(player.name);
  player.events?.forEach(event => {
    console.log(event.type, event.minute);
  });
});

Types

interface Match {
  id: number;
  date: string;
  competition: Competition;
  homeTeam: Team;
  awayTeam: Team;
  homeScore?: number;
  awayScore?: number;
  path?: string;
  status: "SCHEDULED" | "LIVE" | "FINISHED" | "POSTPONED";
}

interface Team {
  id: number;
  name: string;
}

interface Competition {
  id: number;
  name: string;
  path: string;
}

interface LeagueTableEntry {
  position: number;
  team: Team;
  played: number;
  won: number;
  drawn: number;
  lost: number;
  goalsFor: number;
  goalsAgainst: number;
  goalDifference: number;
  points: number;
}

interface MatchStats {
  possession?: { home: number; away: number };
  shots?: { home: number; away: number };
  shotsOnTarget?: { home: number; away: number };
  corners?: { home: number; away: number };
  fouls?: { home: number; away: number };
  yellowCards?: { home: number; away: number };
  redCards?: { home: number; away: number };
}

interface Player {
  name: string;
  number?: number;
  events?: PlayerEvent[];
}

interface PlayerEvent {
  type: "GOAL" | "YELLOW_CARD" | "RED_CARD" | "SUBSTITUTION";
  minute: string;
}

License

MIT