# NBA shot chart API

Get NBA Shot Chart data via REST or OpenAny MCP—with pay-per-use pricing and no subscription. Powered by Apish, pass parameters such as limit, output, player, and retrieve structured data including shooter display name, action type, court zone classification, court horizontal coordinate, and court vertical coordinate to render interactive court heatmaps, and audit single-game shot selection.

Documentation: https://openany.si/nba/nba-shot-chart-api/d28d90bf-b89c-483f-b5e1-0baea1255d4d/
API ID: d28d90bf-b89c-483f-b5e1-0baea1255d4d
Provider: apish
Contract revision: 3
Method: GET
Endpoint: https://api.openany.si/v1/agent-apis/apish/nba/v1/shots
Page update time: 2026-12-03T02:55:47.323Z
Access: OpenAny REST
OpenAny MCP: availability is not supplied by this REST contract. Check get_api on the configured OpenAny MCP server before execution.
Request content type: none
Execution mode: sync
Authentication: Authorization: Bearer $OPENANY_API_KEY

## Billing
Price: $0.002 / billing credit
API-key calls use your shared balance. Review the published billing rules before making a paid request.
Price source: OpenAny public API contract.
Contract update time: 2026-12-03T02:55:46.321Z. This is not a price-change timestamp.
```json
{
  "currency": "USD",
  "mode": "rules",
  "parameters": [],
  "policy_version": 2,
  "sale": {
    "addons": [],
    "base_price_micro_usd": "0",
    "max_cost_micro_usd": "2000",
    "quantities": [
      {
        "id": "upstream_credits",
        "label": "Actual API.SH credits consumed",
        "max_quantity": "1",
        "measure": "value",
        "pointer": "/credits_used",
        "price_micro_usd": "2000",
        "quantity_scale": 0,
        "source": "response",
        "unit": "credit",
        "unit_quantity": "1"
      }
    ],
    "rounding": "ceil",
    "variants": []
  }
}
```

## Usage and limits
## NBA Shot Chart API

Query NBA shot attempts using optional player (ID or nba.com link), team, game\_id, season, season\_type, context\_measure (FGA, FGM, FG3A, FG3M or PTS), split filters (opponent, location, outcome, period, month, last\_n\_games, date range), page and limit (1-2000, default 500).

## What You Can Build

- **Render interactive court heatmaps**: Plot shots\[\].loc\_x, shots\[\].loc\_y and shot\_made\_flag onto a half-court SVG or Canvas visual.
- **Benchmark player vs. league zone accuracy**: Compare a player's zone shooting percentages against league\_averages\[\] returned in the same payload.
- **Audit single-game shot selection**: Pass game\_id and player or team to inspect every shot attempt by quarter and remaining clock.

## Returned Data

| Field | Meaning |
| --- | --- |
| `summary.attempts` | Total shot attempts in the filtered set |
| `summary.made` | Total made shots in the filtered set |
| `summary.fg_pct` | Overall field goal percentage for the set |
| `shots[].game_id` | Game identifier for the shot |
| `shots[].player_name` | Shooter display name |
| `shots[].action_type` | Specific shot type such as Jump Shot or Layup |
| `shots[].shot_zone_basic` | Court zone classification |
| `shots[].shot_distance` | Shot distance from the hoop in feet |
| `shots[].loc_x` | Court horizontal coordinate |
| `shots[].loc_y` | Court vertical coordinate |

