Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 

Repository files navigation

NBA Stats Scraper for espn.com

Extract structured data from NBA box scores from espn.com — NBA box scores from espn.com: one row per player per game with the full statline and the team totals - minutes, points, shooting splits, rebounds, assists, turnovers, steals, blocks, fouls and plus/minus, plus opponent and result. Pick a season, a date range or one game.

NBA Stats Scraper for espn.com on Apify →


🚀 How to use this actor

💚 $5 free Apify credits — every month

No credit card required. No commitment. Cancel anytime.

  1. Click sign up — pick GitHub, Google, or email; takes ~30 seconds
  2. Open this actor — input is pre-filled with a working example
  3. Click Start — export results as JSON, CSV, or Excel

Your $5 monthly platform credit is enough to run this actor right away — and again every month — scraping typically several hundred to several thousand results per run, depending on your input.

Key features

Search with filters — Search by keyword.

Incremental mode — Only get new or changed box score rows since your last run. Content hash per box score row — no duplicates, no re-processing.

Change classification — Track unchanged, expired across runs. Build audit trails of how box score rows evolve over time.

Compact output — Emit core fields only (AI-agent / MCP-friendly). Keeps response size small for LLM workflows.

Result cap — Stop after N box score rows (up to 100.000). Set to 0 for the full catalog.

Export anywhere — Download as JSON, CSV, or Excel. Stream via Apify API, webhooks, or integrations with Make, Zapier, Airbyte, Keboola.

Structured data — Every box score row returns the same schema with consistent field naming. All fields always present — null when unavailable, never omitted.


Use cases

Data pipeline automation Integrate with your ETL pipeline to collect structured box score rows from NBA box scores from espn.com on a schedule. Export to CSV, JSON, or directly to your database. Use compact mode to control output size.

Market research Monitor box score rows, track trends, and analyze market dynamics with structured, deduplicated data from NBA box scores from espn.com.

Change monitoring Run daily or hourly in incremental mode to capture only new, updated, or expired ${NOUNS}. Perfect for price-tracking, churn analysis, and alerting pipelines.

AI / LLM training data Structured JSON per box score row is ready for RAG pipelines, embeddings, and agent workflows. Compact mode trims tokens for LLM context windows.


Quick start

{
  "query": "2025-03-15",
  "maxResults": 100
}

Input parameters

Parameter Type Default Description
query string — A season (season:2025), a date (2025-03-15), a date range (2025-03-14..2025-03-16) or one game (game:401705534). Leave empty for the current season. Use a JSON array for several, e.g. ["season:2024","season:2025"].
teams array — Only games involving these teams. Abbreviation or name both work: BOS, Celtics, Boston Celtics. Applied when the calendar is read, so you are not charged for the other 29 teams. Leave empty for every team.
maxResults integer 100 Maximum rows to deliver. One game is about 26 rows (both rosters), one night about 200, a full regular season about 32,000.
compact boolean false Core fields only (for AI-agent/MCP workflows).
incrementalMode boolean false Deliver only rows that are new or whose stats changed since the last run — ESPN corrects box scores after the final whistle. stateKey is optional and defaults to one derived from what you asked for, so two different queries never share state.
stateKey string — Optional. Stable identifier for the tracked search universe. Leave empty to auto-generate from search inputs.
telegramToken string — Telegram bot token (from @BotFather). Required for Telegram notifications.
telegramChatId string — Telegram chat or channel ID (e.g. "-100123456789"). Required when telegramToken is set.
discordWebhookUrl string — Discord incoming webhook URL. Server Settings → Integrations → Webhooks → New Webhook.
slackWebhookUrl string — Slack incoming webhook URL. api.slack.com/messaging/webhooks.
notificationLimit integer 5 Maximum number of listings included in each notification message (1–20).
notifyOnlyChanges boolean false When Incremental Mode is on, only send notifications for NEW and UPDATED listings. Has no effect outside incremental mode.
whatsappAccessToken string — WhatsApp Cloud API permanent access token (System User token from Meta Business). Recipient must have messaged the business number within the last 24h (service-conversation window — free since Nov 2024).
whatsappPhoneNumberId string — Your WhatsApp Business phone-number ID (numeric, from Meta dashboard). Required when whatsappAccessToken is set.
whatsappTo string — Recipient phone in E.164 format without + (e.g. "436641234567"). Recipient must have messaged your business number within last 24h.
webhookUrl string — Receives a JSON POST with {metadata, items} after each run. Universal escape hatch for n8n / Make / Zapier / custom backends.
webhookHeaders object — Optional JSON object of custom headers (e.g. {"Authorization":"Bearer ..."}).
appConnector string — Optional. Pick a connected app under Settings → API & Integrations to receive your results (including any contact details). Best-effort across MCP connectors as Apify expands its catalog.
mcpIssueTeam string — Only when the connected app is an issue tracker: the team (name or ID) the summary issue is created under, if that app requires one.
excludeEmptyFields boolean false Drop null, empty-string, and empty-array fields from each record before push. Smaller payloads for AI agents and dashboards.
emitUnchanged boolean false When incremental, also deliver rows whose stats did not move since the last run.
emitExpired boolean false When incremental, also deliver rows that are no longer returned for the query.

Output fields

