Jump to content
Check out the Spin Axis Podcast! ×

Recommended Posts

Posted

I would be interested in it.

I ended up with a pretty twisted way of getting the data in to my MYSQL data base, but it requires I get an nightly handicap report by email for each of the clubs I am in.

to give you an idea.

  1. Email send to my inbox. 
  2. Email filter in Thunderbird that extracts the attachment and puts it in a folder on my PC.
  3. Window Cron job that looks in that fold for any new files and if FTP's them to my Server.
  4. Linux Cron that looks for that file and parses the file and inserts the into the DB.

D


  • 2 months later...
Posted
On 8/13/2024 at 7:08 AM, 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...

Dang. I've been brainstorming/designing an app that simply requires READ access to GHIN. The primary pro to being able to have authorized READ access to GHIN would be ensuring that users are actually using their GHIN which could limit the ability for them to game their scores. If anyone has any idea how to do so please hit me up.


  • 3 months later...
Posted
On 8/13/2024 at 8:08 AM, 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...

I would be interested in seeing what you have done.  Just started working on a Golf Game app for my buddies. I have a few ideas, but have not had any luck pull updated handicaps through an API. So for, I have to do it manually and update the app.


Posted
On 8/13/2024 at 10:08 AM, 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...

If you still have that code available, I would love to get a copy. We have PowerShell code that pulls indexes and individual 9-hole handicaps for the tee sets of the course we play. We have 40 players and use this data for skins. We do skins by flight which we have 4 of them A,B,C,D and without pulling this data it would be almost impossible to do in the application. Right now, we also grab each "card" as it comes off the course and put it into a spreadsheet to help us understand who won the round and helps us with skins. Each golfer is required to enter their own scores in GHIN also. Our goal is to have each golfer enter in the scores in GHIN but pull the individual hole scores down each week after the round is posted so that we can figure skins, and points. I found a site for APIs, but it is old referencing https://api.ghin.com/api/v1. Our current code uses https://api2.ghin.com/api/v1. I tried using that along with what was provided in the old doc, but it appears many of the API signatures changed. I'm hoping I can use the python code to get examples of the API calls I need. if nothing else I could recode ours to use python.


  • 2 months later...
Posted

I have this working.  I'm using python and c#, and it's all displayed on a website I created.  Sorry for the delay, I haven't been on this site in quite a while.  This site helped a lot:  

https://app.swaggerhub.com/apis-docs/GHIN/Admin/1.0#/Club APIs/

I've done a bunch of work on this to get it working.  If any of you would like I can probably dump the information you need into a website.  I just need either GHIN ID's or a Club ID.

On 2/27/2022 at 10:37 PM, Zippo said:

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.

 


  • 4 weeks later...
Posted
On 5/1/2025 at 1:56 PM, howiekrauth said:

I have this working.  I'm using python and c#, and it's all displayed on a website I created.  Sorry for the delay, I haven't been on this site in quite a while.  This site helped a lot:  

https://app.swaggerhub.com/apis-docs/GHIN/Admin/1.0#/Club APIs/

I've done a bunch of work on this to get it working.  If any of you would like I can probably dump the information you need into a website.  I just need either GHIN ID's or a Club ID.

 

@howiekrauth how did you get this working in Python? I am using the site you linked, trying to execute the API calls in that page, but am getting "Invalid Token". Did you have to go thru GHIN to get an API key somehow? A snippet of Python code for any simple GET request would be awesome. Thanks.


  • 1 month later...
Posted (edited)

@wwk3I can send you something if you give me a way to contact you.  I'd rather not just throw it out in public...

On 5/1/2025 at 9:41 AM, scott61 said:

I'm very interested in seeing your Python code. Can you email a link to me? Thanks!!!

@scott61 I can send you something - how do I get your email?

On 2/18/2025 at 5:08 PM, Bnoble said:

