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

@apicity/openligadb

v0.6.2

Published

OpenLigaDB API provider for public soccer match data, metadata, standings, and scorers.

Downloads

239

Readme

@apicity/openligadb

npm dependencies TypeScript docs

OpenLigaDB API provider for public soccer match data, metadata, standings, and scorers.

OpenLigaDB is a public read-only API. createOpenLigaDB() does not take credentials, and the provider does not send auth headers.

Runtime dependencies:

  • zod@^4.4.3 — request schemas attached to endpoint methods as .schema; response schemas exported

Installation

npm install @apicity/openligadb
# or
pnpm add @apicity/openligadb

Quick Start

import { createOpenLigaDB } from "@apicity/openligadb";

const openligadb = createOpenLigaDB();

Matchdata Examples

OpenLigaDB is public and does not require an API key.

import { createOpenLigaDB } from "@apicity/openligadb";

const openligadb = createOpenLigaDB();

const match = await openligadb.getmatchdata.byId({ matchId: 68720 });

const season = await openligadb.getmatchdata.byLeagueSeason({
  leagueShortcut: "bl1",
  leagueSeason: 2024,
});

The overloaded upstream /getmatchdata paths are exposed as explicit by* methods so team, group, season, and match-id routes cannot collide.

Next Match And Team Window Examples

The next/last shortcuts return one match. Team windows return recent and upcoming matches around today, controlled by past/future week counts:

const nextMatch = await openligadb.getnextmatchbyleagueshortcut({
  leagueShortcut: "bl1",
});

const recentAndUpcoming = await openligadb.getmatchesbyteam({
  teamFilterstring: "Bayern",
  weekCountPast: 4,
  weekCountFuture: 2,
});

Standings And Scorers Examples

League standings, group tables, and top scorers share the same leagueShortcut and leagueSeason request shape:

const standings = await openligadb.getbltable({
  leagueShortcut: "bl1",
  leagueSeason: 2024,
});

const groupTable = await openligadb.getgrouptable({
  leagueShortcut: "bl1",
  leagueSeason: 2024,
});

const topScorers = await openligadb.getgoalgetters({
  leagueShortcut: "bl1",
  leagueSeason: 2024,
});

Catalog Discovery Flow

OpenLigaDB's public catalog endpoints work without credentials. A common flow is sports -> leagues -> groups, teams, and result metadata:

import { createOpenLigaDB } from "@apicity/openligadb";

const openligadb = createOpenLigaDB();

const sports = await openligadb.getavailablesports();
const leagues = await openligadb.getavailableleagues.bySeason({
  season: 2024,
});

const league = leagues.find((item) => item.leagueShortcut === "bl1");
if (league) {
  const groups = await openligadb.getavailablegroups({
    leagueShortcut: league.leagueShortcut!,
    leagueSeason: Number(league.leagueSeason),
  });
  const teams = await openligadb.getavailableteams({
    leagueShortcut: league.leagueShortcut!,
    leagueSeason: Number(league.leagueSeason),
  });
  const resultInfo = await openligadb.getresultinfos({
    leagueId: league.leagueId,
  });
}

All path-parameter methods expose request schemas via .schema, for example openligadb.getavailablegroups.schema.safeParse(input).

Errors And Scope

  • OpenLigaDB's documented public surface is read-only. This package exposes GET helpers only and never sends auth headers.
  • The public upstream docs do not document pagination parameters, rate-limit headers, or credential requirements for these routes, so this provider does not add client-side helpers for them.
  • Non-2xx responses throw OpenLigaDBError with status and body. JSON error bodies stay as parsed objects, while text/plain bodies are preserved as strings so missing-match messages are not lost.
  • Empty success bodies resolve to null; endpoint helpers with schemas expose request validation through .schema.safeParse(input).

API Reference

23 endpoints across 18 groups. Each method mirrors an upstream URL path.

getavailablegroups

GET https://api.openligadb.de/getavailablegroups/{leagueShortcut}/{leagueSeason}

Upstream docs ↗

const groups = await openligadb.getavailablegroups({ leagueShortcut: "bl1", leagueSeason: 2024 });

Source: packages/provider/openligadb/src/openligadb.ts

getavailableleagues

GET https://api.openligadb.de/getavailableleagues

Upstream docs ↗

const leagues = await openligadb.getavailableleagues();

Source: packages/provider/openligadb/src/openligadb.ts

GET https://api.openligadb.de/getavailableleagues/{season}

Upstream docs ↗

const leagues = await openligadb.getavailableleagues.bySeason({ season: 2024 });

Source: packages/provider/openligadb/src/openligadb.ts

getavailablesports

GET https://api.openligadb.de/getavailablesports

Upstream docs ↗

const sports = await openligadb.getavailablesports();

Source: packages/provider/openligadb/src/openligadb.ts

getavailableteams

GET https://api.openligadb.de/getavailableteams/{leagueShortcut}/{leagueSeason}

Upstream docs ↗

const teams = await openligadb.getavailableteams({ leagueShortcut: "bl1", leagueSeason: 2024 });

Source: packages/provider/openligadb/src/openligadb.ts

getbltable

GET https://api.openligadb.de/getbltable/{leagueShortcut}/{leagueSeason}

Upstream docs ↗

const res = await openligadb.getbltable({
  leagueShortcut: "bl1",
  leagueSeason: 2024,
});

Source: packages/provider/openligadb/src/openligadb.ts

getcurrentgroup

GET https://api.openligadb.de/getcurrentgroup/{leagueShortcut}

