mirror of
https://github.com/nprasad2077/nbaStats.git
synced 2026-11-05 01:25:48 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7b578cf94c | ||
|
|
0c20bb299b | ||
|
|
98cd5950b3 | ||
|
|
792155da49 | ||
|
|
34f9faaeb9 | ||
|
|
066c943066 | ||
|
|
aa785ede20 | ||
|
|
0469ac6053 |
@@ -1,7 +1,41 @@
|
|||||||
# NBA Stats API 2.0
|
# NBA Stats API 2.0
|
||||||
|
|
||||||
## 🔎 View the Interactive API Documentation
|
## [🔎 📜 View the Interactive API Documentation](https://api.server.nbaapi.com/)
|
||||||
**[Interactive Swagger Documentation](https://api.server.nbaapi.com/swagger/index.html)** - Complete API reference with live testing capabilities
|
|
||||||
|
[<img src="https://run.pstmn.io/button.svg" alt="Run In Postman" style="width: 128px; height: 32px;">](https://solar-meadow-682296.docs.buildwithfern.com)
|
||||||
|
|
||||||
|
|
||||||
|
# NEW DATA AVAILABLE SOON.
|
||||||
|
|
||||||
|
Hi Folks, stay tuned for new updated including much more advanced and refined player, game, and team statistics.
|
||||||
|
|
||||||
|
Here is a small preview:
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div align="center">
|
||||||
|
|
||||||
|
| API Responses |
|
||||||
|
| :---: |
|
||||||
|
| <img src="https://files.catbox.moe/sfi5z7.png" width="100%"> |
|
||||||
|
| <img src="https://files.catbox.moe/ua8jmc.png" width="100%"> |
|
||||||
|
| <img src="https://files.catbox.moe/no1mpw.png" width="100%"> |
|
||||||
|
| <img src="https://files.catbox.moe/ol7sjl.png" width="100%"> |
|
||||||
|
| <img src="https://files.catbox.moe/xi66gb.png" width="100%"> |
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div align="center">
|
||||||
|
|
||||||
|
## 📺 Video Preview
|
||||||
|
|
||||||
|
<video src="https://github.com/user-attachments/assets/1e528ea9-7913-4e16-a33b-3251a0bb3c46" autoplay loop muted playsinline width="100%" type="video/mp4"></video>
|
||||||
|
|
||||||
|
<img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" height="4px" display="block">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## Introduction
|
## Introduction
|
||||||
|
|
||||||
@@ -9,7 +43,7 @@ This documentation provides comprehensive information for using the NBA Stats AP
|
|||||||
|
|
||||||
# NBA Player Statistics API
|
# NBA Player Statistics API
|
||||||
|
|
||||||
This API provides endpoints to query NBA player statistics, including both "Totals" data and "Advanced" statistical data. Each endpoint supports filtering, sorting, and pagination options to help you retrieve exactly the data you need.
|
This API provides endpoints to query NBA player statistics, including both "Totals" data, "Advanced" statistical data, and Player Shot Chart data. Each endpoint supports filtering, sorting, and pagination options to help you retrieve exactly the data you need.
|
||||||
|
|
||||||
## Base URL
|
## Base URL
|
||||||
|
|
||||||
@@ -218,6 +252,64 @@ curl -X GET \
|
|||||||
```
|
```
|
||||||
|
|
||||||
---
|
---
|
||||||
|
## Player Shot Chart Endpoint
|
||||||
|
|
||||||
|
**GET** `/api/playershotchart`
|
||||||
|
|
||||||
|
Retrieve shot chart data for a specific player. This endpoint is ideal for visualizing player shooting performance and can be filtered by game, season, shot type, and outcome.
|
||||||
|
|
||||||
|
### Query Parameters for Shot Chart
|
||||||
|
|
||||||
|
- **playerId** *(string, optional)*: The player's unique ID (e.g., `hardeja01`).
|
||||||
|
- **season** *(integer, optional)*: Filter by a specific season (e.g., `2019`).
|
||||||
|
- **date** *(string, optional)*: Filter by a specific game date (e.g., `Dec 17, 2018`).
|
||||||
|
- **opponent** *(string, optional)*: Filter by the three-letter abbreviation for the opponent team (e.g., `UTA`).
|
||||||
|
- **qtr** *(string, optional)*: Filter by the quarter of the game (e.g., `1st Qtr`).
|
||||||
|
- **result** *(boolean, optional)*: Filter by shot outcome (`true` for made shots, `false` for missed).
|
||||||
|
- **shot\_type** *(string, optional)*: Filter by the type of shot (e.g., `2-pointer`, `3-pointer`).
|
||||||
|
- **page** *(integer, optional)*: Page number to retrieve (default: `1`). Note: The page size is fixed at 50 results.
|
||||||
|
|
||||||
|
### Example Request
|
||||||
|
|
||||||
|
```bash
|
||||||
|
curl -X GET \
|
||||||
|
'https://api.server.nbaapi.com/api/playershotchart?playerId=hardeja01&date=Dec%2017%2C2018' \
|
||||||
|
-H 'accept: application/json'
|
||||||
|
```
|
||||||
|
|
||||||
|
### Response Format
|
||||||
|
|
||||||
|
The response is an array of shot objects.
|
||||||
|
|
||||||
|
```json
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"id": 510,
|
||||||
|
"playerId": "hardeja01",
|
||||||
|
"season": 2019,
|
||||||
|
"date": "Dec 17,2018",
|
||||||
|
"qtr": "1st Qtr",
|
||||||
|
"timeRemaining": "11:09",
|
||||||
|
"top": 305,
|
||||||
|
"left": 161,
|
||||||
|
"playerName": "hardeja01",
|
||||||
|
"result": false,
|
||||||
|
"shotType": "3-pointer",
|
||||||
|
"distanceFt": 26,
|
||||||
|
"lead": true,
|
||||||
|
"teamScore": 3,
|
||||||
|
"opponentTeamScore": 0,
|
||||||
|
"opponent": "UTA",
|
||||||
|
"team": "HOU",
|
||||||
|
"ID": 0,
|
||||||
|
"CreatedAt": "2025-06-20T22:48:34.764255Z",
|
||||||
|
"UpdatedAt": "2025-06-20T22:48:34.764255Z",
|
||||||
|
"DeletedAt": null
|
||||||
|
}
|
||||||
|
]
|
||||||
|
```
|
||||||
|
|
||||||
|
-----
|
||||||
|
|
||||||
## Response Codes
|
## Response Codes
|
||||||
|
|
||||||
@@ -266,7 +358,7 @@ curl -X GET \
|
|||||||
|
|
||||||
## Additional Resources
|
## Additional Resources
|
||||||
|
|
||||||
- **Interactive Documentation**: [https://api.server.nbaapi.com/swagger/index.html](https://api.server.nbaapi.com/swagger/index.html)
|
- **Interactive Documentation**: [https://api.server.nbaapi.com](https://api.server.nbaapi.com/swagger/index.html)
|
||||||
- **Postman Collection**: Use the "Run in Postman" button above
|
- **Postman Collection**: Use the "Run in Postman" button above
|
||||||
- **Data Sources**: Statistics cross-referenced with Basketball Reference and NBA.com
|
- **Data Sources**: Statistics cross-referenced with Basketball Reference and NBA.com
|
||||||
|
|
||||||
@@ -278,4 +370,4 @@ If you encounter any issues or have questions about the API, please open an issu
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
**Note**: This API is currently in public beta. Features and endpoints may be updated based on user feedback and requirements.
|
**Note**: This API is currently in public beta. Features and endpoints may be updated based on user feedback and requirements.
|
||||||
Reference in new issue
Block a user