espn-api

Build URLs for querying ESPN public JSON APIs for sports data.

12|1|Updated Apr 10, 2026
One-click install
npx skills add https://github.com/sejaldua/espn-api --skill espn-api
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: espn-api
Source: https://github.com/sejaldua/espn-api/tree/main
Command: npx skills add https://github.com/sejaldua/espn-api --skill espn-api

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill helps you reliably query ESPN’s undocumented public APIs to get structured sports data without guesswork, saving time spent trial-and-error over endpoints, slugs, and response formats.

Core Features & Use Cases

  • Endpoint discovery across ESPN domains: Supports Site API, Site API v2/v3, Core API v2/v3, CDN, and Now for the right data source depending on the task.
  • Correct sport/league slug usage: Uses a comprehensive league-slug reference (including soccer dot-slugs and rugby numeric IDs) to build URLs that work.
  • Response-shape guidance + gotchas: Provides annotated schema examples and common pitfalls (standings path difference, CDN xhr=1, $ref patterns, date formatting, pagination limits, and rate-limit handling).
  • Fast operational access via helpers: Includes Python and bash CLI fetch scripts to pull common resources like scoreboards, standings, rosters, game summaries, athlete stats, injuries, odds, CDN game packages, and news.

Quick Start

Ask the AI: "Get the NBA standings for the 2025 season using the correct ESPN standings endpoint and return the standings entries."

Frequently Asked Questions about espn-api

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I query ESPN's public JSON API for live scores and standings?

Fetch ESPN sports data by constructing URLs with the correct sport/league slug and applying the v2 vs site/v2 standings path rule. The Skill provides URL-building patterns, CDN xhr=1 parameters, and Python fetch scripts to retrieve scores, rosters, and player stats accurately.

Why does my ESPN API request return an error or empty JSON response?

ESPN API requests often fail due to incorrect league slugs, missing CDN xhr=1 parameters, or wrong date/pagination formats. Using the correct sport/league slug selection and applying the documented v2 vs site/v2 path rules ensures the JSON response populates correctly.

What is the correct way to parse $ref linked objects in ESPN API responses?

Parse $ref linked objects in ESPN API responses by following the annotated schema examples to resolve references to other JSON resources. The Skill aligns parsing logic with documented JSON shapes to traverse these linked objects across Core API and CDN endpoints.

Can I use Python to fetch ESPN game summaries and player stats from the CDN?

You can use the included Python CLI fetch scripts to pull ESPN CDN game packages, game summaries, and athlete stats. These scripts apply the required xhr=1 parameter and handle pagination limits to retrieve data from the CDN endpoints.

How do I find the right ESPN league slug for soccer or rugby API endpoints?

Find ESPN league slugs for soccer and rugby using the comprehensive league-slug reference included in the Skill. Soccer uses dot-slugs while rugby uses numeric IDs, and selecting the correct slug is required to build functional API URLs.

Does the ESPN undocumented API have rate limits or pagination constraints I should know?

The ESPN undocumented API has pagination limits and requires rate-limit handling when fetching large datasets. The Skill provides guidance on applying required date and pagination parameters to manage these constraints and avoid hitting rate limits.