ESPN API: Free Sports Data for Scores, Stats & News
Access ESPN's hidden API endpoints for comprehensive sports data - no API key required
What is the ESPN API?
The ESPN API refers to a collection of undocumented endpoints that developers have discovered by reverse-engineering ESPN's web and mobile applications. While ESPN doesn't offer an official public API, these hidden endpoints provide free access to a wealth of sports data:
- Real-time Scores: Live scoreboards across all major sports
- Team & Player Stats: Comprehensive statistics and performance data
- News & Headlines: Latest sports news articles
- Standings & Rankings: League standings and power rankings
- Game Summaries: Play-by-play data, box scores, and game details
- Schedules: Upcoming games and event calendars
Key Benefits
- Free Access: No subscription or payment required
- No Authentication: No API key or token needed
- JSON Responses: Clean, structured data format
- Comprehensive Coverage: All major US sports plus international soccer
API Base URLs
ESPN's hidden API uses several base domains, each serving different types of data:
| Domain | Purpose |
|---|---|
site.api.espn.com |
General site data - scores, news, teams, standings |
sports.core.api.espn.com |
Core sports data - athletes, detailed stats, odds, venues |
site.web.api.espn.com |
Web-specific APIs - search, game summaries, athlete overviews |
fantasy.espn.com |
Fantasy sports data (may require authentication for private leagues) |
cdn.espn.com |
Content delivery - optimized for speed and caching |
Supported Sports & Leagues
The ESPN API covers a wide range of sports and leagues. Here are the most commonly used:
Football
- NFL (
football/nfl) - College Football (
football/college-football)
Basketball
- NBA (
basketball/nba) - WNBA (
basketball/wnba) - Men's CBB (
basketball/mens-college-basketball) - Women's CBB (
basketball/womens-college-basketball)
Baseball
- MLB (
baseball/mlb) - College Baseball (
baseball/college-baseball)
Hockey
- NHL (
hockey/nhl)
Soccer
- MLS (
soccer/usa.1) - Premier League (
soccer/eng.1) - La Liga (
soccer/esp.1) - And many more...
Other Sports
- Golf
- Tennis
- MMA/UFC
- Racing
Key Endpoints
Most endpoints follow a consistent pattern: /apis/site/v2/sports/{sport}/{league}/{endpoint}
| Endpoint | Description | Example |
|---|---|---|
/scoreboard |
Live scores and game status | /sports/football/nfl/scoreboard |
/news |
Latest news articles | /sports/basketball/nba/news |
/teams |
All teams in a league | /sports/baseball/mlb/teams |
/teams/{id} |
Specific team details | /sports/football/nfl/teams/12 |
/summary |
Game details with box score | /sports/basketball/nba/summary?event=401234567 |
/standings |
League standings | /sports/hockey/nhl/standings |
/rankings |
Power rankings (college) | /sports/football/college-football/rankings |
Common Query Parameters
| Parameter | Description | Example |
|---|---|---|
dates |
Filter by date (YYYYMMDD format) | ?dates=20251201 |
limit |
Maximum number of results | ?limit=50 |
season |
Specific season year | ?season=2025 |
seasontype |
Season type (1=preseason, 2=regular, 3=postseason) | ?seasontype=2 |
week |
Specific week (football) | ?week=10 |
groups |
Conference/division filter | ?groups=80 (FBS) |
Code Examples
Here are practical examples for fetching data from the ESPN API:
Get NFL Scores
// Fetch today's NFL scores
fetch('https://site.api.espn.com/apis/site/v2/sports/football/nfl/scoreboard')
.then(response => response.json())
.then(data => {
data.events.forEach(game => {
console.log(game.name, game.status.type.description);
});
});
import requests
# Fetch today's NFL scores
url = 'https://site.api.espn.com/apis/site/v2/sports/football/nfl/scoreboard'
response = requests.get(url)
data = response.json()
for game in data['events']:
print(game['name'], game['status']['type']['description'])
# Fetch today's NFL scores curl 'https://site.api.espn.com/apis/site/v2/sports/football/nfl/scoreboard'
Get NBA Game Summary
// Fetch detailed game data (replace eventId with actual game ID)
const eventId = '401584793';
const url = `https://site.web.api.espn.com/apis/site/v2/sports/basketball/nba/summary?event=${eventId}`;
fetch(url)
.then(response => response.json())
.then(data => {
console.log('Boxscore:', data.boxscore);
console.log('Play-by-play:', data.plays);
});
import requests
# Fetch detailed game data
event_id = '401584793'
url = f'https://site.web.api.espn.com/apis/site/v2/sports/basketball/nba/summary?event={event_id}'
response = requests.get(url)
data = response.json()
print('Boxscore:', data.get('boxscore'))
print('Play-by-play:', data.get('plays'))
Get Scores for Specific Date
// Fetch MLB scores for a specific date
const date = '20251001'; // YYYYMMDD format
fetch(`https://site.api.espn.com/apis/site/v2/sports/baseball/mlb/scoreboard?dates=${date}`)
.then(response => response.json())
.then(data => console.log(data));
Limitations & Considerations
Important: Unofficial API
The ESPN API is not officially supported. Keep these limitations in mind:
- No Official Documentation: These endpoints are undocumented and discovered through reverse engineering
- No Stability Guarantee: ESPN can modify or remove endpoints at any time without notice
- Unknown Rate Limits: There's no published information about rate limiting or usage quotas
- No Support: ESPN does not provide developer support for these endpoints
- Terms of Service: Heavy automated usage may violate ESPN's terms of service
Recommendations
- For Hobby Projects: The ESPN API works great for personal projects, learning, and experimentation
- For Production Apps: Consider official sports data providers for applications requiring guaranteed uptime and support
- Error Handling: Implement robust error handling since endpoints may change unexpectedly
- Caching: Cache responses to reduce API calls and improve reliability
Community Resources
These community-maintained resources provide additional documentation and tools for working with the ESPN API:
ESPN API GitHub Repository
Comprehensive community documentation with endpoint references and examples
ESPN Hidden API Gist
Original endpoint discovery documentation with URL patterns for multiple sports
ESPN API Tutorial
Step-by-step guide on accessing ESPN's free sports data endpoints
ESPN Hidden API Guide
Getting started guide with best practices and common use cases
GPWA Forum Discussion
Community forum thread with additional endpoint discoveries and tips
Frequently Asked Questions
https://site.api.espn.com/apis/site/v2/sports/basketball/nba/scoreboard. The response includes all games for the current day with scores, team info, and game status. Add ?dates=YYYYMMDD to get scores for a specific date.Need More Reliable Sports Data?
While the ESPN API is great for hobby projects, production applications often need guaranteed uptime and official support. Compare professional sports data providers in our directory.