Jump to content
Subscribe to the Spin Axis Podcast! ×

Recommended Posts

Posted

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.


  • iacas changed the title to USGA GHIN API
  • Administrator
Posted

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

Awards, Achievements, and Accolades

Posted
  On 2/28/2022 at 3:38 AM, iacas said:

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

Expand  

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.


  • Administrator
Posted
  On 2/28/2022 at 3:56 AM, 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.

Expand  

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

Awards, Achievements, and Accolades

Posted
  On 2/28/2022 at 4:37 AM, 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.

Expand  

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.

 


  • Administrator
Posted

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

Awards, Achievements, and Accolades

Posted

@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 !!!

Awards, Achievements, and Accolades

  • Administrator
Posted
  On 2/28/2022 at 12:51 PM, 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.

Expand  

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

  On 2/28/2022 at 12:51 PM, 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)

Expand  

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

Awards, Achievements, and Accolades

Posted
  On 2/28/2022 at 1:14 PM, 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.

Expand  

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 !!!

Awards, Achievements, and Accolades

  • Administrator
Posted
  On 2/28/2022 at 3:26 PM, Club Rat said:

IF the group maintains their hdcp all from the club

Expand  

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

Awards, Achievements, and Accolades

Posted
  On 3/1/2022 at 12:30 AM, 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.

Expand  

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.


Posted
  On 3/1/2022 at 3:21 AM, 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.

Expand  

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.


  • Administrator
Posted
  On 3/2/2022 at 10:08 PM, 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.

Expand  

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

Awards, Achievements, and Accolades

Posted
  On 2/28/2022 at 12:51 PM, Club Rat said:

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

Expand  

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

Awards, Achievements, and Accolades

Posted
  On 3/3/2022 at 1:20 AM, 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.

Expand  

Sorry. There is no club.

  On 3/3/2022 at 12:15 AM, iacas said:

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

Expand  

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.


  • 9 months later...
  • 1 year later...
Posted

I know this is an old thread, but I have some code written in python to pull handicaps from the GHIN system.

I wound up here because I was curious if there is a public API for the GHIN system.  Does anyone know?

Let me know if you need the python code...

  • Like 1

  • Administrator
Posted
  On 8/13/2024 at 2:08 PM, howiekrauth said:

I know this is an old thread, but I have some code written in python to pull handicaps from the GHIN system.

I wound up here because I was curious if there is a public API for the GHIN system.  Does anyone know?

Let me know if you need the python code...

Expand  

There is not, to my knowledge.

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

Awards, Achievements, and Accolades

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Want to join this community?

    We'd love to have you!

    Sign Up
  • TST Partners

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

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

    • . I've been Playing Golf for: 10 years, 1 year consistently  My current handicap index or average score is: 100 My typical ball flight is: fade The shot I hate or the "miss" I'm trying to reduce/eliminate is: inconsistent ball strike   I caught the bug about a year ago and have been playing roughly once a week. Have been getting better with my short game and putting but my ball striking from tee and fairway lets me down. Had my first lesson last month which identified an over the top swing compensated by an open club face. Have been trying everything to get on plane over the last month. Have found that using a bend and press into my left leg as the trigger for my downswing coupled with finding the turn and rotation in both my arms to release the club properly has helped my get nearer to the correct plane. Video below is where I am with it currently. Haven’t taken this new swing to the course yet! Any comments or suggestions are welcome  Videos:  I've been Playing Golf for: 1 year properly  My current handicap index or average score is: 100 av score  
    • That's always been the deal. You put in the work hyper focused on ONE or at most two things, so that you don't have to think about anything except a single feel or the target or something on the course.
    • Blind squirrel finds a nut and putted well. no, I decided to play a round being athletic rather than paralyzing myself with swing thoughts. I have no clue if I was doing what I worked on. It was the last day and I was tired of freezing at the top of the swing not know if one of four outcomes were going to happen. 
    • Day 299 - 2025-07-26 I spent 15 minutes practicing but it was almost pointless. It wasn't good practice. I was not really in it, but I put the time in. Oh, I did some chipping work before-hand, and that was good. I could have just left after that. 🙂 
    • Well that's different.
×
×
  • 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...