# NBA Scores, Box Scores & Stats (`tacps126/nba-scores-stats`) Actor

NBA scores and schedules, player box scores (points, rebounds, assists, shooting, plus/minus), betting odds (moneyline, spread, total; open and close), standings and rosters with injuries; WNBA and NCAA too. Finals once.

- **URL**: https://apify.com/tacps126/nba-scores-stats.md
- **Developed by:** [Tapaswai Choudhary](https://apify.com/tacps126) (community)
- **Categories:** Sports, Automation, Developer tools
- **Security:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.40 / 1,000 game, standing, team or players

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## NBA Scores, Box Scores & Stats

NBA **scores and schedules**, **player box scores**, **standings**, teams and **rosters with injury status**, plus the **WNBA** and **NCAA men's basketball** (all Division I teams). Pick dates and teams, export to JSON, CSV or Excel, or schedule it to get each final once.

**Built for** fantasy and DFS players, bettors and prop modellers, basketball analysts and writers, newsletters and Discord bots, and AI agents.

### What you get

| Data type | One row per | Fields |
|---|---|---|
| Games | game | date, status, home and away team and score, winner, quarter scores, team records, game leaders, venue, attendance, TV, headline, link |
| Box scores | player per game | team, opponent, result, starter, position, minutes, points, rebounds (offensive, defensive), assists, steals, blocks, turnovers, fouls, field goals, threes and free throws made and attempted, plus/minus |
| Odds | game per sportsbook | moneyline, spread and total with prices, opening and current or closing lines, favourite, line movement, fair win probability; for finished games which side covered and over/under result |
| Standings | team | conference, seed, wins, losses, win %, games behind, streak, home and road records, points for and against |
| Teams / rosters | team / player | ids, colours, logos; position, number, age, height, weight, college, experience, injury status |

### How to use it

Last night's NBA results:

```json
{ "leagues": ["nba"], "daysBack": 1, "gameStatus": "final" }
```

Lakers and Celtics player lines this month:

```json
{ "leagues": ["nba"], "dataType": "boxScores", "dateFrom": "2026-10-01", "teams": ["Lakers", "BOS"] }
```

Tonight's and tomorrow's schedule:

```json
{ "leagues": ["nba"], "daysBack": 0, "daysAhead": 1, "gameStatus": "scheduled" }
```

Opening and current betting lines for the next games:

```json
{ "leagues": ["nba"], "dataType": "odds", "daysBack": 0, "daysAhead": 1 }
```

### Options

| Option | What it does |
|---|---|
| **Leagues** (`leagues`) | `nba`, `wnba`, `ncaab` |
| **Data** (`dataType`) | `games`, `boxScores`, `odds`, `standings`, `teams` or `rosters` |
| **Days back** / **Days ahead** (`daysBack`, `daysAhead`) | Rolling window: `daysBack: 1` = yesterday and today; `daysAhead: 7` = next week's fixtures |
| **From date** / **To date** (`dateFrom`, `dateTo`) | Exact range (`YYYY-MM-DD`), up to about one season per run |
| **Game status** (`gameStatus`) | `any`, `final`, `live` or `scheduled` |
| **Teams** (`teams`) | Names or abbreviations, e.g. `Lakers`, `BOS`. Empty = all |
| **Season** (`season`) | Standings for a past season, e.g. `2025 (the 2024-25 season)`; empty = current |
| **Max results** (`maxItems`) | Most rows per run |
| **Only new** (`onlyNew`, `monitorName`) | With a schedule, each run returns only rows earlier runs did not deliver; a game comes again when its status changes |

### Pricing

**$3 per 1,000 games, odds rows, standings rows, teams or players**, and **$1 per 1,000 box-score player lines** (an NBA game is about 26 lines, so about 3 cents), plus a small start fee per run. On the Apify free plan a run returns up to 100 rows.

### Good to know

- Dates follow the US game day: a 10:30 pm Eastern tip-off on October 29 counts as October 29.
- *Only new* + a daily schedule returns each game again only when its status changes, so finals arrive once.
- Need other sports? **Sports Data** (tacps126/sports-data) covers 24 leagues with the same fields.
- Questions: **tacps126@gmail.com**.

# Actor input Schema

## `leagues` (type: `array`):

NBA, WNBA and/or NCAA men's basketball (all Division I teams).

## `dataType` (type: `string`):

Games give scores, status, venue, TV, team records, leaders, key events (goals, cards) and odds where shown. Odds give opening and current (closing after the game) moneyline, spread and total per sportsbook, fair win probability, line movement and, for finished games, which side covered and whether the total went over.

## `daysBack` (type: `integer`):

1 = yesterday and today.

## `daysAhead` (type: `integer`):

Upcoming fixtures, e.g. 7 for the next week's schedule.

## `dateFrom` (type: `string`):

YYYY-MM-DD; replaces Days back.

## `dateTo` (type: `string`):

YYYY-MM-DD; replaces Days ahead. Up to about one season per run.

## `gameStatus` (type: `string`):

Box scores always use finished games.

## `teams` (type: `array`):

Team names or abbreviations, e.g. Lakers, BOS, Duke. Empty = all.

## `season` (type: `integer`):

The season's year as ESPN numbers it, e.g. 2026 for the 2025-26 NBA season. Empty = current.

## `maxItems` (type: `integer`):

Most rows returned per run.

## `onlyNew` (type: `boolean`):

Schedule the Actor and each run returns only what earlier runs did not deliver. A game comes again when its status changes (scheduled, live, final), so a daily run with Game status = Final gives each result once.

## `monitorName` (type: `string`):

Optional name for the "only new" history, so several monitors can run side by side.

## `tenantId` (type: `string`):

Optional label used to keep separate histories for different clients or teams.

## `debug` (type: `boolean`):

Save extra diagnostics with the run (for support requests).

## Actor input object example

```json
{
  "leagues": [
    "nba"
  ],
  "dataType": "games",
  "daysBack": 1,
  "daysAhead": 0,
  "gameStatus": "any",
  "maxItems": 1000,
  "onlyNew": false,
  "debug": false
}
```

# Actor output Schema

## `results` (type: `string`):

The produced items (default dataset items).

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "leagues": [
        "nba"
    ],
    "daysBack": 1
};

// Run the Actor and wait for it to finish
const run = await client.actor("tacps126/nba-scores-stats").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "leagues": ["nba"],
    "daysBack": 1,
}

# Run the Actor and wait for it to finish
run = client.actor("tacps126/nba-scores-stats").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "leagues": [
    "nba"
  ],
  "daysBack": 1
}' |
apify call tacps126/nba-scores-stats --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,tacps126/nba-scores-stats"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/6bf2oZBKS8LAy5v9e/builds/w9Dmxm0pZooSiILHg/openapi.json
