# espn api

> Query ESPN's undocumented public APIs for real-time scores, stats, and betting odds across 139 leagues.

espn api is a free AI agent skill on Agensi by Sejal Dua, in APIs & Backend. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: Free
- Creator: [Sejal Dua](https://www.agensi.io/creators/sejal-dua)
- Category: [APIs & Backend](https://www.agensi.io/skills/apis-backend)
- Uses: 2
- Version: 1.0
- Last updated: 2026-09-29
- Security: scan passed (2026-09-29); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/espn-api
- Tags: api, python, sports-data, real-time-data, json-api

## About this skill

Building sports apps usually involves expensive, tiered data subscriptions. This skill enables you to query ESPN's undocumented public JSON APIs for real-time sports data without any API keys or authentication.

### What it does
- **Live Scoring** retrieves real-time scores, play-by-play data, and win probabilities across 139 leagues.
- **Roster Management** fetches complete team rosters, active athlete profiles, and career stats.
- **League Standings** pulls conference and division rankings using specialized versioned endpoints.
- **Betting Analysis** extracts odds from major providers like DraftKings, FanDuel, and BetMGM.
- **Injury Reporting** monitors league-wide injury lists and transaction wires in real-time.

### How it works
1. **Identify league slugs** by mapping the sport and league to the internal ESPN identifier.
2. **Select the domain** from six possible API domains based on whether you need core stats, CDN-hosted game packages, or site-specific scores.
3. **Construct requests** using appropriate query parameters for dates, season types, or pagination.
4. **Parse JSON** according to known response schemas to handle deeply nested sports data objects.

### Frameworks & tools
Works with any language capable of HTTP requests, including Python (`requests`, `httpx`), JavaScript (`fetch`, `axios`), and `curl`.

### Why this beats prompting it yourself
General AI models often hallucinate API endpoints or suggest outdated authenticated versions like the retired developer portal. This skill provides the specific, undocumented internal paths that power ESPN's own mobile app and web infrastructure.

### Use cases
- Build a custom live-score dashboard for a specific NFL or NBA team.
- Automate fantasy sports research by pulling player game logs and injury status.
- Monitor betting line movements across multiple sportsbooks for arbitrage.
- Create real-time news alerts for specific leagues or athletes via the Now API.

### Known limitations
As an undocumented API, ESPN may change response shapes without notice. Rate limiting is present, and high-frequency polling requires custom caching logic.

## Requires

- Node.js
- Python

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the espn api skill from Agensi" and describe your task.
3. Your agent loads the skill from Agensi when it needs it. Nothing is downloaded.

## Frequently asked questions

### Do I need a paid ESPN developer account or an API key to use this?

No, this skill leverages the same undocumented public JSON endpoints that power ESPN's official platforms, meaning you can access live sports data without any API keys, monthly subscriptions, or developer accounts.

### Which sports leagues are supported by this skill?

The skill supports 139 leagues, covering major professional sports like the NFL, NBA, MLB, and NHL, as well as international soccer, college sports, and niche leagues available on ESPN's global infrastructure.

### How does this skill handle API updates or changes to ESPN's internal structure?

Because these are internal endpoints, ESPN may update data structures without notice; however, this skill includes the specific, versioned paths and parameters required to maintain stability and minimize breakages compared to using retired public portals.

### Is this skill compatible with specific AI agents or coding frameworks?

This skill is designed for any AI agent or development environment capable of making HTTP requests, including Python, JavaScript, and specialized AI frameworks that support external tool integration.

### What exactly is included in the purchase of this skill?

You receive the precise documentation, endpoint mappings for all six API domains, and the logic required to correctly query and parse ESPN's deeply nested JSON responses for scores, stats, and betting odds.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
