Overview
Balldontlie provides access to stats data from the NBA
balldontlie is a sports & fitness API from balldontlie.io. It needs no API key. It is served over HTTPS and allows browser requests (CORS). Its OpenAPI description documents 7 endpoints.
At a glance
- Authentication
- No auth
- HTTPS
- Yes
- CORS
- Yes
- Category
- Sports & Fitness
- Base URL
https://balldontlie.io- Version
- 1.0.0
- Endpoints
- 7
- OpenAPI
- Specification ↗
- Spec updated
- 2023-03-06
Make a first request
Replace the placeholders; the documentation says exactly where credentials go.
curl -X GET "https://balldontlie.io/api/v1/games" \
-H "Accept: application/json"const response = await fetch("https://balldontlie.io/api/v1/games", {
method: "GET",
headers: {
"Accept": "application/json",
},
});
const data = await response.json();
console.log(data);import requests
response = requests.request(
"GET",
"https://balldontlie.io/api/v1/games",
headers={
"Accept": "application/json",
},
timeout=30,
)
print(response.json())Endpoints
| Method | Path | What it does |
|---|---|---|
| GET | /api/v1/games | all games (example parameters) |
| GET | /api/v1/games/32881 | specific game |
| GET | /api/v1/players | all players (search) |
| GET | /api/v1/players/237 | specific player |
| GET | /api/v1/stats | all stats (example parameters) |
| GET | /api/v1/teams | all teams |
| GET | /api/v1/teams/1 | specific team |
Questions
Does the balldontlie API need an API key?
No. The balldontlie API can be called without an API key or sign-up, which makes it handy for prototypes and front-end demos.
Can I call the balldontlie API from the browser?
Yes. The balldontlie API sends CORS headers, so a web page can call it directly with fetch().
Does the balldontlie API support HTTPS?
Yes, the balldontlie API is served over HTTPS.
How many endpoints does the balldontlie API have?
Its OpenAPI description lists 7 endpoints in version 1.0.0. All of them are shown on this page.
What are alternatives to the balldontlie API?
Other Sports & Fitness APIs include Fitbit, TheSportsDB, Cloudbet, Sportmonks Cricket, CollegeFootballData.com.
Similar sports & fitness APIs
Compare alternatives →Fitbit
Sports & FitnessYou'll fit in here. Using JavaScript, CSS, and SVG, developers now have a fast, easy way to build apps and clock faces for Fitbit OS.
TheSportsDB
Sports & FitnessCrowd-Sourced Sports Data and Artwork
Cloudbet
Sports & FitnessOfficial Cloudbet API provides real-time sports odds and betting API to place bets programmatically
Sportmonks Cricket
Sports & FitnessLive cricket score, player statistics and fantasy API
CollegeFootballData.com
Sports & FitnessUnofficial detailed American college football statistics, records, and results API
Football (Soccer) Videos
Sports & FitnessEmbed codes for goals and highlights from Premier League, Bundesliga, Serie A and many more
Listed from public-apis (MIT), public-apis database (MIT), APIs.guru (CC0).