npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@opengolfapi/expo

v0.1.0

Published

OpenGolf mobile SDK for Expo / React Native — the FREE golf-data surface (16k+ courses, tees, holes, hazards facts, weather, Sign in with OpenGolf, contribution) with offline caching, near-me, and typed models. No gated capability.

Readme

@opengolfapi/expo

The OpenGolf mobile SDK for Expo / React Native. The free golf-data surface — 16k+ courses with holes, scorecard, hazard facts, location search, Sign in with OpenGolf, and free contribution — with offline course bundles, courses-near-me, and typed models. Drop-in, fetch-based, no Node deps.

This SDK is the free surface only. Advanced geometry, the OpenGolf Rating, wallet/rewards, and booking are the enterprise layer and are not part of this package.

Install

npx expo install @opengolfapi/expo
# offline bundles use AsyncStorage:
npx expo install @react-native-async-storage/async-storage

Quickstart

import { OpenGolfMobile } from '@opengolfapi/expo';
import AsyncStorage from '@react-native-async-storage/async-storage';

const og = new OpenGolfMobile({ storage: AsyncStorage });   // no key needed for reads

// Courses near the golfer
const { courses } = await og.coursesNearMe(56.348, -2.814, 15);   // St Andrews area, 15 mi

// Full course (facts + holes + scorecard)
const course = await og.course(courses[0].id);

// Play offline: download before the round, then `course()` works with no signal
await og.downloadCourse(courses[0].id);

Sign in with OpenGolf (OIDC)

import * as AuthSession from 'expo-auth-session';

const redirectUri = AuthSession.makeRedirectUri();
const url = og.signInUrl({ clientId: 'your.app', redirectUri, scope: 'openid profile' });
// open `url` in an AuthSession; on return you get `code`:
const tokens = await og.exchangeCode({ code, clientId: 'your.app', redirectUri });
// then reads on the golfer's OWN data:
const chain = new OpenGolfMobile({ apiKey: tokens.access_token }).myChain();

Contribute from the app (free)

const keyed = new OpenGolfMobile({ apiKey: FREE_KEY });
await keyed.submitCorrection({ course_id, field: 'phone', value: '+44 1334 466718' });
await keyed.submitRound(course_id, gpsTrack);   // breadcrumbs feed the open map

API (free surface)

| Method | What | |---|---| | searchCourses(q) | name search (global) | | coursesNearMe(lat, lng, radiusMi?) | location search | | course(id) | facts + holes + scorecard + hazard facts (offline-first) | | holes(id) | per-hole par / yardage / stroke index | | coursesInState(code) | every course in a US state | | downloadCourse(id) / isDownloaded / removeDownload | offline bundles | | submitCorrection / submitRound | free contribution (needs a free key) | | signInUrl / exchangeCode / myChain | Sign in with OpenGolf + own data |

Reads are cache-first (24h default) and fall back to the last persisted copy when offline.

MIT · built on the open OpenGolfAPI.