SofaScore API

A place to discuss anything.
Post Reply
Taff15
Posts: 25
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: 26200
Joined: Wed Nov 10, 2010 1:39 pm

I was under the impression they had stopped people from scraping anything?
Fugazi
Posts: 932
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: 10354
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: 25
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: 26200
Joined: Wed Nov 10, 2010 1:39 pm

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

Yeap.

I had no warnings, or requests for payments etc
User avatar
jimibt
Posts: 4192
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: 3551
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: 789
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!
Post Reply

Return to “General discussion”