Jump to content
Check out 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.


  • 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
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.


  • Administrator
Posted
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

Awards, Achievements, and Accolades

Posted
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.

 


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

Awards, Achievements, and Accolades

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

Awards, Achievements, and Accolades

  • Administrator
Posted
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

Awards, Achievements, and Accolades

Posted
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.


Posted
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.


  • Administrator
Posted
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

Awards, Achievements, and Accolades

Posted
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

Awards, Achievements, and Accolades

Posted
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.


  • 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
12 minutes ago, 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...

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

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

    PlayBetter
    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

    • Day 1: 2025.12.26 Worked on LH position on grip, trying to keep fingers closer to perpendicular to the club. Feels awkward but change is meant to.
    • Please see this topic for updated information:
    • Please see this topic for updated information:
    • When you've been teaching golf as long as I have, you're going to find that you can teach some things better than you previously had, and you're probably going to find some things that you taught incorrectly. I don't see that as a bad thing — what would be worse is refusing to adapt and grow given new information. I've always said that my goal with my instruction isn't to be right, but it's to get things right. To that end, I'm about five years late in issuing a public proclamation on something… When I first got my GEARS system, I immediately looked at the golf swings of the dozens and dozens of Tour players for which I suddenly had full 3D data. I created a huge spreadsheet showing how their bodies moved, how the club moved, at various points in the swing. I mapped knee and elbow angles, hand speeds, shoulder turns and pelvis turns… etc. I re-considered what I thought I knew about the golf swing as performed by the best players. One of those things dated back to the earliest days: that you extend (I never taught "straighten" and would avoid using that word unless in the context of saying "don't fully straighten") the trail knee/leg in the backswing. I was mislead by 2D photos from less-than-ideal camera angles — the trail leg rotates a bit during the backswing, and so when observing trail knee flex should also use a camera that moves to stay perpendicular to the plane of the ankle/knee/hip joint. We have at least two topics here on this (here and here; both of which I'll be updating after publishing this) where @mvmac and I advise golfers to extend the trail knee. Learning that this was not right is one of the reasons I'm glad to have a 3D system, as most golfers generally preserve the trail knee flex throughout the backswing. Data Here's a video showing an iron and a driver of someone who has won the career slam: Here's what the graph of his right knee flex looks like. The solid lines I've positioned at the top of the backswing (GEARS aligns both swings at impact, the dashed line). Address is to the right, of course, and the graph shows knee flex from the two swings above. The data (17.56° and 23.20°) shows where this player is in both swings (orange being the yellow iron swing, pink the blue driver swing). You can see that this golfer extends his trail knee 2-3°… before bending it even more than that through the late backswing and early downswing. Months ago I created a quick Instagram video showing the trail knee flex in the backswing of several players (see the top for the larger number): Erik J. Barzeski (@iacas) • Instagram reel GEARS shares expert advice on golf swing technique, focusing on the critical backswing phase. Tour winners and major champions reveal the key to a precise and powerful swing, highlighting the importance of... Here are a few more graphs. Two LIV players and major champions: Two PGA Tour winners: Two women's #1 ranked players: Two more PGA Tour winners (one a major champ): Two former #1s, the left one being a woman, the right a man, with a driver: Two more PGA Tour players: You'll notice a trend: they almost all maintain roughly the same flex throughout their backswing and downswing. The Issues with Extending the Trail Knee You can play good golf extending (again, not "straightening") the trail knee. Some Tour players do. But, as with many things, if 95 out of 100 Tour players do it, you're most likely better off doing similarly to what they do. So, what are the issues with extending the trail knee in the backswing? To list a few: Pelvic Depth and Rotation Quality Suffers When the trail knee extends, the trail leg often acts like an axle on the backswing, with the pelvis rotating around the leg and the trail hip joint. This prevents the trail side from gaining depth, as is needed to keep the pelvis center from thrusting toward the ball. Most of the "early extension" (thrust) that I see occurs during the backswing. Encourages Early Extension (Thrust) Patterns When you've thrust and turned around the trail hip joint in the backswing, you often thrust a bit more in the downswing as the direction your pelvis is oriented is forward and "out" (to the right for a righty). Your trail leg can abduct to push you forward, but "forward" when your pelvis is turned like that is in the "thrust" direction. Additionally, the trail knee "breaking" again at the start of the downswing often jumps the trail hip out toward the ball a bit too much or too quickly. While the trail hip does move in that direction, if it's too fast or too much, it can prevent the lead side hip from getting "back" at the right rate, or at a rate commensurate with the trail hip to keep the pelvis center from thrusting. Disrupts the Pressure Shift/Transition When the trail leg extends too much, it often can't "push" forward normally. The forward push begins much earlier than forward motion begins — pushing forward begins as early as about P1.5 to P2 in the swings of most good golfers. It can push forward by abducting, again, but that's a weaker movement that shoves the pelvis forward (toward the target) and turns it more than it generally should (see the next point). Limits Internal Rotation of the Trail Hip Internal rotation of the trail hip is a sort of "limiter" on the backswing. I have seen many golfers on GEARS whose trail knee extends, whose pelvis shifts forward (toward the target), and who turn over 50°, 60°, and rarely but not never, over 70° in the backswing. If you turn 60° in the backswing, it's going to be almost impossible to get "open enough" in the downswing to arrive at a good impact position. Swaying/Lateral Motion Occasionally a golfer who extends the trail knee too much will shift back too far, but more often the issue is that the golfer will shift forward too early in the backswing (sometimes even immediately to begin the backswing), leaving them "stuck forward" to begin the downswing. They'll push forward, stop, and have to restart around P4, disrupting the smooth sequence often seen in the game's best players. Other Bits… Reduces ground reaction force potential, compromises spine inclination and posture, makes transition sequencing harder, increases stress on the trail knee and lower back… In short… It's not athletic. We don't do many athletic things with "straight" or very extended legs (unless it's the end of the action, like a jump or a big push off like a step in a running motion).
    • Day 135 12-25 Wide backswing to wide downswing drill. Recorder and used mirror. 
×
×
  • 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.