Basketball V1
Betting Trends
Get public betting trends and percentages
GET
/
trends
Betting Trends
curl --request GET \
--url https://api.sportsapipro.com/v1/basketball/trends \
--header 'x-api-key: <api-key>'import requests
url = "https://api.sportsapipro.com/v1/basketball/trends"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.sportsapipro.com/v1/basketball/trends', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.sportsapipro.com/v1/basketball/trends",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.sportsapipro.com/v1/basketball/trends"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.sportsapipro.com/v1/basketball/trends")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sportsapipro.com/v1/basketball/trends")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_bodyV1 Legacy Endpoint — This is a V1 API endpoint. For new integrations, we recommend using the Basketball V2 API which provides richer data and more endpoints.
Overview
Returns public betting trends showing the percentage of bets on each side for spreads, moneylines, and totals.Query Parameters
integer
required
Game ID to get trends for
Code Examples
curl -X GET "https://api.sportsapipro.com/v1/basketball/trends?games=12345" \
-H "x-api-key: YOUR_API_KEY"
const response = await fetch(
'https://api.sportsapipro.com/v1/basketball/trends?games=12345',
{ headers: { 'x-api-key': 'YOUR_API_KEY' } }
);
const { trends } = await response.json();
// Look for contrarian opportunities
if (trends.spread.homePercent < 30) {
console.log('Contrarian play: Home team getting less than 30% of bets');
}
import requests
response = requests.get(
'https://api.sportsapipro.com/v1/basketball/trends',
params={'games': 12345},
headers={'x-api-key': 'YOUR_API_KEY'}
)
Response Structure
object
Betting trends for the game
Show Properties
Show Properties
integer
Game identifier
object
object
Example Response
{
"trends": {
"gameId": 12345,
"spread": {
"homePercent": 65,
"awayPercent": 35
},
"moneyline": {
"homePercent": 72,
"awayPercent": 28
},
"total": {
"overPercent": 55,
"underPercent": 45
}
}
}
Use Case: Fade the Public
Contrarian betting strategies look for situations where the public is heavily on one side:
// Fade the public strategy
const fadeThreshold = 70; // Fade when public is > 70%
if (trends.spread.homePercent > fadeThreshold) {
console.log(`Fade play: ${trends.spread.homePercent}% on home - consider away`);
}
Last modified on June 29, 2026
Was this page helpful?
⌘I
Betting Trends
curl --request GET \
--url https://api.sportsapipro.com/v1/basketball/trends \
--header 'x-api-key: <api-key>'import requests
url = "https://api.sportsapipro.com/v1/basketball/trends"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.sportsapipro.com/v1/basketball/trends', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.sportsapipro.com/v1/basketball/trends",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.sportsapipro.com/v1/basketball/trends"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.sportsapipro.com/v1/basketball/trends")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sportsapipro.com/v1/basketball/trends")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body