- Home
- Skills
- APIs & Backend
- espn api
espn api
Query ESPN's undocumented public APIs for real-time scores, stats, and betting odds across 139 leagues.
Free
Works with the AI tools you already use
espn api
Example session with this skill installed
Get the current NBA standings and show me the Python code to fetch them.
- Read your context and instructions
- Compiled the espn api
I have retrieved the logic for the ESPN Standings API. Note that the standard site/v2 endpoint returns a stub, so we must use the specific v2 sports domain for full standings data.
NBA Standings API Implementation
| Item | Value |
|---|---|
| Endpoint | https://site.api.espn.com/apis/v2/sports/basketball/nba/standings |
| Method | GET |
| Auth | None (Public) |
| Response Format | JSON |
import requests
def get_nba_standings():
"""
Fetches current NBA standings from ESPN's internal API.
Uses the v2 domain to avoid the site/v2 stub limitation.
"""
url = "https://site.api.espn.com/apis/v2/sports/basketball/nba/standings"
try:
response = requests.get(url, timeout=15)
response.raise_for_status()
data = response.json()
# Structure: children[0] is usually Eastern, children[1] Western
return data.get('children', [])
except requests.exceptions.RequestException as e:
print(f"Error fetching standings: {e}")
return None
# Example usage
standings = get_nba_standings()
if standings:
for conference in standings:
print(f"\n{conference['name']}")
for team in conference['standings']['entries']:
name = team['team']['displayName']
record = team['stats'][0]['displayValue'] # Overall record
print(f"{name}: {record}")
Next steps
- Implement a caching layer (e.g., Redis) with a 5-minute TTL as standings do not change every second.
- Parse the
statsarray to extract specific metrics like 'streak' or 'homeRecord'. - Map the
team['id']to the/teams/{id}/rosterendpoint if you need to drill down into player data.
Connects securely to your tools. The creator never sees your data.
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
- Identify league slugs by mapping the sport and league to the internal ESPN identifier.
- Select the domain from six possible API domains based on whether you need core stats, CDN-hosted game packages, or site-specific scores.
- Construct requests using appropriate query parameters for dates, season types, or pagination.
- 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.
How to install
Works the same in every agent - Claude, Cursor, Codex, Copilot and 20+ more.
- 1
Download the ZIP
Free skills download straight away. Paid skills unlock right after purchase.
- 2
Unzip into your skills folder
Every agent reads skills from one folder on your machine. Drop the unzipped folder in there.
- 3
Ask your agent to use it
Restart the agent if it was already running. It picks the skill up automatically - no config needed.
Skills folder by agent
Click the path to copy it. Create the folder if it does not exist yet.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill passes our trust checks below.
Security scanned
Passed our 8-point scan before listing
Fresh listing
Recently published to Agensi
Free forever
No account required to browse
Trust & safety
Security scanned
Verified clean today
- Free to download with an account
Needs access to