## Request parameters
```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "NBA shot chart API request inputs",
  "$comment": "Declared input types grouped by HTTP location. Path, query and header values describe decoded inputs and are serialized as text on the wire; body is the payload. This is not an exhaustive provider contract or a schema for the raw HTTP request.",
  "type": "object",
  "properties": {
    "path": {
      "type": "object",
      "properties": {}
    },
    "query": {
      "type": "object",
      "properties": {
        "player": {
          "type": "string",
          "description": "Player id (or nba.com player link)."
        },
        "team": {
          "type": "string",
          "description": "Team abbreviation (`LAL`, `BOS` ...) or nickname."
        },
        "game_id": {
          "type": "string",
          "description": "Only this game."
        },
        "season": {
          "type": "string",
          "description": "Season as `2025-26` or its first year `2025`; the current season by default."
        },
        "season_type": {
          "type": "string",
          "description": "`regular` (default), `playoffs`, `preseason`, `play-in`, `cup` (NBA Cup) or `all-star`.",
          "enum": [
            "regular",
            "playoffs",
            "preseason",
            "play-in",
            "cup",
            "all-star"
          ]
        },
        "context_measure": {
          "type": "string",
          "description": "`FGA` (default), `FGM`, `FG3A`, `FG3M` or `PTS`.",
          "enum": [
            "FGA",
            "FGM",
            "FG3A",
            "FG3M",
            "PTS"
          ]
        },
        "opponent": {
          "type": "string",
          "description": "Only against this team."
        },
        "location": {
          "type": "string",
          "description": "`home` or `road`.",
          "enum": [
            "home",
            "road"
          ]
        },
        "outcome": {
          "type": "string",
          "description": "`W` or `L`.",
          "enum": [
            "W",
            "L"
          ]
        },
        "period": {
          "type": "integer",
          "description": "Only this period."
        },
        "month": {
          "type": "integer",
          "description": "Month of the season (1 = October)."
        },
        "last_n_games": {
          "type": "integer",
          "description": "Only the last N games."
        },
        "start_date": {
          "type": "string",
          "description": "From date (YYYY-MM-DD)."
        },
        "end_date": {
          "type": "string",
          "description": "To date (YYYY-MM-DD)."
        },
        "page": {
          "type": "integer",
          "description": "Page number, from 1."
        },
        "limit": {
          "type": "integer",
          "description": "Shots per page (1-2000, default 500)."
        },
        "raw": {
          "type": "string",
          "description": "0 leaves out the bulky `raw` source blocks (often 10-30x smaller).",
          "enum": [
            "0",
            "1"
          ]
        },
        "fields": {
          "type": "string",
          "description": "Comma-separated fields to return, e.g. `posts.id,posts.title`. Call metadata is always included."
        },
        "fresh": {
          "type": "string",
          "description": "1 skips the 24-hour cache and fetches live.",
          "enum": [
            "1"
          ]
        },
        "output": {
          "type": "string",
          "description": "JSON only for this OpenAny product. Omit output or use json; CSV and NDJSON are not supported.",
          "enum": [
            "json"
          ]
        },
        "records": {
          "type": "string",
          "description": "With output=csv|ndjson: the top-level list to turn into rows (e.g. `reviews`), or `.` for the whole object as one row."
        }
      }
    },
    "headers": {
      "type": "object",
      "properties": {}
    }
  },
  "required": [
    "path",
    "query",
    "headers"
  ]
}
```

## Response fields
Source: Inferred from examples; not an exhaustive provider schema.
```json
{
  "type": "object",
  "properties": {
    "applied_filters": {
      "type": "object",
      "properties": {
        "context_measure": {
          "type": "string"
        },
        "end_date": {
          "type": "null"
        },
        "game_id": {
          "type": "null"
        },
        "location": {
          "type": "null"
        },
        "outcome": {
          "type": "null"
        },
        "period": {
          "type": "null"
        },
        "player": {
          "type": "integer"
        },
        "season": {
          "type": "string"
        },
        "season_type": {
          "type": "string"
        },
        "start_date": {
          "type": "null"
        },
        "team": {
          "type": "null"
        }
      }
    },
    "cached": {
      "type": "boolean"
    },
    "count": {
      "type": "integer"
    },
    "credits_used": {
      "type": "integer"
    },
    "fetched_at": {
      "type": "string"
    },
    "league_averages": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "fg_pct": {
            "type": "number"
          },
          "fga": {
            "type": "integer"
          },
          "fgm": {
            "type": "integer"
          },
          "grid_type": {
            "type": "string"
          },
          "shot_zone_area": {
            "type": "string"
          },
          "shot_zone_basic": {
            "type": "string"
          },
          "shot_zone_range": {
            "type": "string"
          }
        }
      }
    },
    "next_page": {
      "type": "integer"
    },
    "page": {
      "type": "integer"
    },
    "shots": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "action_type": {
            "type": "string"
          },
          "event_type": {
            "type": "string"
          },
          "game_date": {
            "type": "string"
          },
          "game_event_id": {
            "type": "integer"
          },
          "game_id": {
            "type": "string"
          },
          "grid_type": {
            "type": "string"
          },
          "htm": {
            "type": "string"
          },
          "loc_x": {
            "type": "integer"
          },
          "loc_y": {
            "type": "integer"
          },
          "minutes_remaining": {
            "type": "integer"
          },
          "period": {
            "type": "integer"
          },
          "player_id": {
            "type": "integer"
          },
          "player_name": {
            "type": "string"
          },
          "seconds_remaining": {
            "type": "integer"
          },
          "shot_attempted_flag": {
            "type": "integer"
          },
          "shot_distance": {
            "type": "integer"
          },
          "shot_made_flag": {
            "type": "integer"
          },
          "shot_type": {
            "type": "string"
          },
          "shot_zone_area": {
            "type": "string"
          },
          "shot_zone_basic": {
            "type": "string"
          },
          "shot_zone_range": {
            "type": "string"
          },
          "team_id": {
            "type": "integer"
          },
          "team_name": {
            "type": "string"
          },
          "vtm": {
            "type": "string"
          }
        }
      }
    },
    "summary": {
      "type": "object",
      "properties": {
        "attempts": {
          "type": "integer"
        },
        "fg_pct": {
          "type": "number"
        },
        "made": {
          "type": "integer"
        }
      }
    },
    "total": {
      "type": "integer"
    }
  }
}
```

