balldontlie API

⭐ Beginner's Pick Sports & Fitness / No Auth Required Beginner HTTPS CORS
Free to Use Varies (check documentation)

Overview

balldontlie is a completely free, no-auth-required API that provides NBA basketball statistics including player data, team information, game scores, and season averages. You do not need to sign up or provide any credentials — just make a GET request and you get data back immediately. It is one of the best beginner-friendly sports APIs for learning how to consume a REST API without any setup friction.

💡

Beginner Tip

You can call balldontlie with no API key — just open the URL in your browser to see JSON data instantly. Start with the /players endpoint to search for your favorite NBA player and explore from there.

Available Data

balldontlie data via REST API
JSON-formatted response data
Freely accessible without authentication

Example Response

JSON Response
{
  "match_id": 4521,
  "home_team": "Team A",
  "away_team": "Team B",
  "score": {
    "home": 2,
    "away": 1
  },
  "status": "Full Time",
  "date": "2025-01-15",
  "league": "Premier League"
}

Field Reference

data Array of result objects such as players, teams, or games.
data[].id Unique identifier for the player or game record.
data[].first_name Player first name.
data[].last_name Player last name.
data[].team.full_name Full name of the NBA team the player belongs to.
meta.next_cursor Cursor value to pass as cursor= parameter for fetching the next page of results.

Implementation Example

const url = "https://www.balldontlie.io/";
const response = await fetch(url);
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = await response.json();
console.log(data);

What Can You Build?

Note: These code examples are AI-generated and unverified. Always refer to the official API documentation for accurate usage.

Common Errors & Troubleshooting

404 Not Found The player or game ID in the URL does not exist in the database.
Search for the player by name first using the ?search= parameter to get the correct ID.
429 Too Many Requests The free tier allows 30 requests per minute and you have exceeded it.
Add a small delay (e.g., 2 seconds) between requests or consider upgrading to the paid plan for higher limits.
Empty data array The season or date range you queried has no matching games or stats.
Check that the season year is valid (NBA seasons span two years; use the start year, e.g., 2023 for the 2023-24 season).

Matrix Score Breakdown

🌐 Reachability 30/30
⚡ Speed 20/20
🔒 Security 15/15
🛠 Developer XP 20/20
✓ Reliability 7/15
Response Time 49ms

Fully tested on Apr 5, 2026

Technical Specifications

Auth No Auth
HTTPS REQUIRED
CORS YES
Category Sports & Fitness
Difficulty Beginner
Verified: 2026-04-04

Similar APIs

View All →