Every box score row returns the same 107-field schema. Missing values are null — never omitted.

  • recordType
  • gameId
  • gameDate
  • gameDatetime
  • gameSeason
  • gameSeasonType
  • gameSeasonTypeName
  • gameOutcome
  • teamId
  • teamNameFull
  • teamAbbreviation
  • teamCity
  • teamMascot
  • teamLogo
  • teamHomeAway
  • teamIsHome
  • teamVenue
  • teamVenueCity
  • teamVenueState
  • teamOutcome
  • opponentId
  • opponentNameFull
  • opponentAbbreviation
  • opponentCity
  • opponentMascot
  • opponentLogo
  • opponentScore
  • scorePointsFor
  • scorePointsAgainst
  • scoreMargin
  • scoreLargestLead
  • teamQ1Points
  • teamQ2Points
  • teamQ3Points
  • teamQ4Points
  • teamOvertimePoints
  • opponentQ1Points
  • opponentQ2Points
  • opponentQ3Points
  • opponentQ4Points
  • opponentOvertimePoints
  • teamFieldGoalsMade
  • teamFieldGoalsAttempted
  • teamFieldGoalsPct
  • teamThreePointersMade
  • teamThreePointersAttempted
  • teamThreePointersPct
  • teamFreeThrowsMade
  • teamFreeThrowsAttempted
  • teamFreeThrowsPct
  • teamReboundsTotal
  • teamReboundsOffensive
  • teamReboundsDefensive
  • teamAssistsTotal
  • teamTurnoversTotal
  • teamTurnoversNonPlayer
  • teamAssistsToTurnoversRatio
  • teamStealsTotal
  • teamBlocksTotal
  • teamFoulsPersonal
  • teamFoulsTechnical
  • teamFoulsFlagrant
  • playerId
  • playerDisplayName
  • playerShortName
  • playerJersey
  • playerPosition
  • playerPositionAbbr
  • playerHeadshot
  • playerStarter
  • playerActive
  • playerDidNotPlay
  • playerDidNotPlayReason
  • playerEjected
  • minutesPlayed
  • pointsTotal
  • fieldGoalsMade
  • fieldGoalsAttempted
  • fieldGoalsPct
  • threePointersMade
  • threePointersAttempted
  • threePointersPct
  • freeThrowsMade
  • freeThrowsAttempted
  • freeThrowsPct
  • reboundsTotal
  • reboundsOffensive
  • reboundsDefensive
  • assistsTotal
  • turnoversTotal
  • assistsToTurnoversRatio
  • stealsTotal
  • blocksTotal
  • foulsPersonal
  • plusMinus
  • plusMinusNumeric
  • name
  • listingId
  • url
  • portalUrl
  • searchQuery
  • contentQuality
  • detailFetched
  • scrapedAt
  • source
  • contentHash
  • changeType

Sample output

One object per box score row. Here is a real example from a production run:

{
  "recordType": "playerGame",
  "gameId": "401812480",
  "gameDate": "2025-10-02",
  "gameDatetime": "2025-10-02T16:00Z",
  "gameSeason": 2026,
  "gameSeasonType": 1,
  "gameSeasonTypeName": "Preseason",
  "gameOutcome": "L",
  "teamId": "20",
  "teamNameFull": "Philadelphia 76ers",
  "teamAbbreviation": "PHI",
  "teamCity": "Philadelphia"
}

Truncated — full records contain 107 fields. See Output fields for the complete schema.

Try NBA Stats Scraper for espn.com now — $5 free credit, no credit card →


Pricing

Pay only for what you extract. No subscription required — Apify's free $5 credit covers thousands of results.

Event Price (USD)
Actor Start $0.001
Result $0.0005

See the actor on Apify for current pricing.


FAQ

How do I scrape NBA box scores from espn.com? Use this actor on Apify to extract structured data from espn.com. Configure your search query and filters in the input, then click Start — no coding required.

How do I get NBA box scores from espn.com data as JSON, CSV, or Excel? The actor writes each box score row to Apify's dataset. Download as JSON, CSV, or Excel from the Console, stream via the API, or push to Make, Zapier, Airbyte, or Keboola.

Is it legal to scrape NBA box scores from espn.com? Web scraping of publicly available data is generally legal. This actor only accesses publicly visible information. Always check NBA box scores from espn.com's terms of service for your specific use case.

How much does it cost? Pay-per-event pricing — you only pay for ${NOUNS} extracted. Apify's free $5 credit is enough to run thousands of results before you pay anything.

How does incremental mode work? Each box score row gets a content hash. On subsequent runs, only new or changed box score rows are emitted — saving time, compute, and storage. Expired box score rows can be tracked separately.

Do I need an API key or credentials? No. Just sign up for Apify, paste your input, and click Start. No credit card required.


Related products by Black Falcon Data

Browse all Black Falcon Data actors →


Getting started with Apify

New to Apify? Create a free account with $5 credit — no credit card required.

  1. Sign up — $5 platform credit included
  2. Open NBA Stats Scraper for espn.com and configure your input
  3. Click Start — export results as JSON, CSV, or Excel

Need more later? See Apify pricing.


About Black Falcon Data

Black Falcon Data builds production-grade web scrapers for job boards and marketplace data. Browse our full actor catalog at www.blackfalcondata.com.


Last updated: 2026 09

About

Scrape NBA box scores from espn.com: one row per player per game with the full statline and the team totals - minutes, points, shooting splits, rebounds, assists, turnovers, steals, blocks, fouls and plus/minus, plus opponent and result. Pick a season, a date range or one game.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors