RapidAPI logo

AllSportDB.com

FREEMIUM
By AllSportDB
Updated 4 months ago
Sports
6.5/10
Popularity Score
636ms
Latency
100%
Success Rate

AllSportDB.com API Documentation

Get API access to information on our web site AllSportDB.com

View API Details
Main endpoint
GETGet calendar
Other endpoints
GETGet games types
GETGet sports
GETGet continents
GETGet locations
GETGet competitions
GETGet countries
GETGet regions
Flag endpoints
GETGet region flag
GETGet country flag
GETGet calendar

Returns the list of events and games (required parameters: week or dateFrom and dateTo, results limited to 50 records)

Header Parameters
X-RapidAPI-HostSTRING
REQUIRED
X-RapidAPI-KeySTRING
REQUIRED
Optional Parameters
locationIdNUMBER
OPTIONALlocation object Id, refer to Get Locations method
objectTypeNUMBER
OPTIONALobject type (1 = event, 2 = games, 0 = both)
countryIdNUMBER
OPTIONALcountry object Id, refer to Get Countries method
gamesTypeIdNUMBER
OPTIONALgames type object Id, refer to Get Games Types method
countrySTRING
OPTIONALcountry name
weekNUMBER
OPTIONALweek index (for example, 0 = this week, 1 = next week, -1 = last week, etc.)
regionSTRING
OPTIONALregion name
competitionSTRING
OPTIONALcompetition name
dateFromDATE (YYYY-MM-DD)
OPTIONALperiod start date
sportSTRING
OPTIONALsport name
regionIdNUMBER
OPTIONALregion object Id, refer to Get Regions method
gamesTypeSTRING
OPTIONALgames type name
continentSTRING
OPTIONALcontinent name
locationSTRING
OPTIONALlocation name
pageNUMBER
OPTIONALpage number in case result limit is reached
dateToDATE (YYYY-MM-DD)
OPTIONALperiod end date
competitionIdNUMBER
OPTIONALcompetition object Id, refer to Get Competitions method
continentIdNUMBER
OPTIONALcontinent object Id, refer to Get Continents method
sportIdNUMBER
OPTIONALsport object Id, refer to Get Sports method
Code Snippet
unirest.get("https://allsportdb-com.p.rapidapi.com/calendar?objectType=0")
.header("X-RapidAPI-Host", "allsportdb-com.p.rapidapi.com")
.header("X-RapidAPI-Key", "SIGN-UP-FOR-KEY")
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
Sample Response
General
Request URL: https://allsportdb-com.p.rapidapi.com/calendar
Request Method: GET
Response Headers
Response Body
Log inSign up

Install SDK for NodeJS

Installing

To utilize unirest for node.js install the the npm module:

$ npm install unirest

After installing the npm package you can now start simplifying requests like so:

var unirest = require('unirest');

Creating Request

unirest.get("https://allsportdb-com.p.rapidapi.com/calendar?objectType=0")
.header("X-RapidAPI-Host", "allsportdb-com.p.rapidapi.com")
.header("X-RapidAPI-Key", "SIGN-UP-FOR-KEY")
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
OAuth2 Authentication
Client ID
Client Secret
OAuth2 Authentication