The purpose of this user guide is to instruct developers and researchers on how to use the Census Data Application Programming Interface (API) to request data from U.S. Census Bureau datasets.
Rather than using the standard geography predicates, many datasets in the Census API also allow you to use the Uniform Census Geography Identifier (ucgid) predicate &ucgid to specify your desired geographies.
Benefits of using &ucgid to select your geography:
Drawbacks of using &ucgid to specify your geography:
Using ucgid for Individual Geographies
Use the ucgid predicate: &ucgid= and then type the fully qualified GEO ID. In the below example, the ucgid predicate provides results for New York city, NY &ucgid=1600000US3651000
api.census.gov/data/2022/acs/acs1/profile?get=NAME,DP05_0001E&ucgid=1600000US3651000
To specify individual geographies using ucgid, you will need to know the fully qualified GEO ID for that geography.
Fully qualified GEO IDs consist of:
As an example, consider the fully qualified GEO ID for New York City, NY:
1600000US3651000
Table 1: Ucgid Examples for Individual Geographies
Geography Name | Fully Qualified GEO ID | Ucgid Predicate |
---|---|---|
Mohave County, Arizona | 0500000US04015 050 = Summary level for county 00 = No geographic variant 00 = Not a geographic component US = United States 04 = Arizona 015 = Mohave County |
&ucgid=0500000US04015 |
Houston-Pasadena-The Woodlands, Texas Metro Area | 310M600US26420 310 = Summary level for metro/micro area M6 = Variant for 2020 vintage of metro/micro areas 00 = Not a geographic component US = United States 26420 = Houston-Pasadena-The Woodlands, TX Metro Area |
&ucgid=310M600US26420 |
Fern Forest CDP, Hawaii | 1600000US1507675 160 = Summary level for place 00 = No geographic variant 00 = Not a geographic component US = United States 15 = Hawaii 07675 = Fern Forest CDP |
&ucgid=1600000US1507675 |
ZIP Code Tabulation Area (ZCTA) 15007 | 860Z200US15007 860 = Summary level for ZCTA Z2 = Variant for 2020 vintage of ZCTAs 00 = Not a geographic component US = United States 15007 = ZCTA 15007 |
&ucgid=860Z200US15007 |
Congressional District 3, Indiana | 5001800US1803 500 = Summary level for congressional district 18 = Variant for 118th Congressional District boundaries 00 = Not a geographic component US = United States 18 = Indiana 03 = Congressional District 3 |
&ucgid=5001800US1803 |
Census Tract 206, DeKalb County, Georgia | 1400000US13089020600 140 = Summary level for census tract 00 = No geographic variant 00 = Not a geographic component US = United States 13 = Georgia 089 = DeKalb County 020600 = Census tract 206 |
&ucgid=1400000US13089020600 |
Block Group 2, Census Tract 104.01, Jersey County, Illinois | 1500000US170830104012 150 = Summary level for census tract 00 = No geographic variant 00 = Not a geographic component US = United States 17 = Illinois 083 = Jersey County 010401 = Census Tract 104.01 2 = Block Group 2 |
&ucgid=1500000US170830104012 |
Block 1004, Block Group 1, Census Tract 6, Benton County, Oregon | 1000000US410030006001004 100 = Summary level for block 00 = No geographic variant 00 = Not a geographic component US = United States 41 = Oregon 003 = Benton County 00600 = Census Tract 6 1004 = Block 1004 |
&ucgid=1000000US410030006001004 |
United States – Rural | 0400043US51 040 = Summary level for state 00 = No geographic variant 43 = Rural geographic component US = United States 51 = Virginia |
&ucgid=0400043US51 |
The ucgid predicate allows you to specify multiple geographies in the same API query by listing each desired fully qualified GEO ID separated by a comma. For example:
Remember, &ucgid is an alternative option instead of using the standard geography predicates (&for and &in). An example query below shows how to use &ucgid to get total population for California and Oregon from the 2022 ACS 1-Year Data Profiles:
api.census.gov/data/2022/acs/acs1/profile?get=NAME,DP05_0001E&ucgid=0400000US06,0400000US41
Geographic Variants
A geographic variant is a version of a geographic area based on the date its boundaries are intended to represent. Geographic variants only apply to specific types of geographic areas that need to be added or replaced by a more recent version, for example, congressional districts when a state redraws its congressional district boundaries.
![]() |
Geographies that commonly use geographic variants include: Congressional districts, state legislative districts, metropolitan/micropolitan statistical areas, ZIP Code tabulation areas (ZCTAs), urban areas, public use microdata areas (PUMAs), New England city and town areas (NECTAs). You must specify the correct geographic variant when using the ucgid predicate for these types of geographies. If you are unsure which variant applies to a dataset, reference the section below: Finding Fully Qualified GEO IDs. |
Geographic Components
A geographic component is a subset of a given type of geographic area based on a certain geographic or population characteristic. For example, the geographic component “United States – Rural” is a geography selection representing the portion of the United States that falls within a rural area. Some common types of geographic components include: Urban, rural, in metropolitan/micropolitan statistical area, and not in metropolitan/micropolitan statistical area.
![]() |
In most cases, the geographic component in the GEO ID will be 00, as they do not apply to data analyses for most data users. |
Finding Fully Qualified GEO IDs
The Census Bureau offers several options to find fully qualified GEO IDs for a particular geography:
1. TIGER/Line Shapefiles: Reference the GEOIDFQ field
2. TIGER/Line Geodatabases: Reference the GEOIDFQ field
3. API: Include the GEO_ID variable in your API query. Example:
https://api.census.gov/data/2022/acs/acs5/profile?get=GEO_ID,NAME&for=congressional%20district:*&in=state:01
Figure 5: Example API Query and Output with GEO_ID Variable - All Congressional Districts in Alabama from 2022 ACS 1-Year Data Profiles
4. data.census.gov: Download the ZIP file for a table that includes your desired geographies. The GEO_ID column of the file will show the fully qualified GEO ID.
Figure 6: Example ZIP Download Output from data.census.gov - All Congressional Districts in Alabama from 2022 ACS 1-Year Data Profiles
You may also find it helpful to review additional reference materials to understand GEO IDs:
Using ucgid for Collections of Geographies (Pseudo Geos)
The ucgid predicate also allows you to retrieve data for collections of geographies, such as All Counties within Maryland or All Census Tracts within Jessamine County, Kentucky. This functions similarly to using the wildcard functionality (*) when using the standard geography predicates (&for and &in) – except the ucgid predicate provides access to even more options to request data for collections of geographies. “All Census Tracts in the U.S.” or “All ZIP Code Tabulation Areas fully/partially within Maryland” are some examples of collections of geographies that are exclusively available by using ucgid.
Use the ucgid predicate: &ucgid=pseudo and in parentheses, enter the joined parent/child GEO IDs. In the below example, the ucgid predicate provides results for All Counties within Maryland:
&ucgid=pseudo(0400000US24$0500000)
api.census.gov/data/2022/acs/acs1/profile?get=NAME,DP05_0001E&ucgid=pseudo(0400000US24$0500000)
GEO IDs for collections of geographies (pseudo geos), consist of:
As an example, consider the ucgid predicate for All Counties within Maryland:
&ucgid=pseudo(0400000US24$0500000)
*The first 3 characters always indicate the child geography’s summary level, in this case, 050 for counties. This is typically followed by four zeros, with a few exceptions noted in column B of the List of Available Collections of Geographies.
The List of Available Collections of Geographies also provides documentation of each possible geography collection that can be used in the API. Please be aware that not every collection of geography is available for every dataset. In most cases, collections of geographies are supported when a dataset provides data for the both the parent and child summary levels.
Table 2: Ucgid Examples for Collections of Geographies
Geography Collection Name | GEO ID for Geography Collection | Ucgid Predicate |
---|---|---|
All Counties within Arkansas | 0400000US05$0500000 0400000US05 = Arkansas (parent geo) $ 0500000 = All counties (child geo) |
&ucgid=pseudo(0400000US05$0500000) |
All Places within Louisiana | 0400000US22$1600000 0400000US22 = Louisiana (parent geo) $ 1600000 = All places (child geo) |
&ucgid=pseudo(0400000US22$1600000) |
All ZIP Code Tabulation Areas (ZCTAs) fully/partially within New Hampshire | 0400000US33$8600000 0400000US33 = New Hampshire (parent geo) $ 8600000 = All ZCTAs (child geo) |
&ucgid=pseudo(0400000US33$8600000) |
All Metropolitan and Micropolitan Statistical Areas fully/partially within Nebraska | 0400000US31$3100000 0400000US31= Nebraska (parent geo) $ 3100000 = All metro/micro areas (child geo) |
&ucgid=pseudo(0400000US31$3100000) |
All Census Tracts within Jessamine County, Kentucky | 0500000US21113$1400000 0500000US21113 = Jessamine County (parent geo) $ 1400000 = All census tracts (child geo) |
&ucgid=pseudo(0500000US21113$1400000) |
All Census Tracts fully/partially within Congressional District 1, Iowa | 5001800US1901$1400000 5001800US1901 = Congressional District 1, IA (parent geo) $ 1400000 = All census tracts (child geo) |
&ucgid=pseudo(5001800US1901$1400000) |
All Block Groups within Census Tract 19, Fairbanks North Star Borough, Alaska | 1400000US02090001900$1500000 1400000US02090001900 = Census Tract 19, Fairbanks North Star Borough, AK (parent geo) $ 1500000 = All block groups (child geo) |
&ucgid=pseudo(1400000US02090001900$1500000) |
All Blocks within Census Tract 9653.02, Somerset County, Maine | 1400000US23025965302$1000000 1400000US23025965302 = Census Tract 9965.02, Somerset County, ME (parent geo) $ 1000000 = All blocks (child geo) |
&ucgid=pseudo(1400000US23025965302$1000000) |