GNISFIPS

Federal place-ID crosswalk

Two numbers
for the same
place.

The Geographic Names Information System and the Census Bureau each assign their own ID to every American town, township, and census-designated place — and the two don't line up. This looks up one from the other.

  • 200,713Records
  • 56States & territories
  • 0API keys
San Francisco, California Populated Place
You have GNIS feature ID 277593 The filename you request
You get Census (FIPS) code 67000 San Francisco County
GET https://fipsgnis.com/277593.json

The API

One file per place. That's the whole thing.

Request a GNIS feature ID with a .json extension at the root of the domain. There is no key, no signup, and no rate limit — it's static files on S3 behind CloudFront, so query as fast as you like.

$ curl https://fipsgnis.com/277593.json

{"gnis":"277593","fips":"67000"}

gnis echoes back the ID you requested; fips is the Census code you came for. Every response has both keys, and nothing else.

RequestPlaceReturnsMeaning
/277593.json San Francisco, California {"gnis":"277593","fips":"67000"} GNIS 277593 → Census 67000
/975772.json New York, New York {"gnis":"975772","fips":"51000"} GNIS 975772 → Census 51000
/1498463.json Charlottesville, Virginia {"gnis":"1498463","fips":"14968"} GNIS 1498463 → Census 14968

Before you build on it

What this data won't do

Three things worth knowing up front, so you find them here instead of in production.

  • Direction

    GNIS in, Census out

    Only GNIS IDs are addressable. You can't look up a place by its Census code — /67000.json returns 404. Reversing it needs a namespace, because 3,140 GNIS IDs are also valid Census codes and would collide.

  • Coverage

    Not every place has both

    592 records carry a GNIS ID but no Census code, so the second value comes back empty. Coverage is populated places, civil divisions, and census areas — not rivers, mountains, or other physical features.

  • Duplicates

    Repeated rows, never conflicting

    3,612 GNIS IDs appear on more than one row, because places that span counties are listed once per county. Every repeat carries the same Census code, so the mapping is unambiguous — but deduplicate if you load the CSV into a keyed structure.

Run your own

Rebuild it from the federal source

Everything here derives from one USGS file. The scripts download it, cut it down to two columns, and write one JSON file per record. Local lookups are faster than any network call.

  1. Clone the repository.
  2. Point BUCKET in config.sh at your own S3 bucket.
  3. Run ./run.sh to fetch the source, build united-states.csv, build the JSON files, and upload them to S3.

The CSV is the useful artifact if you'd rather not make 200,000 requests. Its columns are GNIS_ID, FIPS_CODE, in that order.

# Look up a GNIS ID locally
grep '^277593,' united-states.csv
#=> 277593,67000