Jump to content
IGNORED

USGA GHIN API


Zippo

Recommended Posts

Any of you folk out there programmers? I've been attempting to access the USGA GHIN API via VBA and JSON but, so far have not been completely successful. I've done the usual search thing on the interwebs but I thought I'd check and see if any of you had attempted this as well.

Dagnabbit! Sorry about the case use on the subject line - again.

Link to comment
Share on other sites


  • iacas changed the title to USGA GHIN API
  • Administrator

Why would they allow you to do this? And what is it that you're trying to do?

Erik J. Barzeski —  I knock a ball. It goes in a gopher hole. 🏌🏼‍♂️
Director of Instruction Golf Evolution • Owner, The Sand Trap .com • AuthorLowest Score Wins
Golf Digest "Best Young Teachers in America" 2016-17 & "Best in State" 2017-20 • WNY Section PGA Teacher of the Year 2019 :edel: :true_linkswear:

Check Out: New Topics | TST Blog | Golf Terms | Instructional Content | Analyzr | LSW | Instructional Droplets

Link to comment
Share on other sites

Awards, Achievements, and Accolades

13 minutes ago, iacas said:

Why would they allow you to do this? And what is it that you're trying to do?

You would have to ask them why they allow it since they're the ones who created the API. 

I'm doing some "work" for a local golf group (around 80 members). Basically, we need to retrieve hdcps from the API to calculate net scores.

Link to comment
Share on other sites


  • Administrator
40 minutes ago, Zippo said:

You would have to ask them why they allow it since they're the ones who created the API. 

I'm doing some "work" for a local golf group (around 80 members). Basically, we need to retrieve hdcps from the API to calculate net scores.

You're missing my point: why would they allow you to do it? They can create an API for authorized access. They could restrict access any number of ways.

The existence of an API only means that some systems can access it. Not any system.

So, Dozey, I think they've made some changes recently that restricts access to some APIs to authorized programs. you may not be able to do some of the things you may have been able to do four years ago.

Erik J. Barzeski —  I knock a ball. It goes in a gopher hole. 🏌🏼‍♂️
Director of Instruction Golf Evolution • Owner, The Sand Trap .com • AuthorLowest Score Wins
Golf Digest "Best Young Teachers in America" 2016-17 & "Best in State" 2017-20 • WNY Section PGA Teacher of the Year 2019 :edel: :true_linkswear:

Check Out: New Topics | TST Blog | Golf Terms | Instructional Content | Analyzr | LSW | Instructional Droplets

Link to comment
Share on other sites

Awards, Achievements, and Accolades

32 minutes ago, iacas said:

You're missing my point: why would they allow you to do it? They can create an API for authorized access. They could restrict access any number of ways.

The existence of an API only means that some systems can access it. Not any system.

So, Dozey, I think they've made some changes recently that restricts access to some APIs to authorized programs. you may not be able to do some of the things you may have been able to do four years ago.

I get your point. But, all I'm looking to do is pass a ghin number and get back a handicap. Why would they not want me to do that? I can do that by logging into their website and visiting the "Following" page - whether I'm following a golfer or not. The API has a functon to return a handicap index given a ghin number so there's nothing nefarious about the request.

But, you are correct. This is not 4 years ago.

 

Link to comment
Share on other sites


  • Administrator

Because while you’re doing it on a small scale it could be done on a larger one? One that takes resources and would slow the site for others, cost money, etc.?

Maybe it’s possible. I don’t know. Probably not a lot of people hacking at the GHIN API here. 🙃

Erik J. Barzeski —  I knock a ball. It goes in a gopher hole. 🏌🏼‍♂️
Director of Instruction Golf Evolution • Owner, The Sand Trap .com • AuthorLowest Score Wins
Golf Digest "Best Young Teachers in America" 2016-17 & "Best in State" 2017-20 • WNY Section PGA Teacher of the Year 2019 :edel: :true_linkswear:

Check Out: New Topics | TST Blog | Golf Terms | Instructional Content | Analyzr | LSW | Instructional Droplets

Link to comment
Share on other sites

Awards, Achievements, and Accolades

@Zippo A better way would be to simply ask the Admin of the club who hosts your Ghin to send you the daily roster updates via email.
Another method would be to copy and paste the players hdc info needed to a spreadsheet. (an option if you only need an update a few times a week or maybe once)
And as an option, I believe USGA allows groups to form their own group. It still requires the annual fee per player. 
 

Johnny Rocket - Let's Rock and Roll and play some golf !!!

Link to comment
Share on other sites

Awards, Achievements, and Accolades

  • Administrator
22 minutes ago, Club Rat said:

