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

@bradrichardson/overture-geocoder

v0.2.2

Published

Forward geocoder using Overture Maps data with Nominatim-compatible API

Readme

Overture Geocoder - JavaScript/TypeScript Client

Forward geocoder using Overture Maps data with Nominatim-compatible API.

Installation

npm install @bradrichardson/overture-geocoder

Usage

Basic Search

import { OvertureGeocoder } from '@bradrichardson/overture-geocoder';

const geocoder = new OvertureGeocoder();

// Search for a place
const results = await geocoder.search('Boston, MA');
console.log(results[0].primary_name); // "Boston"
console.log(results[0].lat, results[0].lon); // 42.3588336, -71.0578303

Reverse Geocoding

// Reverse geocode coordinates
const results = await geocoder.reverse(42.3588336, -71.0578303);
console.log(results[0].primary_name);

Convenience Functions

import { geocode, reverseGeocode } from '@bradrichardson/overture-geocoder';

// Quick one-off search
const results = await geocode('Cambridge, MA', { limit: 5 });

// Quick reverse geocode
const reverse = await reverseGeocode(42.3588336, -71.0578303);

GeoJSON Output

const geojson = await geocoder.searchGeoJSON('Boston');
// Returns FeatureCollection with Point geometries

const reverseGeojson = await geocoder.reverseGeoJSON(42.3588336, -71.0578303);

Full Geometry Fetching

Fetch full geometries from Overture S3 data:

const geometry = await geocoder.getFullGeometry('gers-id');
// Returns full polygon/multipolygon geometry from Overture

// Release resources when done
await geocoder.close();

Nearby Search

// Find nearby places
const places = await geocoder.getNearbyPlaces(42.3588336, -71.0578303, {
  radiusKm: 1,
  limit: 10,
});

// Find nearby addresses
const addresses = await geocoder.getNearbyAddresses(42.3588336, -71.0578303, {
  radiusKm: 0.5,
});

Configuration

const geocoder = new OvertureGeocoder({
  baseUrl: 'https://geocoder.bradr.dev', // default
  timeout: 30000, // ms
  retries: 3,
  retryDelay: 1000, // ms
});

Types

All types are exported for TypeScript users:

import type {
  GeocoderResult,
  SearchOptions,
  ReverseOptions,
  OvertureGeocoderConfig,
  GeoJSONFeature,
  GeoJSONFeatureCollection,
  OverturePlace,
  OvertureAddress,
  NearbySearchOptions,
  // STAC types for advanced usage
  StacCatalog,
  BoundingBox,
} from '@bradrichardson/overture-geocoder';

API Reference

OvertureGeocoder

  • search(query: string, options?: SearchOptions): Promise<GeocoderResult[]>
  • searchGeoJSON(query: string, options?: SearchOptions): Promise<GeoJSONFeatureCollection>
  • reverse(lat: number, lon: number, options?: ReverseOptions): Promise<ReverseGeocoderResult[]>
  • reverseGeoJSON(lat: number, lon: number): Promise<GeoJSONFeatureCollection>
  • verifyContainsPoint(gersId: string, lat: number, lon: number): Promise<boolean>
  • getFullGeometry(gersId: string): Promise<GeoJSONFeature | null>
  • getNearbyPlaces(lat: number, lon: number, options?: NearbySearchOptions): Promise<OverturePlace[]>
  • getNearbyAddresses(lat: number, lon: number, options?: NearbySearchOptions): Promise<OvertureAddress[]>
  • reverseAndRefine(lat: number, lon: number, options?: ReverseAndRefineOptions): Promise<RefinedReverseResult>
  • close(): Promise<void> - Release resources when done with geometry fetching

SearchOptions

interface SearchOptions {
  limit?: number;        // 1-40, default: 10
  countrycodes?: string; // e.g., "us,ca"
  viewbox?: [number, number, number, number]; // [lon1, lat1, lon2, lat2]
  bounded?: boolean;     // Restrict to viewbox
  format?: 'json' | 'jsonv2' | 'geojson';
}

License

MIT