Upstream docs ↗

const group = await openligadb.getcurrentgroup({ leagueShortcut: "bl1" });

Source: packages/provider/openligadb/src/openligadb.ts

getgoalgetters

GET https://api.openligadb.de/getgoalgetters/{leagueShortcut}/{leagueSeason}

Upstream docs ↗

const res = await openligadb.getgoalgetters({
  leagueShortcut: "bl1",
  leagueSeason: 2024,
});

Source: packages/provider/openligadb/src/openligadb.ts

getgrouptable

GET https://api.openligadb.de/getgrouptable/{leagueShortcut}/{leagueSeason}

Upstream docs ↗

const res = await openligadb.getgrouptable({
  leagueShortcut: "bl1",
  leagueSeason: 2024,
});

Source: packages/provider/openligadb/src/openligadb.ts

getlastchangedate

GET https://api.openligadb.de/getlastchangedate/{leagueShortcut}/{leagueSeason}/{groupOrderId}

Upstream docs ↗

const changedAt = await openligadb.getlastchangedate({
  leagueShortcut: "bl1",
  leagueSeason: 2024,
  groupOrderId: 1,
});

Source: packages/provider/openligadb/src/openligadb.ts

getlastmatchbyleagueshortcut

GET https://api.openligadb.de/getlastmatchbyleagueshortcut/{leagueShortcut}

Upstream docs ↗

const match = await openligadb.getlastmatchbyleagueshortcut({ leagueShortcut: "bl1" });

Source: packages/provider/openligadb/src/openligadb.ts

getlastmatchbyleagueteam

GET https://api.openligadb.de/getlastmatchbyleagueteam/{leagueId}/{teamId}

Upstream docs ↗

const match = await openligadb.getlastmatchbyleagueteam({
  leagueId: 4500,
  teamId: 40,
});

Source: packages/provider/openligadb/src/openligadb.ts

getmatchdata

GET https://api.openligadb.de/getmatchdata/{matchId}

Upstream docs ↗

const res = await openligadb.getmatchdata.byId({ matchId: 68720 });

Source: packages/provider/openligadb/src/openligadb.ts

GET https://api.openligadb.de/getmatchdata/{leagueShortcut}/{leagueSeason}

Upstream docs ↗

const res = await openligadb.getmatchdata.byLeagueSeason({
  leagueShortcut: "bl1",
  leagueSeason: 2024,
});

Source: packages/provider/openligadb/src/openligadb.ts

GET https://api.openligadb.de/getmatchdata/{leagueShortcut}/{leagueSeason}/{groupOrderId}

Upstream docs ↗

const res = await openligadb.getmatchdata.byLeagueSeasonGroup({
  leagueShortcut: "bl1",
  leagueSeason: 2024,
  groupOrderId: 1,
});

Source: packages/provider/openligadb/src/openligadb.ts

GET https://api.openligadb.de/getmatchdata/{leagueShortcut}/{leagueSeason}/{teamFilterstring}

Upstream docs ↗

const res = await openligadb.getmatchdata.byLeagueSeasonTeam({
  leagueShortcut: "bl1",
  leagueSeason: 2024,
  teamFilterstring: "Bayern",
});

Source: packages/provider/openligadb/src/openligadb.ts

GET https://api.openligadb.de/getmatchdata/{teamId1}/{teamId2}

Upstream docs ↗

const res = await openligadb.getmatchdata.byTeams({ teamId1: 16, teamId2: 40 });

Source: packages/provider/openligadb/src/openligadb.ts

getmatchesbyteam

GET https://api.openligadb.de/getmatchesbyteam/{teamFilterstring}/{weekCountPast}/{weekCountFuture}

Upstream docs ↗

const matches = await openligadb.getmatchesbyteam({
  teamFilterstring: "Bayern",
  weekCountPast: 4,
  weekCountFuture: 2,
});

Source: packages/provider/openligadb/src/openligadb.ts

getmatchesbyteamid

GET https://api.openligadb.de/getmatchesbyteamid/{teamId}/{weekCountPast}/{weekCountFuture}

Upstream docs ↗

const matches = await openligadb.getmatchesbyteamid({
  teamId: 40,
  weekCountPast: 4,
  weekCountFuture: 2,
});

Source: packages/provider/openligadb/src/openligadb.ts

getnextmatchbyleagueshortcut

GET https://api.openligadb.de/getnextmatchbyleagueshortcut/{leagueShortcut}

Upstream docs ↗

const match = await openligadb.getnextmatchbyleagueshortcut({ leagueShortcut: "bl1" });

Source: packages/provider/openligadb/src/openligadb.ts

getnextmatchbyleagueteam

GET https://api.openligadb.de/getnextmatchbyleagueteam/{leagueId}/{teamId}

Upstream docs ↗

const match = await openligadb.getnextmatchbyleagueteam({
  leagueId: 4500,
  teamId: 40,
});

Source: packages/provider/openligadb/src/openligadb.ts

getresultinfos

GET https://api.openligadb.de/getresultinfos/{leagueId}

Upstream docs ↗

const resultInfo = await openligadb.getresultinfos({ leagueId: 4500 });

Source: packages/provider/openligadb/src/openligadb.ts

swagger

GET https://api.openligadb.de/swagger/v1/swagger.json

Upstream docs ↗

const res = await openligadb.swagger.v1.swaggerJson();

Source: packages/provider/openligadb/src/openligadb.ts

Part of the apicity monorepo.

License

MIT — see LICENSE.