## Request example
Scenario: Official example · Live API.SH response · Minimal request
```bash
curl \
  'https://api.openany.si/v1/agent-apis/apish/nba/v1/shots?limit=1&output=json&player=2544&raw=0&season=2025-26' \
  -X GET \
  -H "Authorization: Bearer $OPENANY_API_KEY" \
  -H 'Content-Type: application/json'
```

## Response example
Example from the provider's documentation. Field values in your results will differ.
Sample response · Documented HTTP 200
```json
{
  "applied_filters": {
    "context_measure": "FGA",
    "end_date": null,
    "game_id": null,
    "location": null,
    "outcome": null,
    "period": null,
    "player": 2544,
    "season": "2025-26",
    "season_type": "Regular Season",
    "start_date": null,
    "team": null
  },
  "cached": false,
  "count": 1,
  "credits_used": 1,
  "fetched_at": "2026-11-19T12:22:29.997Z",
  "league_averages": [
    {
      "fg_pct": 0.667,
      "fga": 9,
      "fgm": 6,
      "grid_type": "League Averages",
      "shot_zone_area": "Back Court(BC)",
      "shot_zone_basic": "Above the Break 3",
      "shot_zone_range": "Back Court Shot"
    },
    {
      "fg_pct": 0.352,
      "fga": 17226,
      "fgm": 6062,
      "grid_type": "League Averages",
      "shot_zone_area": "Center(C)",
      "shot_zone_basic": "Above the Break 3",
      "shot_zone_range": "24+ ft."
    },
    {
      "fg_pct": 0.352,
      "fga": 26514,
      "fgm": 9342,
      "grid_type": "League Averages",
      "shot_zone_area": "Left Side Center(LC)",
      "shot_zone_basic": "Above the Break 3",
      "shot_zone_range": "24+ ft."
    },
    {
      "fg_pct": 0.346,
      "fga": 23626,
      "fgm": 8175,
      "grid_type": "League Averages",
      "shot_zone_area": "Right Side Center(RC)",
      "shot_zone_basic": "Above the Break 3",
      "shot_zone_range": "24+ ft."
    },
    {
      "fg_pct": 0.517,
      "fga": 29,
      "fgm": 15,
      "grid_type": "League Averages",
      "shot_zone_area": "Back Court(BC)",
      "shot_zone_basic": "Backcourt",
      "shot_zone_range": "Back Court Shot"
    },
    {
      "fg_pct": 0.461,
      "fga": 13546,
      "fgm": 6248,
      "grid_type": "League Averages",
      "shot_zone_area": "Center(C)",
      "shot_zone_basic": "In The Paint (Non-RA)",
      "shot_zone_range": "8-16 ft."
    },
    {
      "fg_pct": 0.44,
      "fga": 25595,
      "fgm": 11253,
      "grid_type": "League Averages",
      "shot_zone_area": "Center(C)",
      "shot_zone_basic": "In The Paint (Non-RA)",
      "shot_zone_range": "Less Than 8 ft."
    },
    {
      "fg_pct": 0.429,
      "fga": 2253,
      "fgm": 967,
      "grid_type": "League Averages",
      "shot_zone_area": "Left Side(L)",
      "shot_zone_basic": "In The Paint (Non-RA)",
      "shot_zone_range": "8-16 ft."
    },
    {
      "fg_pct": 0.436,
      "fga": 2514,
      "fgm": 1097,
      "grid_type": "League Averages",
      "shot_zone_area": "Right Side(R)",
      "shot_zone_basic": "In The Paint (Non-RA)",
      "shot_zone_range": "8-16 ft."
    },
    {
      "fg_pct": 0.387,
      "fga": 12210,
      "fgm": 4729,
      "grid_type": "League Averages",
      "shot_zone_area": "Left Side(L)",
      "shot_zone_basic": "Left Corner 3",
      "shot_zone_range": "24+ ft."
    },
    {
      "fg_pct": 0.453,
      "fga": 1880,
      "fgm": 852,
      "grid_type": "League Averages",
      "shot_zone_area": "Center(C)",
      "shot_zone_basic": "Mid-Range",
      "shot_zone_range": "8-16 ft."
    },
    {
      "fg_pct": 0.411,
      "fga": 2838,
      "fgm": 1166,
      "grid_type": "League Averages",
      "shot_zone_area": "Center(C)",
      "shot_zone_basic": "Mid-Range",
      "shot_zone_range": "16-24 ft."
    },
    {
      "fg_pct": 0.396,
      "fga": 2862,
      "fgm": 1133,
      "grid_type": "League Averages",
      "shot_zone_area": "Left Side Center(LC)",
      "shot_zone_basic": "Mid-Range",
      "shot_zone_range": "16-24 ft."
    },
    {
      "fg_pct": 0.416,
      "fga": 4634,
      "fgm": 1928,
      "grid_type": "League Averages",
      "shot_zone_area": "Left Side(L)",
      "shot_zone_basic": "Mid-Range",
      "shot_zone_range": "8-16 ft."
    },
    {
      "fg_pct": 0.394,
      "fga": 1188,
      "fgm": 468,
      "grid_type": "League Averages",
      "shot_zone_area": "Left Side(L)",
      "shot_zone_basic": "Mid-Range",
      "shot_zone_range": "16-24 ft."
    },
    {
      "fg_pct": 0.4,
      "fga": 2806,
      "fgm": 1122,
      "grid_type": "League Averages",
      "shot_zone_area": "Right Side Center(RC)",
      "shot_zone_basic": "Mid-Range",
      "shot_zone_range": "16-24 ft."
    },
    {
      "fg_pct": 0.439,
      "fga": 4756,
      "fgm": 2089,
      "grid_type": "League Averages",
      "shot_zone_area": "Right Side(R)",
      "shot_zone_basic": "Mid-Range",
      "shot_zone_range": "8-16 ft."
    },
    {
      "fg_pct": 0.397,
      "fga": 1061,
      "fgm": 421,
      "grid_type": "League Averages",
      "shot_zone_area": "Right Side(R)",
      "shot_zone_basic": "Mid-Range",
      "shot_zone_range": "16-24 ft."
    },
    {
      "fg_pct": 0.671,
      "fga": 62253,
      "fgm": 41768,
      "grid_type": "League Averages",
      "shot_zone_area": "Center(C)",
      "shot_zone_basic": "Restricted Area",
      "shot_zone_range": "Less Than 8 ft."
    },
    {
      "fg_pct": 0.386,
      "fga": 11360,
      "fgm": 4386,
      "grid_type": "League Averages",
      "shot_zone_area": "Right Side(R)",
      "shot_zone_basic": "Right Corner 3",
      "shot_zone_range": "24+ ft."
    }
  ],
  "next_page": 2,
  "page": 1,
  "shots": [
    {
      "action_type": "Jump Shot",
      "event_type": "Missed Shot",
      "game_date": "20251225",
      "game_event_id": 58,
      "game_id": "0022500012",
      "grid_type": "Shot Chart Detail",
      "htm": "LAL",
      "loc_x": 176,
      "loc_y": 200,
      "minutes_remaining": 7,
      "period": 1,
      "player_id": 2544,
      "player_name": "LeBron James",
      "seconds_remaining": 5,
      "shot_attempted_flag": 1,
      "shot_distance": 26,
      "shot_made_flag": 0,
      "shot_type": "3PT Field Goal",
      "shot_zone_area": "Right Side Center(RC)",
      "shot_zone_basic": "Above the Break 3",
      "shot_zone_range": "24+ ft.",
      "team_id": 1610612747,
      "team_name": "Los Angeles Lakers",
      "vtm": "HOU"
    }
  ],
  "summary": {
    "attempts": 919,
    "fg_pct": 0.515,
    "made": 473
  },
  "total": 919
}
```