@Zippo A better way would be to simply ask the Admin of the club who hosts your Ghin to send you the daily roster updates via email.

That assumes that he's looking for the GHIN info for members of one club.

22 minutes ago, Club Rat said:

Another method would be to copy and paste the players hdc info needed to a spreadsheet. (an option if you only need an update a few times a week or maybe once)

That's not a viable option to a programmer. "Viable" isn't the right word there because it would "work" but it's not really something a programmer would do for something like what he may be looking to do.

Erik J. Barzeski —  I knock a ball. It goes in a gopher hole. 🏌🏼‍♂️
Director of Instruction Golf Evolution • Owner, The Sand Trap .com • AuthorLowest Score Wins
Golf Digest "Best Young Teachers in America" 2016-17 & "Best in State" 2017-20 • WNY Section PGA Teacher of the Year 2019 :edel: :true_linkswear:

Check Out: New Topics | TST Blog | Golf Terms | Instructional Content | Analyzr | LSW | Instructional Droplets

Link to comment
Share on other sites

Awards, Achievements, and Accolades

1 hour ago, iacas said:

That's not a viable option to a programmer. "Viable" isn't the right word there because it would "work" but it's not really something a programmer would do for something like what he may be looking to do.

True, but his objective is to simply obtain the groups (80 players is a small group) daily hdcp updates.

And / IF the group maintains their hdcp all from the club / association, then having the admin send him a daily report is a simple solution. Our groups did have players from various courses and often we had guests play.
For them it required a manual lookup. I used the copy and paste method from my friends list for those players who were members at different cubs, no biggie. 

Also, not knowing the timeframe requirements needed, daily, once a week, twice a week, he could request reports for only days required. 

And as you mentioned, the USGA will not likely grant him access to the data unless he forms his own group and pays the annual fee per player maintained. 

Johnny Rocket - Let's Rock and Roll and play some golf !!!

Link to comment
Share on other sites

Awards, Achievements, and Accolades

  • Administrator
9 hours ago, Club Rat said:

IF the group maintains their hdcp all from the club

Well that's a big leap.

And it still requires a lot more work than pulling the selected data from an array of GHIN #s and pre-filling stuff out programmatically.

Erik J. Barzeski —  I knock a ball. It goes in a gopher hole. 🏌🏼‍♂️
Director of Instruction Golf Evolution • Owner, The Sand Trap .com • AuthorLowest Score Wins
Golf Digest "Best Young Teachers in America" 2016-17 & "Best in State" 2017-20 • WNY Section PGA Teacher of the Year 2019 :edel: :true_linkswear:

Check Out: New Topics | TST Blog | Golf Terms | Instructional Content | Analyzr | LSW | Instructional Droplets

Link to comment
Share on other sites

Awards, Achievements, and Accolades

2 hours ago, iacas said:

Well that's a big leap.

And it still requires a lot more work than pulling the selected data from an array of GHIN #s and pre-filling stuff out programmatically.

Exactly. But, if it ain't doable then it ain't doable. I think I'm close, though. It's now returning an "invalid email/password" error where previously it was returning a no content error. That tells me that I'm probably not formating that data correctly when I send it to the API.

I did send a request for info to the USGA GHIN folk, but I'll be very surprised if I get a response. I'm sure they're shorthanded and busy like everyone else.

Link to comment
Share on other sites


On 2/28/2022 at 7:21 PM, Zippo said:

Exactly. But, if it ain't doable then it ain't doable. I think I'm close, though. It's now returning an "invalid email/password" error where previously it was returning a no content error. That tells me that I'm probably not formating that data correctly when I send it to the API.

I did send a request for info to the USGA GHIN folk, but I'll be very surprised if I get a response. I'm sure they're shorthanded and busy like everyone else.

So, I did get an answer to my request for info from the USGA GHIN folk. It wasn't the answer I was hoping for, but I do sincerely appreciate them getting back to me. Basically, what he said was, "they have a requirement that your software supports 10 clubs or 1,400 golfers." That's clear enough so I'll get with the league folk and see about other options.

Link to comment
Share on other sites


  • Administrator
2 hours ago, Zippo said:

So, I did get an answer to my request for info from the USGA GHIN folk. It wasn't the answer I was hoping for, but I do sincerely appreciate them getting back to me. Basically, what he said was, "they have a requirement that your software supports 10 clubs or 1,400 golfers." That's clear enough so I'll get with the league folk and see about other options.

In other words, we can't just have everyone scraping our stuff for piddly little stuff. 😄

