# Flashscore Basketball Scraper - Live Scores, Stats (`pshivam/flashscore-basketball-scraper`) Actor

Basketball data from Flashscore: live scores, fixtures and results for the NBA, NCAA and 60+ leagues, with points per quarter, box-score statistics, venue, referees and head-to-head in every row. Fast, no proxy. Export to Excel, CSV, JSON or API.

- **URL**: https://apify.com/pshivam/flashscore-basketball-scraper.md
- **Developed by:** [Shivam Prajapati](https://apify.com/pshivam) (community)
- **Categories:** Sports
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.40 / 1,000 matches

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
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

## Flashscore Basketball Scraper - Live Scores, Stats

Get **basketball data from [Flashscore](https://www.flashscore.com)**: live scores, fixtures and results of every day for the **NBA, NCAA men's and women's college basketball and 60+ leagues** in the US, Europe, Asia, Australia and South America. Every match can come with its **points per quarter, box-score statistics (field goals, three-pointers, rebounds, assists, turnovers), arena, attendance, referees and head-to-head**, all in one row and for one price. No proxy, no login. Export to Excel, CSV, JSON or the API.

**Actively maintained.** Last update: 2026-11-07. Every release passes 100+ automated tests on saved Flashscore feeds plus a check against the live site, and Apify test-runs it every day.

### What can you use it for?

- **Live scoreboards and bots.** Run it every minute in live mode: every game in play with the running score and the period.
- **Betting and modelling.** Results with points per quarter, overtime, shooting and rebounding statistics, plus both teams' last 10 games and their previous meetings.
- **Fantasy and analysis tools.** Team box-score numbers for the match and for each quarter.
- **Dashboards, newsletters and apps.** A whole day of basketball (about 600 games in 60 leagues on a busy college day) in one fast request, filtered by country, league or team.
- **Research.** Arena, attendance and referees of every game, and the final score split by period.

### What data do you get?

Fields marked *block* are filled when the matching option is on (it is on by default for **Matches by id**, and off for lists, to keep list runs fast).

| Field | What it is |
|---|---|
| `matchId`, `matchUrl` | Flashscore match id and page |
| `country`, `league`, `leagueId`, `leagueUrl` | Country, league, Flashscore id and page of the league |
| `round` | Round, e.g. Quarter-finals, where Flashscore has one (*block*: round) |
| `status`, `statusCode`, `statusText` | scheduled, live or finished; Flashscore's status code and name (Finished, After overtime, 3rd quarter, Postponed ...) |
| `startTime`, `endTime` | Scheduled start and end of a finished game, UTC |
| `homeTeam`, `homeTeamId`, `homeSlug` | Home team as listed, Flashscore id and address name |
| `awayTeam`, `awayTeamId`, `awaySlug` | Away team, same fields |
| `homeScore`, `awayScore`, `score` | Points, overtime included (the running score of a live game), and the score as text (`117-104`) |
| `periods` | Points per period: `Q1` to `Q4`, or `H1` and `H2` for college games, and `OT` for all overtime |
| `resultType`, `winner` | regular or overtime; home or away |
| `note` | Flashscore's note such as the first leg result |
| `venue`, `city`, `capacity`, `attendance`, `referees` | Arena, city, capacity, attendance and the referees (*block*: any detail block) |
| `statistics` | Match and per-quarter statistics with numbers: field goals, three-pointers, free throws, rebounds, assists, steals, blocks, turnovers ... (*block*: statistics) |
| `headToHead` | `homeForm` and `awayForm` (last 10 games each) and `meetings` (*block*: head-to-head) |
| `scrapedAt` | When the match was scraped (UTC) |

#### Example result

```json
{
  "matchId": "ppDcHIDs",
  "country": "USA",
  "league": "NBA",
  "status": "finished",
  "startTime": "2026-11-06T02:00:00Z",
  "homeTeam": "Phoenix Suns",
  "awayTeam": "Orlando Magic",
  "homeScore": 117,
  "awayScore": 104,
  "score": "117-104",
  "winner": "home",
  "periods": [
    {"period": "Q1", "home": 33, "away": 26},
    {"period": "Q2", "home": 30, "away": 25},
    {"period": "Q3", "home": 33, "away": 22},
    {"period": "Q4", "home": 21, "away": 31}
  ],
  "venue": "Mortgage Matchup Center",
  "city": "Phoenix, AZ",
  "attendance": 17071,
  "referees": ["Lane K.", "Lindsay M.", "Baroody D."],
  "statistics": [{"period": "Match", "group": "Scoring", "name": "Field goals attempts", "home": "87", "away": "81", "homeValue": 87, "awayValue": 81}]
}
```

### How to use it

1. Pick **What to get**: the **Fixtures and results** of one or more days, the **Live matches** right now, or **Matches by id**.
2. Optionally keep only some countries, leagues or teams, or a status.
3. Turn on the detail blocks you want (round, statistics, head-to-head), set **Maximum matches** and press Start.

#### Input options

| Input | What it does |
|---|---|
| `mode` | `schedule` (matches of the chosen days), `live` (only matches in play now) or `match` (the ids you give) |
| `daysBack`, `daysAhead`, `dates` | Schedule mode: days before and after today (up to 7 each way), or exact days like `2026-11-07` |
| `countries`, `leagues`, `teams` | Keep matches of leagues in these countries, leagues whose name contains one of these words, or teams whose name contains one of them |
| `status` | scheduled, live or finished |
| `matchIds` | Match mode: Flashscore match ids or match URLs |
| `includeMatchInfo` | Add the round |
| `includeStatistics` | Add match and per-quarter statistics |
| `includeHeadToHead` | Add both teams' form and their previous meetings |
| `onlyNew` | Skip matches that earlier runs of this same search already returned |
| `maxItems` | Stop after this many matches |
| `maxConcurrency` | Requests at the same time (never more than 20 a second) |

### How much does it cost?

You pay per match returned, nothing else, and **every detail block is included**: no extra price for statistics or head-to-head. The first Apify plan includes free monthly credit to try it.

| Plan | Price per 1,000 matches |
|---|---|
| Free | $2.00 |
| Bronze | $1.80 |
| Silver | $1.60 |
| Gold | $1.40 |

### Use it via API, on a schedule, or with your tools

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_API_TOKEN>")
run = client.actor("pshivam/flashscore-basketball-scraper").call(run_input={
    "mode": "schedule",
    "leagues": ["NBA"],
    "daysBack": 1,
    "includeStatistics": True,
    "maxItems": 100,
})
for match in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(match["homeTeam"], match["awayTeam"], match["score"])
```

Schedule it in the Apify Console (Schedules) to poll live scores, and turn on **Only new matches** to receive only matches you have not had yet. Connect the result to Google Sheets, Make, Zapier, n8n or your own app with Apify's integrations.

### Good to know

- **Source.** The data is what Flashscore shows on its public pages and feeds. The scraper reads it the way the website does, at a modest pace, without logging in.
- **Seven days each way.** Flashscore's day lists reach 7 days back and 7 days ahead of today. For older matches use **Matches by id**.
- **The round needs one more request per match**, so it is off for lists by default. Many leagues have no round on Flashscore, and the field is then empty.
- **Venue, referees, attendance and extra period points come from one detail request per match**, so they are filled when you turn on any detail option.
- **Statistics and head-to-head exist only when Flashscore has them.** Lower leagues often have no statistics and a game that has not started has none, and those fields are empty.
- **Player box scores, lineups and odds are not included.**
- **Postponed, cancelled and awarded games** are marked by Flashscore's own `statusCode` and `statusText`.

### FAQ

#### How many games does Flashscore have per day?

A busy college day has about 600 basketball games in about 60 leagues. A day with only the NBA and a few European leagues has far fewer.

#### Can I get live scores every minute?

Yes. Schedule the Actor with **Live matches** every minute. Each run is one request and returns every game in play with its running score and period.

#### Do I need a proxy?

No. The scraper reads Flashscore's public data directly and needs no proxy and no account.

#### What does a college game's periods list look like?

College games have two halves, so `periods` lists `H1` and `H2`, plus `OT` when the game went to overtime. NBA and most league games list `Q1` to `Q4`.

#### Is it legal to scrape Flashscore?

The scraper reads publicly visible pages at a modest pace and does not log in. You are responsible for using the data lawfully and in line with the website's terms, for example when you build a betting product.

#### How do I get only new matches every day?

Turn on **Only new matches** and schedule the Actor. It remembers what it returned in your key-value store.

# Actor input Schema

## `mode` (type: `string`):

Fixtures and results: every match of the chosen days, upcoming, live and finished. Live: only the matches in play right now. Matches by id: full detail for the match ids or URLs you give.

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

Fixtures mode: also get this many days before today (finished matches). At most 7.

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

Fixtures mode: also get this many days after today (upcoming matches). At most 7.

## `dates` (type: `array`):

Fixtures mode: days like 2026-11-07, up to 7 days back and 7 days ahead of today. Added to the days above.

## `countries` (type: `array`):

Keep matches of leagues in these countries (part of a name is enough: USA, Spain, Greece). Use Europe or World for international competitions.

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

Keep matches of leagues whose name contains one of these words (NBA, NCAA, Liga A, NBL).

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

Keep matches where one of the teams has one of these names (part of a name is enough: Lakers, Suns, Duke).

## `status` (type: `string`):

Keep only scheduled (not started), live or finished matches. Live mode always means live.

## `matchIds` (type: `array`):

For 'Matches by id': Flashscore match ids (ppDcHIDs) or match URLs (https://www.flashscore.com/match/ppDcHIDs/).

## `includeMatchInfo` (type: `boolean`):

Open the match page for the round (Quarter-finals, Round 5) where Flashscore has one. On by default for 'Matches by id', off for lists (one more request per match).

## `includeStatistics` (type: `boolean`):

Field goals, three-pointers, free throws, rebounds, assists, steals, blocks, turnovers and more, for the match and for each quarter. Venue, referees and attendance come with any detail option. On by default for 'Matches by id', off for lists.

## `includeHeadToHead` (type: `boolean`):

Both teams' last 10 matches and their previous meetings. On by default for 'Matches by id', off for lists.

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

Skip matches that earlier runs of this same search already returned, so you never get or pay for the same match twice. The first run works as usual and remembers what it returned, in your key-value store 'flashscore-basketball-scraper-only-new'.

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

Stop after this many matches. You are charged per match. A full day has about 600 matches.

## `maxConcurrency` (type: `integer`):

Requests at the same time (the scraper never sends more than 20 a second). More helps runs with detail blocks.

## Actor input object example

```json
{
  "mode": "schedule",
  "daysBack": 0,
  "daysAhead": 0,
  "status": "any",
  "onlyNew": false,
  "maxItems": 20,
  "maxConcurrency": 8
}
```

# Actor output Schema

## `matches` (type: `string`):

One row per match, shown with the overview view.

## `details` (type: `string`):

Points, arena, city, attendance and referees for sorting and filtering.

## `runStats` (type: `string`):

Requests made, time spent and number of matches for this run (RUN_STATS record).

# 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 = {
    "maxItems": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("pshivam/flashscore-basketball-scraper").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 = { "maxItems": 20 }

# Run the Actor and wait for it to finish
run = client.actor("pshivam/flashscore-basketball-scraper").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 '{
  "maxItems": 20
}' |
apify call pshivam/flashscore-basketball-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,pshivam/flashscore-basketball-scraper"
        }
    }
}
```

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/OS33DFSVUIB2UIAtn/builds/ObN0sqB2fCErpuAf8/openapi.json
