Skip to content

About

OpenAPI specs plus Python and JavaScript examples for AllSportsAPI, FootAPI, TennisAPI and live sports data: live scores, fixtures, standings, odds, players and shotmaps. Football, soccer, tennis, basketball, hockey, cricket and esports.

Topics

Resources

Stars

4 stars

Watchers

1 watching

Forks

Latest commit

 

History

118 Commits

Folders and files

Repository files navigation

AllSportsAPI — sports data API examples for football, tennis, basketball, live scores, OpenAPI, Python and JavaScript

AllSportsAPI — Sports data API examples (football, tennis, basketball, live scores)

OpenAPI specs and copy-paste Python / JavaScript examples for Recodex sports data APIs: live scores, fixtures, standings, odds, lineups, players, and shotmaps. Covers football/soccer, tennis, basketball, ice hockey, cricket, esports, and more.

License: MIT Python JavaScript OpenAPI RapidAPI

What's in this repository

Product What you get Start here
AllSportsAPI Multi-sport live and historical data — scores, fixtures, standings, odds, players, media, shotmaps allsportsapi/README.md
Live Sports Data API Scoreboards, feeds, tournaments, matches, rankings, news, GraphQL hashes flashscore/README.md
SKAlpha Market data, news, symbols, screeners, fundamentals skalpha/README.md

Subscribe on RapidAPI (every sport API plus the All Sports bundle) or API.market (complete All Sports bundle).

AllSportsAPI sports

Same authentication, response shapes, and endpoint structure across every sport. Learn one API and you know them all.

Sport RapidAPI Host (X-RapidAPI-Host)
All Sports (bundle) allsportsapi2 allsportsapi2.p.rapidapi.com
Football / Soccer footapi7 footapi7.p.rapidapi.com
Tennis tennisapi1 tennisapi1.p.rapidapi.com
Basketball basketapi1 basketapi1.p.rapidapi.com
Ice Hockey icehockeyapi icehockeyapi.p.rapidapi.com
American Football americanfootballapi americanfootballapi.p.rapidapi.com
Baseball baseballapi baseballapi.p.rapidapi.com
Cricket cricketapi21 cricketapi21.p.rapidapi.com
Esports esportapi1 esportapi1.p.rapidapi.com
Motorsport motorsportapi motorsportapi.p.rapidapi.com
Rugby rugbyapi2 rugbyapi2.p.rapidapi.com
Volleyball volleyballapi volleyballapi.p.rapidapi.com
Handball handballapi handballapi.p.rapidapi.com
MMA mmaapi mmaapi.p.rapidapi.com

Always copy the exact host from the RapidAPI Endpoints tab for the API you subscribed to.

Quick start

Every request needs two headers: X-RapidAPI-Key (your key) and X-RapidAPI-Host (the sport you are calling). Keep the key on the server — never ship it in browser or mobile code.

cURL

curl --request GET \
  --url 'https://footapi7.p.rapidapi.com/api/matches/live' \
  --header 'X-RapidAPI-Key: YOUR_API_KEY' \
  --header 'X-RapidAPI-Host: footapi7.p.rapidapi.com'

Python

import os, requests

url = "https://footapi7.p.rapidapi.com/api/matches/live"
headers = {
    "X-RapidAPI-Key": os.environ["RAPIDAPI_KEY"],
    "X-RapidAPI-Host": "footapi7.p.rapidapi.com",
}

resp = requests.get(url, headers=headers, timeout=15)
resp.raise_for_status()
print(len(resp.json().get("events", [])), "live matches")

JavaScript

const res = await fetch("https://footapi7.p.rapidapi.com/api/matches/live", {
  headers: {
    "X-RapidAPI-Key": process.env.RAPIDAPI_KEY,
    "X-RapidAPI-Host": "footapi7.p.rapidapi.com",
  },
});
const data = await res.json();
console.log(data.events?.length, "live matches");

Runnable clients and a server-side proxy: allsportsapi/Examples. Full authentication notes, data model, and workflows: allsportsapi/README.md.

Examples

Example Python JavaScript What it shows
Quickstart quickstart.py quickstart.js Auth → live matches → parse events
Server proxy server_proxy_flask.py server_proxy_express.js Keep the API key off the client
Match clock match_clock.py match_clock.js Elapsed time, added time, display clock
List all leagues list_all_leagues.py list_all_leagues.js Categories → tournaments tree
Timezone schedule filter_schedule_by_timezone.py filter_schedule_by_timezone.js Local-day filter (DST-safe)

Sport-specific demos: football heatmap / shotmap, basketball shotmap, tennis cup trees.

OpenAPI specs

Import into Swagger UI, Postman, Insomnia, or a client generator.

Docs map

License

MIT. See LICENSE.

About

OpenAPI specs plus Python and JavaScript examples for AllSportsAPI, FootAPI, TennisAPI and live sports data: live scores, fixtures, standings, odds, players and shotmaps. Football, soccer, tennis, basketball, hockey, cricket and esports.

Topics

Resources

Stars

4 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages