Skip to content

getascraper/how-to-scrape-sofascore

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SofaScore Scraper: Live scores, fixtures and results

Apify Actor Actor Version Actor Price GitHub Issues Last Commit

Scrape SofaScore live scores, fixtures, and results across 13 sports, plus deep match statistics, incidents, lineups, and player/team search. No login or API key. $0.80 per 1,000 results.

SofaScore Scraper on Apify


Why use SofaScore Scraper

  • Every sport in one actor: football, basketball, tennis, ice hockey, baseball, handball, volleyball, snooker, rugby, MMA, cricket, American football, and esports.
  • Live and historical in one place: pull in-play matches minute by minute, or a full day of fixtures and results for any date.
  • Deep match detail on demand: possession, shots, expected goals, the full incident timeline, and starting lineups for any match.
  • Player and team lookup: search by name and get followers, country, position, and current team.
  • No login, no API key: point it at a sport or a date and press start.

How to use SofaScore Scraper

  1. Pick a mode: Live events, Scheduled events, Event detail, or Search.
  2. Choose a sport, and set a date or search query if your mode needs one.
  3. Click Start: The actor collects every matching record and writes one flat row per item.
  4. Download your results: Export as Excel, CSV, JSON, or HTML from the Output tab.

Input

Field Type Required Description
mode string Yes What to scrape: liveEvents, scheduledEvents, eventDetail, or search.
sport string No One of 13 sports. Applies to live, scheduled, and search modes. Default football.
date string No Day to fetch fixtures and results for, as YYYY-MM-DD. Empty means today. Scheduled events mode only.
statusFilter string No Keep only all, live, scheduled, or finished matches. Live and scheduled modes.
query string No Name of a player, team, manager, or referee. Search mode only.
events array No Match IDs or SofaScore match URLs to fetch detail for. Event detail mode only.
includeStatistics boolean No Attach possession, shots, expected goals, and more. Event detail mode.
includeIncidents boolean No Attach the goal, card, and substitution timeline. Event detail mode.
includeLineups boolean No Attach starting lineups, formations, and player ratings. Event detail mode.
maxItems integer No Maximum records to return. Use 0 for no limit. Default 100.
proxyConfiguration object No Proxy settings. Residential is the recommended default.

Output

Each row in your dataset is one match, match detail, or search result. All fields are flat with no unnecessary nesting, so the file opens cleanly in any spreadsheet program.

{
  "rowType": "event",
  "id": 16269305,
  "matchName": "Finland U17 - Latvia U17",
  "sport": "football",
  "tournament": "Baltic Cup U17",
  "category": "Europe",
  "season": "2026",
  "round": 3,
  "statusType": "inprogress",
  "statusDescription": "1st half",
  "startTime": "2026-07-02T12:00:00.000Z",
  "homeTeam": "Finland U17",
  "awayTeam": "Latvia U17",
  "homeScore": 0,
  "awayScore": 0,
  "eventUrl": "https://www.sofascore.com/latvia-u17-finland-u17/ccjsxcj"
}

A search result looks like this:

{
  "rowType": "searchResult",
  "entityType": "player",
  "name": "Lionel Messi",
  "country": "Argentina",
  "teamName": "Inter Miami CF",
  "position": "F",
  "jerseyNumber": "10",
  "userCount": 2688466,
  "entityUrl": "https://www.sofascore.com/player/lionel-messi/12994"
}

Data table

Field Type Description
rowType string Row kind: event, eventDetail, or searchResult.
id number SofaScore event or entity ID.
matchName string Home and away teams combined, e.g. "Home - Away".
sport string Sport of the match.
tournament string Competition name.
category string Region or country group of the competition.
season string Season the match belongs to.
round number Round or matchday number.
statusType string inprogress, notstarted, finished, postponed, and similar.
statusDescription string Human status, e.g. "1st half", "Ended".
startTime string Kickoff time in ISO 8601 UTC.
homeTeam / awayTeam string Team or player names.
homeScore / awayScore number Current score. Absent before kickoff.
winnerCode number Which side won, once a match is finished.
statistics array Match statistics such as possession, shots, and expected goals. Event detail mode.
incidents array Timeline of goals, cards, and substitutions. Event detail mode.
lineups object Starting lineups, formations, and ratings. Event detail mode.
entityType string For search rows: player, team, manager, or referee.
name string For search rows: the entity name.
teamName string For search rows: the player's current team.
userCount number For search rows: number of followers on SofaScore.
entityUrl string For search rows: link to the entity on SofaScore.

Pricing

This actor is priced per event. A match or result costs $0.0015 (about $1.50 per 1,000), and a match detail row (statistics, incidents, or lineups) also costs $0.0015 (about $1.50 per 1,000). The first 50 results of every run are completely free, and there are no monthly subscriptions or minimum commits.

You only pay for the records you collect. A typical run of 100 matches completes in under a minute.


Quick start

Create a .env file from .env.example, add your Apify API token, and run:

npm install
npm start

The script uses the Apify API client to start the actor on Apify Store and fetch results.


Tips and optimization

  • Start with Live events: run Live events or Scheduled events first to collect match IDs before pulling detail.
  • Only request what you need: turn off includeLineups if you only need scores and statistics, since lineups are not published for every match.
  • Cap your budget: use maxItems to keep any run within your budget.
  • Schedule for freshness: use the Apify Scheduler to refresh live scores every few minutes, or fixtures and results once a day.

FAQ

Is scraping SofaScore legal? This actor collects only public data that anyone can view on SofaScore without logging in. Scraping public data is generally legal, but you are responsible for how you use the results.

Do I need a SofaScore account or API key? No. The actor needs no login, no password, and no API key. Just choose a mode and press start.

How do I get statistics and lineups for a match? Run Live events or Scheduled events first to collect match IDs, then run Event detail mode with those IDs and switch on statistics, incidents, and lineups. Some lower league matches do not publish full statistics or lineups.

Which sports are supported? Football, basketball, tennis, ice hockey, baseball, handball, volleyball, snooker, rugby, MMA, cricket, American football, and esports.


Support

For bug reports, missing fields, or feature requests, open an issue under the Issues tab.

About

Scrape SofaScore live scores, fixtures, and results across 13 sports, plus deep match statistics, incidents, lineups, and player/team search. No login or API key. $0.80 per 1,000 results.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors