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

bfv-api

v1.4.0

Published

Unofficial TypeScript/JavaScript client for the Bavarian Football Association (BFV) API

Readme

bfv-api-js

Unofficial TypeScript and JavaScript client for the Bavarian Football Association (BFV) Widget API. This project is not affiliated with the BFV.

npm version license

Installation

# pnpm
pnpm add bfv-api

# npm
npm install bfv-api

# yarn
yarn add bfv-api

Usage

1. List Matches for a Team

The teamPermanentId can be found in the URL on the official BFV team page: https://www.bfv.de/mannschaften/<my-team-name>/<team-permanent-id>

import { bfvApi, type Match, type Team } from "bfv-api";

const teamPermanentId = "016PD5QT70000000VV0AG811VTE5EA5R";

const { data } = await bfvApi.listMatches({
  params: { teamPermanentId },
});

console.log(data.team.name);
data.matches.forEach((match: Match) => {
  console.log(`${match.kickoffDate} ${match.kickoffTime}: ${match.homeTeamName} vs ${match.guestTeamName} (${match.result})`);
});

2. Get League Table / Standings

The compoundId represents the competition and can be found in match/team responses or the BFV competition URL:

import { bfvApi, type TableEntry } from "bfv-api";

const compoundId = "03135AVG8S000008VS5489BTVU7GTVLE-G";

const { data } = await bfvApi.getCompetitionTable({
  params: { compoundId },
});

console.log(`Table for ${data.competitionName}:`);
data.table?.forEach((entry: TableEntry) => {
  console.log(`${entry.position}. ${entry.team?.name} - ${entry.points} pts (${entry.matchesWon}-${entry.matchesDrawn}-${entry.matchesLost})`);
});

3. Get Competition Info

const { data } = await bfvApi.getCompetitionInformation({
  params: { compoundId: "03135AVG8S000008VS5489BTVU7GTVLE-G" },
});

console.log(data.competitionBreadcrumb);
// "Meisterschaften | Herren | Kreisliga | Kreis Schweinfurt"

4. Get Team & Club Information

// Team info
const teamInfo = await bfvApi.getTeamInformation({
  params: { teamPermanentId: "016PD5QT70000000VV0AG811VTE5EA5R" },
});

// Club info by team ID
const clubInfo = await bfvApi.getClubInformation({
  queries: { teamPermanentId: "016PD5QT70000000VV0AG811VTE5EA5R" },
});

// Club info by club ID
const clubById = await bfvApi.getClubInformationById({
  params: { clubId: "00ES8GNLE0000009VV0AG08LVUPGND5I" },
});

5. Custom Client Factory

If you need custom Axios/Zodios configuration or request interception:

import { createApiClient } from "bfv-api";

const customClient = createApiClient("https://widget-prod.bfv.de/api/service/widget/v1", {
  axiosConfig: {
    timeout: 5000,
  },
});

Exported Types

All schemas are backed by Zod and exported as TypeScript types:

  • Match
  • Team
  • ClubInformation
  • TableEntry
  • Schemas (Zod schema map)

Contributing

  1. Update the OpenAPI schema in bfv_schema.yaml if endpoints change.
  2. Run pnpm run generate to regenerate the typed Zodios client.
  3. Run pnpm test to verify against the live BFV API.
  4. Run pnpm changeset to document the change.
  5. Open a Pull Request into main. Once merged, the version PR and automated npm release will be handled by GitHub Actions.