skillfed

censusgeocode

Thin Python wrapper for the US Census Geocoder

censusgeocode v0.5.3 219.7K downloads/30d#9,320 on PyPI81
Copyleft license GNU General Public License v3 (GPLv3) AGING released

What it is and what it does

Censusgeocode is a lightweight Python wrapper around the US Census Geocoder API that lets you convert addresses to geographic coordinates and retrieve Census geographic data (blocks, tracts, counties, states) for those locations. It exposes the Census API through simple functions like onelineaddress(), address(), and coordinates(), and returns results as CensusResult objects that preserve the Census's interpretation of your query. The package also includes a command-line tool for geocoding single addresses or batch-processing CSV files.

The wrapper supports both "locations" mode (structured address data) and "geographies" mode (Census geographic boundaries and attributes). You can configure which Census benchmark and vintage to use via the CensusGeocode class if you need historical or alternative data. It depends only on requests and requests-toolbelt, making it lightweight to install and use.

Use it for:

  • Geocode a list of addresses in a CSV file to get latitude/longitude pairs and Census geographic identifiers for spatial analysis.
  • Look up which Census block, tract, or county contains a given latitude/longitude coordinate.
  • Batch-process up to 10,000 addresses from the command line to generate a CSV with parsed addresses and coordinates.
  • Retrieve detailed Census geographic attributes (area, population codes, GEOID) for addresses in a Python script.
  • Convert single addresses to coordinates programmatically for mapping or location-based applications.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Wraps the US Census Geocoder API to convert addresses to coordinates and coordinates to Census geographic data, with both programmatic and command-line interfaces.

Yes, if you need to geocode US addresses or map them to Census geographies. The package is stable, has low install friction, and directly wraps an official Census API. The GPLv3 license is a blocker for proprietary applications. Maintenance is aging (last release 187 days ago), so verify that Census API changes haven't broken the wrapper before deploying to production.

Install

censusgeocode on PyPI

pip

pip install censusgeocode

uv

uv add censusgeocode

poetry

poetry add censusgeocode

Installing censusgeocode

Before you install

Low install friction with only two runtime dependencies (requests and requests-toolbelt). Maintenance is aging—last release was 187 days ago—but the repository remains active and the package supports current Python versions through 3.14.

License in practice

Licensed under GPLv3 (copyleft). Any derivative work or distribution must also be open-source under GPLv3; proprietary applications cannot use this package without complying with copyleft obligations.

Quickstart

pip install censusgeocode

import censusgeocode as cg

result = cg.onelineaddress('1600 Pennsylvania Avenue, Washington, DC')
print(result.input, result)

Requires network access to the US Census Geocoder API (http://geocoding.geo.census.gov/geocoder/); batch geocoding is limited to 10,000 rows per request.

Verify before relying

  • Whether the Census Geocoder API requires authentication or has rate limits beyond the documented 10,000-row batch limit.
  • Current availability and stability of Census Geocoder API benchmarks and vintages referenced in the package.

Package facts

License GNU General Public License v3 (GPLv3) (copyleft)
Python support supports the current Python release (<4,>=3.8)
Install friction low — pure-Python wheel
Runtime dependencies 2 — requests, requests-toolbelt
Maintenance aging — 187 days since the last release
Last repo commit
First released
Downloads 219,749/month — #9,320 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: censusgeocode-0.5.3-py3-none-any.whl

Keywords: census, geocode, api

Development Status :: 4 - BetaIntended Audience :: DevelopersLicense :: OSI Approved :: GNU General Public License v3 (GPLv3)Natural Language :: EnglishOperating System :: OS IndependentProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9

Tags

census geocoding api wrapperaddress to coordinates pythonus census geocoderbatch geocoding addresseslatitude longitude from addresscensus geographic data lookupreverse geocoding coordinates
geospatialus-censusbatch-processing

More Utilities packages