Check the Setup
- Python 3.10 or newer
- An internet connection
- The requests Python package
U.S. Census Bureau address-to-tract geocoding responses for assigning a user-entered address to its reviewed Census geography.
Report a ProblemFrom Source to Product Signal
The Census Geocoder returns address matches and Census tract geography for one submitted U.S. address. Start with the Census Bureau's own public example address and request the current 2020 geography vintage. Do not send confidential addresses in a tutorial; an approximate range match needs review before it is used as a property location.
Install the packages, then run the notebook cell.
python -m pip install requests
import requests
response = requests.get(
"https://geocoding.geo.census.gov/geocoder/geographies/onelineaddress",
params={"address": "4600 Silver Hill Rd, Washington, DC 20233",
"benchmark": "Public_AR_Current", "vintage": "Census2020_Current",
"format": "json"}, timeout=30,
)
response.raise_for_status()
for match in response.json()["result"]["addressMatches"][:5]:
tracts = match["geographies"].get("Census Tracts", [])
print(match["matchedAddress"], [tract["GEOID"] for tract in tracts])Test a Useful Signal
Inspect a public example address before using geocoding in a local lookup.
U.S. Census Bureau is a government source. Last verified 2026-09-28. Temporal coverage: current address-range benchmark with selectable geography vintage.