> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sportsapipro.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Betting Trends

> Get public betting trends and percentages

<Warning>
  **V1 Legacy Endpoint** — This is a V1 API endpoint. For new integrations, we recommend using the [Basketball V2 API](/api-reference/basketball-v2/overview) which provides richer data and more endpoints.
</Warning>

## Overview

Returns public betting trends showing the percentage of bets on each side for spreads, moneylines, and totals.

## Query Parameters

<ParamField query="games" type="integer" required>
  Game ID to get trends for
</ParamField>

## Code Examples

<CodeGroup>
  ```bash cURL theme={null}
  curl -X GET "https://api.sportsapipro.com/v1/basketball/trends?games=12345" \
    -H "x-api-key: YOUR_API_KEY"
  ```

  ```javascript JavaScript theme={null}
  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');
  }
  ```

  ```python Python theme={null}
  import requests

  response = requests.get(
      'https://api.sportsapipro.com/v1/basketball/trends',
      params={'games': 12345},
      headers={'x-api-key': 'YOUR_API_KEY'}
  )
  ```
</CodeGroup>

## Response Structure

<ResponseField name="trends" type="object">
  Betting trends for the game

  <Expandable title="Properties">
    <ResponseField name="gameId" type="integer">
      Game identifier
    </ResponseField>

    <ResponseField name="spread" type="object">
      Spread betting percentages

      <Expandable title="Spread">
        <ResponseField name="homePercent" type="integer">
          Percentage of bets on home
        </ResponseField>

        <ResponseField name="awayPercent" type="integer">
          Percentage of bets on away
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="moneyline" type="object">
      Moneyline betting percentages

      <Expandable title="Moneyline">
        <ResponseField name="homePercent" type="integer">
          Percentage of bets on home
        </ResponseField>

        <ResponseField name="awayPercent" type="integer">
          Percentage of bets on away
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="total" type="object">
      Total (over/under) betting percentages

      <Expandable title="Total">
        <ResponseField name="overPercent" type="integer">
          Percentage of bets on over
        </ResponseField>

        <ResponseField name="underPercent" type="integer">
          Percentage of bets on under
        </ResponseField>
      </Expandable>
    </ResponseField>
  </Expandable>
</ResponseField>

## Example Response

```json theme={null}
{
  "trends": {
    "gameId": 12345,
    "spread": {
      "homePercent": 65,
      "awayPercent": 35
    },
    "moneyline": {
      "homePercent": 72,
      "awayPercent": 28
    },
    "total": {
      "overPercent": 55,
      "underPercent": 45
    }
  }
}
```

## Use Case: Fade the Public

<Tip>
  Contrarian betting strategies look for situations where the public is heavily on one side:
</Tip>

```javascript theme={null}
// 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`);
}
```


## OpenAPI

````yaml openapi-basketball GET /trends
openapi: 3.1.0
info:
  title: SportsAPI Pro - Basketball API
  description: >-
    Professional basketball data API providing live scores, standings, player
    statistics, betting odds, and more for NBA, EuroLeague, and 50+ leagues
    worldwide.
  version: 1.0.0
  contact:
    name: SportsAPI Pro Support
    email: support@sportsapipro.com
servers:
  - url: https://api.sportsapipro.com/v1/basketball
    description: Path-based front door (recommended)
  - url: https://v1.basketball.sportsapipro.com
    description: Classic per-sport vanity host
security:
  - ApiKeyAuth: []
tags:
  - name: Games
    description: Live scores, fixtures, and game data
  - name: Competitions
    description: Leagues and tournaments
  - name: Standings
    description: League standings and rankings
  - name: Athletes
    description: Player statistics and data
  - name: Betting
    description: Betting lines, props, and predictions
  - name: Search
    description: Search entities
  - name: Account
    description: Account status and usage
paths:
  /trends:
    get:
      tags:
        - Betting
      summary: Betting Trends
      description: Get public betting trends and percentages for a game
      operationId: getBettingTrends
      parameters:
        - name: games
          in: query
          required: true
          description: Game ID
          schema:
            type: integer
            example: 12345
      responses:
        '200':
          description: Betting trends retrieved successfully
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: Your SportsAPI Pro API key

````