Erik J. Barzeski —  I knock a ball. It goes in a gopher hole. 🏌🏼‍♂️
Director of Instruction Golf Evolution • Owner, The Sand Trap .com • AuthorLowest Score Wins
Golf Digest "Best Young Teachers in America" 2016-17 & "Best in State" 2017-20 • WNY Section PGA Teacher of the Year 2019 :edel: :true_linkswear:

Check Out: New Topics | TST Blog | Golf Terms | Instructional Content | Analyzr | LSW | Instructional Droplets

Link to comment
Share on other sites

Awards, Achievements, and Accolades

On 2/28/2022 at 7:51 AM, Club Rat said:

@Zippo
Another method would be to copy and paste the players hdc info needed to a spreadsheet.
 

His “club” should be able to do that without copy and paste. Unless the system has changed. I did that a couple of years ago to set up a book for a tournament.

Bill M

Link to comment
Share on other sites

Awards, Achievements, and Accolades

57 minutes ago, phan52 said:

His “club” should be able to do that without copy and paste. Unless the system has changed. I did that a couple of years ago to set up a book for a tournament.

Sorry. There is no club.

2 hours ago, iacas said:

In other words, we can't just have everyone scraping our stuff for piddly little stuff. 😄

Yeah. Actually, I probably could scrape the info off their website at the "following page" but that's closer to "hacking" than I'm comfortable doing and it's far more resource intensive on their site than the API would have been.  No worries. There's always a plan B.

Link to comment
Share on other sites


  • 9 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Want to join this community?

    We'd love to have you!

    Sign Up
  • TST Partners

    TourStriker PlaneMate
    Golfer's Journal
    ShotScope
    The Stack System
    FlightScope Mevo
    Direct: Mevo, Mevo+, and Pro Package.

    Coupon Codes (save 10-15%): "IACAS" for Mevo/Stack, "IACASPLUS" for Mevo+/Pro Package, and "THESANDTRAP" for ShotScope.
  • Posts

    • I've played Bali Hai, Bear's Best and Painted Desert. I enjoyed Bali Hai the most--course was in great shape, friendly staff and got paired in a great group. Bear's Best greens were very fast, didn't hold the ball well (I normally have enough spin to stop the ball after 1-2 hops).  The sand was different on many holes. Some were even dark sand (recreation of holes from Hawaii). Unfortunately I was single and paired with a local "member" who only played the front 9.  We were stuck behind a slow 4-some who wouldn't let me through even when the local left. Painted Desert was decent, just a bit far from the Strip where we were staying.
    • Wordle 1,035 3/6 ⬜🟨🟨🟩⬜ 🟨🟨🟩🟩🟩 🟩🟩🟩🟩🟩 Just lipped out that Eagle putt, easy tab-in Birdie
    • Day 106 - Worked on chipping/pitching. Focus was feeling the club fall to the ground as my body rotated through. 
    • Honestly, unless there's something about that rough there that makes it abnormally penal or a lost ball likely, this might be the play. I don't know how the mystrategy cone works, but per LSW, you don't use every shot for your shot zones. In that scatter plot, you have no balls in the bunker, and 1 in the penalty area. The median outcome seems to be a 50 yard pitch. Even if you aren't great from 50 yards, you're better off there than in a fairway bunker or the penalty area on the right of the fairway. It could also be a strategy you keep in your back pocket if you need to make up ground. Maybe this is a higher average score with driver, but better chance at a birdie. Maybe you are hitting your driver well and feel comfortable with letting one rip.  I get not wanting to wait and not wanting to endanger people on the tee, but in a tournament, I think I value playing for score more than waiting. I don't value that over hurting people, but you can always yell fore 😆 Only thing I would say is I'm not sure whether that cone is the best representation of the strategy (see my comment above about LSW's shot zones). To me, it looks like a 4 iron where you're aiming closer to the bunker might be the play. You have a lot of shots out to the right and only a few to the left. Obviously, I don't know where you are aiming (and this is a limitation of MyStrategy), but it seems like most of your 4 iron shots are right. You have 2 in the bunker but aiming a bit closer to the bunker won't bring more of your shots into the bunker. It does bring a few away from the penalty area on the right.  This could also depend on how severe the penalties are for missing the green. Do you need to be closer to avoid issues around the green?  It's not a bad strategy to hit 6 iron off the tee, be in the fairway, and have 150ish in. I'm probably overthinking this.
    • Day 283: Putted on my mat for a while watching an NLU video. Worked on keeping my head still primarily, and then making sure my bead is okay.
×
×
  • Create New...

Important Information

Welcome to TST! Signing up is free, and you'll see fewer ads and can talk with fellow golf enthusiasts! By using TST, you agree to our Terms of Use, our Privacy Policy, and our Guidelines.

The popup will be closed in 10 seconds...