{"id":1836,"date":"2026-03-29T18:06:37","date_gmt":"2026-03-29T18:06:37","guid":{"rendered":"https:\/\/www.webharvy.com\/blog\/?p=1836"},"modified":"2026-03-29T18:06:37","modified_gmt":"2026-03-29T18:06:37","slug":"web-scraping-sofascore-match-statistics","status":"publish","type":"post","link":"https:\/\/www.webharvy.com\/blog\/web-scraping-sofascore-match-statistics\/","title":{"rendered":"Web Scraping Sofascore &#8211; Match Statistics"},"content":{"rendered":"\n<p>SofaScore is a popular live sports scores and statistics website which shows data for a wide range of sports in real time. In this article you will learn how to scrape match statistics from SofaScore website using WebHarvy. <\/p>\n\n\n\n<p>WebHarvy lets you scrape match statistics from SofaScore website via an easy-to-use, point-and-click user interface. You can select the details which you need to scrape for each match by just clicking over the item text during the configuration process. <\/p>\n\n\n\n<p>You will need to download and install WebHarvy on your computer. A free 15 days trial version of WebHarvy is available <a href=\"https:\/\/www.webharvy.com\/download.html\">here<\/a>. In addition to scraping data from SofaScore, WebHarvy also supports extracting data from other sports live score and betting websites like <a href=\"https:\/\/www.webharvy.com\/articles\/scraping-oddsportal.html\">OddsPortal<\/a>, <a href=\"https:\/\/www.webharvy.com\/articles\/scraping-flashscore.html\">FlashScore<\/a>, <a href=\"https:\/\/www.webharvy.com\/blog\/scrape-whoscored-live-scores\/\">WhoScored<\/a>, <a href=\"https:\/\/www.webharvy.com\/articles\/scraping-betexplorer.html\">BetExplorer<\/a>, <a href=\"https:\/\/www.webharvy.com\/blog\/scraping-statscore-live-scores\/\">StatScore<\/a> etc. <\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Scraping Team Lineup, Substitutions, Cards, Goals etc.<\/h2>\n\n\n\n<p>Team lineup, substitutions, yellow\/red cards, goal details etc. can be scraped from the match details page at SofaScore website. The lineup details can be selected for extraction by direct mouse clicks (refer video displayed below). The Goal Keeper, Defence, Mid field and Forward layers of the lineup can be separately extracted. <\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"631\" src=\"https:\/\/www.webharvy.com\/blog\/wp-content\/uploads\/2026\/03\/image-9-1024x631.png\" alt=\"Scraping SofaScore Team Lineup\" class=\"wp-image-1837\" srcset=\"https:\/\/www.webharvy.com\/blog\/wp-content\/uploads\/2026\/03\/image-9-1024x631.png 1024w, https:\/\/www.webharvy.com\/blog\/wp-content\/uploads\/2026\/03\/image-9-300x185.png 300w, https:\/\/www.webharvy.com\/blog\/wp-content\/uploads\/2026\/03\/image-9-768x473.png 768w, https:\/\/www.webharvy.com\/blog\/wp-content\/uploads\/2026\/03\/image-9-1536x946.png 1536w, https:\/\/www.webharvy.com\/blog\/wp-content\/uploads\/2026\/03\/image-9.png 2026w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>Details like goals, red\/yellow cards and substitutions can be selected from the left side pane (towards the left of the lineup graphics) by using <a href=\"https:\/\/www.webharvy.com\/articles\/regex.html\">Regular Expressions<\/a>. By selecting the entire text of this pane and by applying Regular Expression on the HTML source behind the text, the desired details can be extracted. <\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"655\" src=\"https:\/\/www.webharvy.com\/blog\/wp-content\/uploads\/2026\/03\/image-10-1024x655.png\" alt=\"\" class=\"wp-image-1838\" srcset=\"https:\/\/www.webharvy.com\/blog\/wp-content\/uploads\/2026\/03\/image-10-1024x655.png 1024w, https:\/\/www.webharvy.com\/blog\/wp-content\/uploads\/2026\/03\/image-10-300x192.png 300w, https:\/\/www.webharvy.com\/blog\/wp-content\/uploads\/2026\/03\/image-10-768x491.png 768w, https:\/\/www.webharvy.com\/blog\/wp-content\/uploads\/2026\/03\/image-10-1536x982.png 1536w, https:\/\/www.webharvy.com\/blog\/wp-content\/uploads\/2026\/03\/image-10.png 1830w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>The regular expressions for selecting card details, substitutions and goal details are given below.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Yellow card&#91;\\s\\S]*?&lt;span&#91;^>]*>(&#91;^&lt;]*)\n\nRed card&#91;\\s\\S]*?&lt;span&#91;^>]*>(&#91;^&lt;]*)\n\nSubstitution&#91;\\s\\S]*?&lt;span&#91;^>]*>(&#91;^&lt;]*)\n\n>Goal&#91;\\s\\S]*?&lt;span&#91;\\s\\S]*?&lt;span&#91;^>]*>(&#91;^&lt;]*)\n\n>Own goal&#91;\\s\\S]*?&lt;span&#91;\\s\\S]*?&lt;span&#91;^>]*>(&#91;^&lt;]*)<\/code><\/pre>\n\n\n\n<p>For the detailed steps, please refer to the following video.<\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe loading=\"lazy\" title=\"Scraping Sofascore | Lineup, Substitutions, Red\/Yellow Cards, Goal Scorers etc.\" width=\"1200\" height=\"675\" src=\"https:\/\/www.youtube.com\/embed\/kdDtuvvTz5U?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe>\n<\/div><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Scraping Match Scores and Odds<\/h2>\n\n\n\n<p>The following video shows how WebHarvy can be configured to scrape match scores and odds (Home\/Draw\/Away odds) for all matches in a league (LaLiga). <\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-4-3 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe loading=\"lazy\" title=\"Scraping SofaScore Match Statistics and Odds using WebHarvy\" width=\"1200\" height=\"900\" src=\"https:\/\/www.youtube.com\/embed\/Y_4eivyvE0U?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe>\n<\/div><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Try WebHarvy<\/h2>\n\n\n\n<p><\/p>\n\n\n\n<p>In case you are interested in using WebHarvy to scrape match data including live scores and odds from SofaScore website, we recommend that you refer to our <a href=\"https:\/\/www.webharvy.com\/articles\/getting-started.html\">getting started guide<\/a>. <\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Have questions?<\/h2>\n\n\n\n<p>In case you have any questions or need assistance in configuring WebHarvy please <a href=\"https:\/\/www.webharvy.com\/support.html\">contact our support team<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Related<\/h2>\n\n\n\n<ol class=\"wp-block-list\">\n<li><a href=\"https:\/\/www.webharvy.com\/blog\/scraping-statscore-live-scores\/\">Scraping Live Scores from StatScore.com<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/www.webharvy.com\/blog\/web-scraping-footystats-org-football-statistics\/\">Web Scraping Football Statistics from FootyStats.org<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/www.webharvy.com\/blog\/scrape-whoscored-live-scores\/\">Scraping WhoScored.com Live Scores<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/www.webharvy.com\/blog\/how-to-scrape-football-live-scores\/\">How to scrape football live scores?<\/a><\/li>\n<\/ol>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Learn how to scrape live match statistics including scores and betting odds from SofaScore website using WebHarvy<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2,7,8],"tags":[209],"class_list":["post-1836","post","type-post","status-publish","format-standard","hentry","category-use-case","category-web-scraping-workshop","category-webharvy","tag-sofascore"],"_links":{"self":[{"href":"https:\/\/www.webharvy.com\/blog\/wp-json\/wp\/v2\/posts\/1836","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.webharvy.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.webharvy.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.webharvy.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.webharvy.com\/blog\/wp-json\/wp\/v2\/comments?post=1836"}],"version-history":[{"count":5,"href":"https:\/\/www.webharvy.com\/blog\/wp-json\/wp\/v2\/posts\/1836\/revisions"}],"predecessor-version":[{"id":1843,"href":"https:\/\/www.webharvy.com\/blog\/wp-json\/wp\/v2\/posts\/1836\/revisions\/1843"}],"wp:attachment":[{"href":"https:\/\/www.webharvy.com\/blog\/wp-json\/wp\/v2\/media?parent=1836"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.webharvy.com\/blog\/wp-json\/wp\/v2\/categories?post=1836"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.webharvy.com\/blog\/wp-json\/wp\/v2\/tags?post=1836"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}