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

tracker.gg-api

v1.0.0

Published

An npm package enabling integration with the Tracker.gg API

Readme

Tracker.gg API

A TypeScript/JavaScript client library for interacting with the Tracker.gg API. This package provides a comprehensive interface for accessing game statistics and player data from Tracker.gg.

Features

  • 🎮 Multiple Games Support - Apex Legends, CS:GO, Overwatch, Splitgate and more
  • 🔄 Automatic Retries - Built-in retry logic for rate-limited and failed requests
  • 🚀 Modern ESM & CJS - Supports both ES modules and CommonJS
  • 🔑 API Key Management - Easy authentication with TRN-Api-Key

Installation

npm install tracker.gg-api

or

yarn add tracker.gg-api

or

pnpm add tracker.gg-api

Quick Start

import { TrackerGGAPI } from "tracker.gg-api";

// Create an API client instance with your API key
const api = new TrackerGGAPI({
  apiKey: "your-trn-api-key-here"
});

// Get Apex Legends player stats
const apexStats = await api.tracker.getApexPlayerStats(
  "origin",
  "player-username"
);

console.log(`Player: ${apexStats.data.platformInfo.platformUserHandle}`);
console.log(`Stats:`, apexStats.data.segments);

Package Exports

The package supports sub-path imports for tree-shaking. Import from the main entry or specific modules:

| Import Path | Description | | ------------------------ | -------------------------------------------------------------- | | tracker.gg-api | Main package – TrackerGGAPI and all API modules | | tracker.gg-api/client | Base client (TrackerGGClient) for custom API implementations | | tracker.gg-api/tracker | Tracker.gg Game Stats API | | tracker.gg-api/types | Shared types and enums |

// Full import (recommended for most use cases)
import { TrackerGGAPI } from "tracker.gg-api";

// Tree-shaken imports – only include what you need
import { TrackerGGClient } from "tracker.gg-api/client";
import { TrackerAPI } from "tracker.gg-api/tracker";
import type { ApexPlayerStatsResponse } from "tracker.gg-api/types";

Configuration

You can configure the API client with custom options:

import { TrackerGGAPI } from "tracker.gg-api";

const api = new TrackerGGAPI({
  apiKey: "your-trn-api-key-here", // Your Tracker.gg API key
  baseURL: "https://public-api.tracker.gg/v2/", // Default API URL
  timeout: 10000, // Request timeout in ms (default: 10000)
  retries: 3, // Number of retry attempts (default: 3)
  retryDelay: 1000, // Delay between retries in ms (default: 1000)
  headers: {
    // Additional HTTP headers
    "Custom-Header": "value"
  }
});

Tracker.gg Game Stats API

The package provides comprehensive access to Tracker.gg game statistics:

Apex Legends

import { TrackerGGAPI } from "tracker.gg-api";

const api = new TrackerGGAPI({ apiKey: "your-api-key" });

// Get Apex Legends player stats
const stats = await api.tracker.getApexPlayerStats("origin", "username");
// Platforms: 'origin', 'psn', 'xbl'

console.log(stats.data.platformInfo);
console.log(stats.data.segments); // Game statistics

API Key

To use the Tracker.gg API, you need an API key from Tracker.gg Developers. The key should be passed in the apiKey option when creating the client.

Requirements

  • Node.js >= 16.0.0
  • npm, yarn, or pnpm
  • A valid Tracker.gg API key

Dependencies

  • axios ^1.6.0 – HTTP client

License

MIT

Links

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Author

Tazhys