Skip to content
Fourohtwo

api.geoprimitives.dev/v1/us/geographies

Give it a longitude and latitude inside the United States and it answers with the Census FIPS codes for that point: the 2-digit state code, the 5-digit county GEOID, and the GEOID of the congressional district. Parameters go in the query string: this is a GET, there is no body. The codes are the product and the names are a courtesy. A county GEOID is the join key to essentially every geography-key

BaseUnchecked
GEThttps://api.geoprimitives.dev/v1/us/geographies

UptimeNot checked yet

30 days agoToday

Try it

Pays from your browser wallet in USDC on Base or USDG on Robinhood Chain, whichever the endpoint takes. The provider is paid directly; failed calls aren't refunded by Fourohtwo.

The response shows up here.

Call it from an agent

import { createPayer } from "fourohtwo";

// One agent key pays USDC on Base or USDG on Robinhood Chain,
// inside the spending rules you set on Fourohtwo.
const pay = createPayer({ privateKey: process.env.AGENT_KEY });
const res = await pay("https://api.geoprimitives.dev/v1/us/geographies?lat=33.4484&lon=-112.074");
console.log(await res.json());

Example input

{
  "lat": 33.4484,
  "lon": -112.074
}

More from geoprimitives