If you still have that code available, I would love to get a copy. We have PowerShell code that pulls indexes and individual 9-hole handicaps for the tee sets of the course we play. We have 40 players and use this data for skins. We do skins by flight which we have 4 of them A,B,C,D and without pulling this data it would be almost impossible to do in the application. Right now, we also grab each "card" as it comes off the course and put it into a spreadsheet to help us understand who won the round and helps us with skins. Each golfer is required to enter their own scores in GHIN also. Our goal is to have each golfer enter in the scores in GHIN but pull the individual hole scores down each week after the round is posted so that we can figure skins, and points. I found a site for APIs, but it is old referencing https://api.ghin.com/api/v1. Our current code uses https://api2.ghin.com/api/v1. I tried using that along with what was provided in the old doc, but it appears many of the API signatures changed. I'm hoping I can use the python code to get examples of the API calls I need. if nothing else I could recode ours to use python.

@Bnoble I use python to pull access codes, and c#/.Net to do the rest.  I could probably get you what you need.  Let me know how to get in touch with you and I'll see what I can do...

On 10/15/2024 at 11:30 PM, blagbogs said:

Dang. I've been brainstorming/designing an app that simply requires READ access to GHIN. The primary pro to being able to have authorized READ access to GHIN would be ensuring that users are actually using their GHIN which could limit the ability for them to game their scores. If anyone has any idea how to do so please hit me up.

@blagbogsLet me know how to get in touch with you directly via email.

On 8/13/2024 at 10:57 AM, Whirlwind said:

I would be interested in it.

I ended up with a pretty twisted way of getting the data in to my MYSQL data base, but it requires I get an nightly handicap report by email for each of the clubs I am in.

to give you an idea.

  1. Email send to my inbox. 
  2. Email filter in Thunderbird that extracts the attachment and puts it in a folder on my PC.
  3. Window Cron job that looks in that fold for any new files and if FTP's them to my Server.
  4. Linux Cron that looks for that file and parses the file and inserts the into the DB.

D

@WhirlwindLet me know how to get in touch - there is an easier way...

