Authentication, sports data API
AuthenticationOne key reads every sport on your plan. Send it in a header on every call.
Two ways to send it
Use whichever your HTTP client makes easiest. Both are read the same way.
X-API-Key: ds_live_9f2c... Authorization: Bearer ds_live_9f2c...
Keys start ds_live_. One account has one key, and it follows the plan: add a sport and the same key reads it on the next call. A key in the address, as ?api_key=, is also read, for tools that cannot set headers; prefer a header anywhere else, because addresses end up in logs.
When a key is refused
No key at all answers 401 no_key, with the two header forms in detail. A key we do not know, or one that was revoked, answers 401 bad_key. The two cases look the same on purpose.
Keep it on your server
A key sent from a web page can be read by anyone who opens that page. Call the API from your server and send your own pages what they need. The consoles in these docs are the exception: your key stays in your own browser, under datasportapi.com.api_key, and is never sent anywhere but the API.
Rotating a key
Press Rotate on your account page. A new key is made at once and the old one keeps working for 24 hours, so you can move your code across without anything stopping. The new key is written into these docs for you.
Try it
Football: Results, with your key.
{
"data": [
{
"match_id": "fb_3npnahqb09",
"league_id": "fb_9vq1mbqrgz",
"country_name": "Brazil",
"league_name": "Serie B",
"season_start_year": 2026,
"kickoff_utc": "2026-11-02T23:30:00Z",
"kickoff_date": "2026-11-02",
"kickoff_local_date": "2026-11-02",
"kickoff_local_time": "23:30",
"match_status": "finished",
"home_team_id": "fb_mw96mceske",
"home_team_name": "Goias",
"away_team_id": "fb_1cycjasdqh",
"away_team_name": "CRB",
"home_goals": 2,
"away_goals": 1,
"full_time_result": null,
"half_time_home_goals": 1,
"half_time_away_goals": 0,
"half_time_result": null,
"stoppage_minutes": null,
"is_kickoff_rescheduled": false,
"elapsed_minutes": null,
"home_league_position": 17,
"away_league_position": 18,
"away_travel_km": 1662,
"venue_name": "Estádio da Serrinha",
"city_name": "Goiânia",
"latitude": -16.635209,
"longitude": -49.265904,
"location_precision": "ground",
"daylight_minutes": 763,
"sun_elevation_deg": -29.3,
"public_holiday": null,
"kickoff_temperature_c": null,
"kickoff_rain_mm": null,
"kickoff_wind_ms": null,
"attendance": null,
"referee_name": "Felipe Fernandes de Lima",
"kickoff_book_pct": 1.0138,
"regular_time_home_goals": null,
"regular_time_away_goals": null,
"regular_time_result": null,
"extra_time_home_goals": null,
"extra_time_away_goals": null,
"shootout_home_goals": null,
"shootout_away_goals": null,
"statistics_status": null,
"best_odds": {
"home": 2.16,
"draw": 3.8,
"away": 3.55,
"book_pct": 1.0078,
"taken_utc": "2026-11-02T23:25:02Z"
},
"team_figures": null,
"statistics_reason": null
},
{
"match_id": "fb_3mg42m9pyn",
"league_id": "fb_wma271b54d",
"country_name": "Chile",
"league_name": "Primera División",
"season_start_year": 2026,
"kickoff_utc": "2026-11-02T23:30:00Z",
"kickoff_date": "2026-11-02",
"kickoff_local_date": "2026-11-02",
"kickoff_local_time": "23:30",
"match_status": "finished",
"home_team_id": "fb_hny9rc1tkt",
"home_team_name": "Concepción",
"away_team_id": "fb_ws0bbvakw5",
"away_team_name": "Palestino",
"home_goals": 1,
"away_goals": 0,
"full_time_result": null,
"half_time_home_goals": 1,
"half_time_away_goals": 0,
"half_time_result": null,
"stoppage_minutes": null,
"is_kickoff_rescheduled": false,
"elapsed_minutes": null,
"home_league_position": 11,
"away_league_position": 4,
"away_travel_km": 433,
"venue_name": "Estadio Municipal Ester Roa Concepcion",
"city_name": "Concepcion",
"latitude": -36.826944444444,
"longitude": -73.050277777778,
"location_precision": "city",
"daylight_minutes": 819,
"sun_elevation_deg": -1.7,
"public_holiday": null,
"kickoff_temperature_c": null,
"kickoff_rain_mm": null,
"kickoff_wind_ms": null,
"attendance": null,
"referee_name": null,
"kickoff_book_pct": 1.0148,
"regular_time_home_goals": null,
"regular_time_away_goals": null,
"regular_time_result": null,
"extra_time_home_goals": null,
"extra_time_away_goals": null,
"shootout_home_goals": null,
"shootout_away_goals": null,
"statistics_status": null,
"best_odds": {
"home": 2.76,
"draw": 3.5,
"away": 2.74,
"book_pct": 1.013,
"taken_utc": "2026-11-02T23:25:02Z"
},
"team_figures": null,
"statistics_reason": null
}
],
"meta": {
"sport": "football",
"endpoint": "/results",
"count": 100,
"page": 1,
"per_page": 100,
"total": 229,
"total_pages": 3,
"next_cursor": "MTc5MzYzODgwMDoxNTU1MjAw",
"next_page": 2,
"prev_page": null,
"as_of": "2026-11-02T05:16:53Z",
"cached": false,
"age_seconds": 0
}
}