SofaScore API

A place to discuss anything.
Post Reply
Taff15
Posts: 28
Joined: Thu May 26, 2022 9:13 pm

I have made a lot of headway designing my own scraper, via VBA, to get in play stats from sofascore,

I am hitting a brick wall when trying to get minutes played, keep getting a N/A return - its doing my head in!!

does anybody possibly have a line of code that may help me in my quest?

Cheers

Taff
User avatar
Euler
Posts: 26487
Joined: Wed Nov 10, 2010 1:39 pm

I was under the impression they had stopped people from scraping anything?
Fugazi
Posts: 935
Joined: Wed Jan 10, 2024 7:20 pm

Taff15 wrote:
Mon Mar 17, 2025 12:36 pm
I have made a lot of headway designing my own scraper, via VBA, to get in play stats from sofascore,

I am hitting a brick wall when trying to get minutes played, keep getting a N/A return - its doing my head in!!

does anybody possibly have a line of code that may help me in my quest?

Cheers

Taff
Try using gpts deep research function. Explain very specifically the problem. You get ten tokens a month so make sure they are used wisely!
User avatar
ShaunWhite
Posts: 10559
Joined: Sat Sep 03, 2016 3:42 am

Fugazi wrote:
Mon Mar 17, 2025 2:26 pm

Try using gpts deep research function. Explain very specifically the problem. You get ten tokens a month so make sure they are used wisely!
Did it explain why it's just the minutes played that's problematic?
Taff15
Posts: 28
Joined: Thu May 26, 2022 9:13 pm

Cheers for the pointer - Got there in the end, just an issue with Halftime reporting but loosing too much sleep already on this. so will come back to it. Thank heavens for AI - a positive use.
You do not have the required permissions to view the files attached to this post.
User avatar
Euler
Posts: 26487
Joined: Wed Nov 10, 2010 1:39 pm

So it's still possible to scrape from Sofascore?
Taff15
Posts: 28
Joined: Thu May 26, 2022 9:13 pm

Yeap.

I had no warnings, or requests for payments etc
User avatar
jimibt
Posts: 4200
Joined: Mon Nov 30, 2015 6:42 pm

Euler wrote:
Mon Mar 17, 2025 2:50 pm
So it's still possible to scrape from Sofascore?
looks like it's still there (used to scrape it via this url years back but no longer do, so can't vouch for ip bans etc):
https://www.sofascore.com/api/v1/sport/ ... vents/live
User avatar
wearthefoxhat
Posts: 3588
Joined: Sun Feb 18, 2018 9:55 am

Taff15 wrote:
Mon Mar 17, 2025 2:44 pm
Cheers for the pointer - Got there in the end, just an issue with Halftime reporting but loosing too much sleep already on this. so will come back to it. Thank heavens for AI - a positive use.

Good work with VBA. It's on my to do list.
User avatar
ODPaul82
Posts: 818
Joined: Sun May 08, 2011 6:32 am

attached code I use for sofascore extraction.
It won't compile on its own as its just one module of my entire tool but feel free to rip what you want from it.

The unicode part of team names I never finished (have a correction table in DB it stores to that will return the BF name in query)
I wouldn't call the API constantly otherwise cloudflare might block you, I have a 30 second delay in place for each call
You do not have the required permissions to view the files attached to this post.
User avatar
STEVE789
Posts: 1
Joined: Tue Mar 18, 2025 11:59 am

Taff15 wrote:
Mon Mar 17, 2025 12:36 pm
I have made a lot of headway designing my own scraper, via VBA, to get in play stats from sofascore,

I am hitting a brick wall when trying to get minutes played, keep getting a N/A return - its doing my head in!!

does anybody possibly have a line of code that may help me in my quest?

Cheers

Taff
Oi Taff, fair play for diving into VBA scraping – not for the faint-hearted! 😂 That N/A for minutes played sounds like classic dynamic content messing with your head. Sofascore loves loading stuff with JavaScript, so VBA might not be seeing the live data.

You might need to sniff out the API they use (check dev tools > network tab) – chances are the minutes are coming from there. Then you can grab it straight with VBA, no messing with the page itself.

If you're scraping from the HTML, maybe you're just missing the right element – chuck over your code line if you want, happy to have a quick look and help you out of the madness!
Taff15
Posts: 28
Joined: Thu May 26, 2022 9:13 pm

reaching out to this knowledgeable group, again.....

i have managed to get everything set up to take the games and stats from Sofascore, match the names with betfair, transfer the odds, then via some 'in house' shenanigans identify various in play trades.....BUT...

Having trialled and sense checked against other sources, i have found that the SofaScore stats and timings are either slow, misleading, or some times just wrong!! as well as getting cut out by the amount of API calls, particularly on a weekend.

I originally went down the route of Sofascore, cos I wanted the challenge and didn't want to pay for any data, but all my research says I've got to get my hands in my pockets and pay up if i want quality.

So does anyone have any experience or knowledge of API feeds for football data, at a reasonable price, which may be useful and which i could investigate further. Not looking for OPTA/Sports Monks detail, just enough to suit an enthusiastic user with too much time on their hands......

Cheers

Taff
User avatar
ShaunWhite
Posts: 10559
Joined: Sat Sep 03, 2016 3:42 am

There's far fewer suppliers of data to the industry than businesses repackaging it like Sofascore. The budget firms will probably all be using the same cheap source (one person and a mobile) and have the same delays and inaccuracies. The premium outfits like Opta or RunningBall are the price they are because the have more tech and people at the games working exclusively for them.... And even those who source from Opta and repackage, will have delays as part of a non competitive clause in their contract.

Don't mistake cost with value when it comes to data. You get what you pay for.
User avatar
ODPaul82
Posts: 818
Joined: Sun May 08, 2011 6:32 am

Limit your calls to Sofascore to every 25-30 seconds otherwise you'll get a potential cloudflare ban or repeated 503 errors from their varnish server.
I have zero issues with timing
You do not have the required permissions to view the files attached to this post.
DanTheMan1
Posts: 66
Joined: Sun Feb 28, 2021 11:12 am

I use Live Score and haven't had any issues with anything at all at the moment,(Been Running It For Quite A While), I randomize the call so every one is different, between 1 and 4 seconds. Seems to do the trick, fingers and toes crossed :D
Fast enough for the strategies that I use.
You do not have the required permissions to view the files attached to this post.
Post Reply

Return to “General discussion”