Using JSON to pull data from web

sitewolf

Active Member
Joined
May 4, 2012
Messages
295
If I still had hair I'd be pulling it out about now.
I'm trying to find a way to scrape tournament statistics from pgatour.com
Other than ESPN (who tends to be incomplete) it's the only source I know of to get all I want.
I've not figured how to do it with other web queries, but just when I thought I was making headway with JSON (which I know just enough to be dangerous, at best) I'm close but not there.

For example, with this link I'm able to import data for each hole into my spread (Office 365 btw)
https://statdata.pgatour.com/r/019/...5b5af125e7a11cd7b97894d14df0e4ee80eb6f824f463

But what I really want is the tournament statistic table of pages like this:
Drilling down the div class for scorecards is player-scorecards-module while the one I want is player-tournament-stats-module so I'd thought swapping tournament-stats for scorecards in the above link might get me there, but I really don't know how to get trackingID, hmac, etc or if that's actually where my problem is.

My end game is to extract each round's tournament stats for each player in the tournament. I can largely get that in one copy/paste from AT&T Byron Nelson - Golf Leaderboard and Results - ESPN but they simply don't always have complete stats displaying, so I've assumed any API they have would have the same issue.
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.

Marc L

Well-known Member
Joined
Apr 5, 2021
Messages
1,135
Office Version
  1. 2010
Platform
  1. Windows
You forgot to post the code you have done …​
 

sitewolf

Active Member
Joined
May 4, 2012
Messages
295
You forgot to post the code you have done …​
What code would I post? Thus far I've used a typical import from web using that link then opening up some of the columns in power query.
The only 'code' would be from doing that...but that'd be in scorecards while what I want is the tournament statistics table.
 

sitewolf

Active Member
Joined
May 4, 2012
Messages
295
I am still respectfully requesting help in resolving this.
My preference would be to be able to pull the stats I need with Excel, but I'm also looking to Sheets as a possibility.
 

Forum statistics

Threads
1,136,323
Messages
5,675,087
Members
419,549
Latest member
EliteBeat

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top