Edited by howiekrauth

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

    Carl's Place
    PlayBetter
    Golfer's Journal
    ShotScope
    The Stack System
    FitForGolf
    FlightScope Mevo

    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

    • Day 610 - 2026-06-03 Got some work in between lessons today. Rare late day, teaching until 7:30pm.
    • Let's continue on… Cool. The thing is, nobody's claiming par is "reliable" and par's inclusion piggy-backs in the course rating, which is awfully close to par and, thus, brings par in to make it make sense. Once again, for those in the back… (CR - Par) just makes it really easy to know what kind of score you need to shoot to best, match, or play worse than your handicap index. Yes, when par is different, the players from the higher par tees get an extra stroke (72 vs. 71, the 72s get an extra stroke. That makes sense and is a small complication (more info at https://www.usga.org/content/usga/home-page/handicapping/roh/Content/rules/Committee%20Content/USGA/LG_R6d.htm). However, most of the time, this adjustment will not be needed, as many courses play to the same par for the same genders from all sets of tees. And, the rare times it is needed, par (measured in whole numbers, integers) and strokes (also whole numbers/integers) map easily and the idea is easily grasped. Dean seems to be unaware of the fact that most every golfer carries something orders of magnitude more powerful than the highest end desktop computers available the last time he consulted with the USGA in their pockets. While it is quaint that his club puts printouts by the first tee… get with the times, Dean. Look up your handicap index and course handicap in the GHIN app and get on with it. It's a better system than the one that didn't account — at all — for a difference in the playing conditions (via an algorithm, not a judgment). Dean's assertions about the "less precise system because of par" continues to make absolutely zero sense. Right, it still changed tee to tee. Now it just changes differently… and in a way that more accurately reflects the score you need to shoot to play to your handicap. Previously, a 1.1 index would get 1 stroke on a 66.7/122 par-72 course. Now they give four strokes back to the course and must shoot 68 to play to their handicap. This makes way more sense. The 18-shot difference is a pretty extreme example. Maybe a long course that also offers a par-three set of tees could play that long, but… man, that's not going to be super common. Sensationalistic much, Dean? Also, once those unhappy (complete assumption) golfers realize a) what the change shows them (playing to net par = playing to your index) and b) realizes that their differential is going to be the same… I think they'll get over their initial questions. No. And yet… if he shoots the same scores, he'll get the same handicap index he has now. But he'll know on each course what score he needs to shoot to "play to his handicap." Sheesh, Dean. This stuff isn't that hard to figure out. Enough with the sensationalistic stuff. I don't find it "unacceptable" at all. Then again, I'm not nearly 80 and seemingly incapable of doing basic math these days. No. This literally makes no sense, as that part of the differential calculation and the course handicap calculation remains identical. Good! No. Categorically wrong. They should have been adjusting their handicaps all along. Previously it was by subtracting the course ratings. Which… is still basically what's done, with the addition of the course rating being "baked in" to the course handicap calculation. Dean is wrong here, or doing some math heretofore unknown by the world. When par is the same, what determines the difference in handicaps? The course rating, which Dean loves! Sheesh! You had to things when players were in situations like this before, too. This is getting exhausting. He keeps using words like "less precise" and "unfair" but does not seem to understand what they mean. This is like the Princess Bride meme: "you keep using that word. I do not think it means what you think it means." The caps reduce upward movement. Committees have reign to reduce a player's handicap, and there's still an automatic Exceptional Score Reduction. I'm going through these more quickly now because… well, it's silly how badly Dean misses the mark with this blog post. Dean is literally confusing the upward movement (with the soft and hard caps) here with the exceptional score reduction which is used when lowering handicaps due to an exceptionally good score. The creators of the WHS are handicap experts. They know more about the current state of handicaps/handicapping than the Pope Emeritus. It's been shown to have almost no effect across all handicaps. Yes, some 36s under the old system are now 35s under the new system. Yawn. He should have stopped there. It's easier to apply and makes more sense. This makes no sense. It's "not complex" but players will have to guess? And, for men or women, the stroke index of each hole doesn't change because they play a different set of tees. They get a different number of strokes, but it's always been true that when you get 14 strokes you apply a stroke to stroke index holes 1-14, and when you get 11, to just holes with a SI of 1-11. Objection, your honor. Assumes facts not in evidence. Dean's just out here continuing to make shit up about "the inaccuracy of par" and ignoring that with Par (an integer) came the Course Rating, which he agrees is precise and accurate. No. No, this is inaccurate. Also, as noted, you can randomly assign stroke indexes, and so long as all the low numbers or all the high numbers are not clumped together at the beginning or ends of the 18 holes, matches generally work out the same. This is inaccurate. It is an algorithm that looks at scores. That's it. Also, this is better than a system like the prior one where no such thing existed at all. Wildly inaccurate and off-base. Did they do actual testing? No need. They have millions and millions of rounds and ran many, many, many simulations. That's testing. Dean seems to continue to be unaware of the fact that computers are more powerful now than they were in 2002. But, he's nearly 80, so we can understand if not going so far as to give him a pass on how much he gets wrong. Cool. Noted. For the most part that was because many countries haven't been able to rate enough of their courses. :sigh:
    • Day 3 (3 Jun 26) - More work on keeping arms connected today - hard foam balls with 7i and 5w…..
    • Day 274 6-3 flow drill getting chest through, arms in front. Arms get a little pinned to the side, not as much in front as I want them when I add speed. 
    • Shot 48 yesterday.  For me bogey golf is good.  I was 10 over through 7 and figured with a Par 3 and 4 coming on all I needed was birdie / par to get my 45. I had a great tee shot on #8 and sunk  a 5 footer for birdie, game was coming together, now just needed par on #9. Had a great tee drive and the green was within range for a hoped GIR or nGIR.  But I pulled the shot left into tall weeds and needed to take a drop.  So much for par, but a bogey for 46 is still good for me. I hit my lob wedge to get over a small tree and saw the ball riding nicely  on line to the pin when my club hit the ball a 2nd time on my follow through causing the ball to change directions and ended up @ pin high but along the same tall weeds I just took an unplayable out of.  had no room for a backswing, Just hacked at it and it shot across the green to the rough on the far side.  Needed a chip & 1 putt got a triple bogey. you can see the hole fall apart in the screenshot below.  
×
×
  • 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.