Basketball-reference scraper
ExtractHub extractors are versioned web scrapers: each one is a saved scraper for one kind of page that returns structured JSON through an API. For Basketball-reference (basketball-reference.com) there are 2 public extractors: Basketball-Reference - team season and Basketball-Reference - player page. Together they return fields such as team, season, url, logo, coach, division, summary, roster and 20 more fields. Call one with your API key and a pinned extractor_id, from the REST API, the Batch API or an AI agent over MCP.
Basketball-reference scrapers on ExtractHub
-
basketball-reference.com · @extracthub1/basketball-reference-team@1 (v1.0.0)
A Basketball-Reference team season page (basketball-reference.com/teams/<TEAM>/<year>.html): team, season, logo, coach, division, the summary lines (record, coach, ratings, arena, attendance), the roster (number, player, player link and id, position, height, weight, birth date, country, experience, college) and per-game stats of every player (games, minutes, shooting, rebounds, assists, steals, blocks, turnovers, points). Plain fetch through a US proxy. Pairs with @extracthub1/basketball-reference-player.
Fields:
Basketball-Reference - team season scraper: fields, versions and examples →team,season,url,logo,coach,division,summary,roster,perGame -
basketball-reference.com · @extracthub1/basketball-reference-player@1 (v1.0.0)
Basketball-Reference player pages (basketball-reference.com/players/<letter>/<id>.html): name, player id, headshot, bio lines (full name, position, shoots, height / weight, team, birth, college, draft, debut, experience), birth date and place, height, weight, honors (All-Star, MVP, titles), every regular-season row of the per-game stats table (season, age, team, league, position, games, minutes, shooting splits, rebounds, assists, steals, blocks, turnovers, fouls, points, awards), career and per-team per-game averages and career totals (games, minutes, points, rebounds, assists, steals, blocks).
Fields:
Basketball-Reference - player page scraper: fields, versions and examples →name,playerId,image,bio,birthDate,birthPlace,height,weight,honors,seasonsand 9 more
How to call the Basketball-reference scraper API
Every call needs your API key (X-API-Key) and a pinned extractor_id. This example uses
@extracthub1/basketball-reference-team@1 (Basketball-Reference - team season); open an extractor's page for its batch, Python and Node examples.
curl -X POST "https://api.extracthub.io/api/extractor/extract" \
-H "X-API-Key: $EXTRACTHUB_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"extractor_id": "@extracthub1/basketball-reference-team@1",
"target": { "url": "https://basketball-reference.com/..." }
}' Use ExtractHub to extract https://basketball-reference.com/... with @extracthub1/basketball-reference-team@1 {
"tool": "extract",
"arguments": {
"extractor_id": "@extracthub1/basketball-reference-team@1",
"url": "https://basketball-reference.com/..."
}
} See the web scraping API reference and the web scraping MCP server setup.
Need another Basketball-reference page type?
Build your own Basketball-reference scraper with an AI agent and the extractor builder skill, or in ExtractHub Studio. It stays private until you release it.
Basketball-reference scraper: frequently asked questions
Is there a ready-made Basketball-reference scraper?
Yes. ExtractHub lists 2 public extractors for basketball-reference.com. An extractor is a versioned web scraper for one kind of page: its owner released it as an immutable version with an output schema, and you call that version with your own API key.
What data can I scrape from Basketball-reference?
Basketball-Reference - team season returns team, season, url, logo, coach, division and 3 more. Basketball-Reference - player page returns name, playerId, image, bio, birthDate, birthPlace and 13 more. Every field is listed on the extractor's page with a sample response.
How do I call the Basketball-reference scraper API?
Send GET or POST https://api.extracthub.io/api/extractor/extract with your API key in the X-API-Key header, extractor_id=@extracthub1/basketball-reference-team@1 and the URL of a basketball-reference.com page as the target. For many URLs use POST https://api.extracthub.io/api/extractor/batch. AI agents call the same extractor through the extract tool of the ExtractHub MCP server at https://api.extracthub.io/mcp.
Can I build my own Basketball-reference scraper?
Yes. Build an extractor for any Basketball-reference page type in ExtractHub Studio, or let an AI agent such as Claude Code build, test and release it with the open-source extractor builder skill. New extractors are private until you release them.