Basketball Reference Scraper
Spider read basketball-reference.com in 182 ms without a browser and returned 919 lines of clean markdown, including sections like "Every NBA Team", "2025-26 NBA Standings" and "Stathead Basketball Powered By Basketball Reference".
Player pages include basic statistics and links to player's game logs, splits, advanced stats, and more.## Every NBA Team### 2025-26 NBA StandingsTeam pages include statistics, rosters, payroll, schedules, game logs, splits, advanced stats, and more.## Stathead Basketball Powered By Basketball Reference### The sports search engine that was made for *fans like you*Exploring the Basketball Reference database just got easierhttps://www.sports-reference.com/stathead/sport/basketball?&utm_medium=sr_xsite&utm_source=bbr&utm_campaign=2023_02_wdgt_home_stathead&utm_content=bttn_start_your_free_trial>)https://www.sports-reference.com/stathead/basketball-sample-searches.html?&utm_medium=sr_xsite&utm_source=bbr&utm_campaign=2023_02_wdgt_home_stathead&utm_content=bttn_learn_more>)* Access to the most complete sports database on the internet* Discovery tools to search the Basketball Reference database* Ad free viewing on Basketball Reference**Which team has the highest average margin of victory in a season?**https://www.sports-reference.com/stathead/tiny/lZOnG?&utm_medium=sr_xsite&utm_source=bbr&utm_campaign=2023_02_wdgt_home_stathead&utm_content=bttn_see_it_on_stathead>)### Stathead Resourceshttps://info.stathead.com/stathead-basketball-getting-started?&utm_medium=sr_xsite&utm_source=bbr&utm_campaign=2023_02_wdgt_home_stathead&utm_content=bttn_tips_and_tricks>)https://faq.sports-reference.com/portal/en/newticket?&utm_medium=sr_xsite&utm_source=bbr&utm_campaign=2023_02_wdgt_home_stathead&utm_content=bttn_contact_us>)https://www.youtube.com/watch?v=Kg4p7G6wlcI&list=PLjwfEr7H29D8Wrwt6o0Cor_OOaTScOf3a&utm_medium=sr_xsite&utm_source=bbr&utm_campaign=2023_02_wdgt_home_stathead&utm_content=bttn_tutorials>) The same call, in code.
The capture above came back as markdown. These examples add a key, so you get browser rendering, proxies, and concurrency on basketball-reference.com.
import { SpiderBrowser } from "spider-browser";
const spider = new SpiderBrowser({
apiKey: process.env.SPIDER_API_KEY!,
});
await spider.connect();
const page = spider.page!;
await page.goto("https://www.basketball-reference.com/leagues/NBA_2025_per_game.html");
// No selectors, no schema. Spider reads the page and names the fields.
const data = await page.scrape();
console.log(data);
await spider.close(); import { SpiderBrowser } from "spider-browser";
const spider = new SpiderBrowser({
apiKey: process.env.SPIDER_API_KEY!,
});
await spider.connect();
const page = spider.page!;
await page.goto("https://www.basketball-reference.com/leagues/NBA_2025_per_game.html");
await page.content();
const data = await page.evaluate(`(() => {
const players = [];
document.querySelectorAll("#per_game_stats tbody tr:not(.thead)").forEach(el => {
const name = el.querySelector("td[data-stat='player'] a")?.textContent?.trim();
const team = el.querySelector("td[data-stat='team_id'] a")?.textContent?.trim();
const ppg = el.querySelector("td[data-stat='pts_per_g']")?.textContent?.trim();
const rpg = el.querySelector("td[data-stat='trb_per_g']")?.textContent?.trim();
const apg = el.querySelector("td[data-stat='ast_per_g']")?.textContent?.trim();
if (name) players.push({ name, team, ppg, rpg, apg });
});
return JSON.stringify({ total: players.length, players: players.slice(0, 15) });
})()`);
console.log(JSON.parse(data));
await spider.close(); Ready for volume? Get an API key →
Fields you can pull.
Spider names these from the page. The capture above came back as markdown; the same
call with return_format: "json" returns them as keys.
What basketball-reference.com costs to scrape.
The capture above cost $0.00051 to fetch. Pricing is $1 per GB of pre-transformation bandwidth plus $0.001 per CPU minute, so a page like this one lands at a fraction of a cent. Failed requests are billed at $0.
- Free balance on signup
- No card required to test
- Balance never expires
Run it keyless, no account
More Sports & Fitness scrapers.
ESPN Scraper
Extract live scores, game schedules, standings, and sports news from ESPN across all major leagues.
NBA.com Scraper
Extract NBA game scores, player stats, team standings, and league news from the official NBA site.
NFL.com Scraper
Extract NFL game scores, team schedules, player stats, and league news from the official NFL site.
Start scraping basketball-reference.com.
You already have the call. A key raises the rate limit and turns on browser rendering, proxies, and concurrency. Balance never expires, and top-ups go through secure checkout.