## Error handling
400: Check the request fields.
401 / 403: Verify credentials and access permissions.
402: Inspect payment requirements and balance.
429: Respect returned retry guidance.
5xx: Inspect the error and usage record before retrying a paid operation.

## Common questions
### What values does context_measure accept?
context_measure accepts FGA (default), FGM, FG3A, FG3M or PTS.

### Are league shooting averages by zone included?
Yes. The league_averages[] array provides league fgm, fga and fg_pct broken down by shot_zone_basic, shot_zone_area and shot_zone_range.

### How many shots can I request per page?
limit accepts 1 to 2000 shots per page (default 500); use page and next_page to paginate larger shot sets.

### Can I filter shots for a single game or specific quarter?
Yes. Pass game_id and optionally period, location, outcome or opponent.

### How do I check whether a shot was made or missed?
Inspect shots[].shot_made_flag (1 for made, 0 for missed) and shots[].event_type.

### How do caching and response trimming work?
Output is JSON only. Pass fresh=1 to bypass the 24-hour cache, raw=0 to omit raw blocks, or fields to select keys.

## Available implementations
- apish: https://openany.si/nba/nba-shot-chart-api/d28d90bf-b89c-483f-b5e1-0baea1255d4d/

Integration guide: https://openany.si/docs/
Agent setup: https://openany.si/SKILL.md
