Free NBA

FREE
By theapiguy
Updated 4 months ago
Sports
9.6/10
Popularity Score
867ms
Latency
31%
Success Rate

Free NBA API Documentation

Unofficial NBA API for Historical NBA Data

View API Details
Games
GETGet a Specific Game
GETGet All Games
Teams
GETGet All Teams
GETGet a Specific Team
Players
GETGet Specific Player
GETGet All Players
Stats
GETGet All Stats
GETGet a Specific Game

This endpoint retrieves a specific game

Header Parameters
X-RapidAPI-HostSTRING
REQUIRED
X-RapidAPI-KeySTRING
REQUIRED
Required Parameters
idSTRING
REQUIREDID of the game
Code Snippet
unirest.get("https://free-nba.p.rapidapi.com/games/{id}")
.header("X-RapidAPI-Host", "free-nba.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://free-nba.p.rapidapi.com/games/{id}
Request Method: GET
Response Headers
Response Body

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://free-nba.p.rapidapi.com/games/{id}")
.header("X-RapidAPI-Host", "free-nba.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