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

openf1-sdk

v1.0.0

Published

an sdk for interacting with openf1 api

Downloads

2

Readme

OpenF1 API Wrapper

This project is a TypeScript wrapper around axios for interacting with the OpenF1 API at https://openf1.org/. The OpenF1 API provides real-time and historical Formula 1 data, including telemetry, lap timings, driver information, and more. This wrapper simplifies making requests to the API by providing strongly-typed request and response interfaces for each endpoint.

Features

  • Simplified API interaction using OpenF1Request.
  • Strongly-typed request and response interfaces for all endpoints.
  • Supports all OpenF1 API endpoints, including car data, drivers, intervals, laps, and more.

Installation

Clone the repository and install dependencies:

pnpm install

Usage

Importing the Wrapper

import OpenF1Request from "openf1-sdk";

Examples

Fetching Car Data

The /car_data endpoint provides telemetry data for a specific car during a session.

import OpenF1Request from "openf1-sdk";

const fetchCarData = async () => {
  const response = await OpenF1Request("/car_data", {
    queryParams: {
      driver_number: 55,
      session_key: "latest",
      speed: 315,
    },
  });

  console.log(response.data);
};

fetchCarData();

Fetching Driver Information

The /drivers endpoint provides information about drivers in a session.

import OpenF1Request from "openf1-sdk";

const fetchDrivers = async () => {
  const response = await OpenF1Request("/drivers", {
    queryParams: {
      driver_number: 1,
      session_key: 9158,
    },
  });

  console.log(response.data);
};

fetchDrivers();

Fetching Lap Data

The /laps endpoint provides detailed lap data for a driver in a session.

import OpenF1Request from "openf1-sdk";

const fetchLapData = async () => {
  const response = await OpenF1Request("/laps", {
    queryParams: {
      session_key: 9161,
      driver_number: 63,
      lap_number: 8,
    },
  });

  console.log(response.data);
};

fetchLapData();

Fetching Weather Data

The /weather endpoint provides weather information for a session or meeting.

import OpenF1Request from "openf1-sdk";

const fetchWeatherData = async () => {
  const response = await OpenF1Request("/weather", {
    queryParams: {
      meeting_key: 1208,
      wind_direction: 130,
      track_temperature: 52,
    },
  });

  console.log(response.data);
};

fetchWeatherData();

Supported Endpoints

  • /car_data
  • /drivers
  • /intervals
  • /laps
  • /location
  • /meetings
  • /pit
  • /position
  • /race_control
  • /sessions
  • /stints
  • /team_radio
  • /weather