The Census APIs have over 200 endpoints, covering dozens of different datasets.
library(censusapi)
To see a current table of every available endpoint, run listCensusApis
:
apis <- listCensusApis()
View(apis)
Here is a work in progress list of examples for each API. More to come. Read more about discovering an API’s variable and geography options in Getting started with censusapi
Annual Survey of Entrepreneurs
Annual Survey of Entrepreneurs documentation
ase_csa <- getCensus(name = "ase/csa",
vintage = 2014,
vars = c("GEO_TTL", "NAICS2012", "NAICS2012_TTL", "EMPSZFI", "EMPSZFI_TTL", "FIRMPDEMP"),
region = "us:*")
head(ase_csa)
00 |
United States |
00 |
Total for all sectors |
001 |
All firms |
5437782 |
00 |
United States |
00 |
Total for all sectors |
611 |
Firms with no employees |
547115 |
00 |
United States |
00 |
Total for all sectors |
612 |
Firms with 1 to 4 employees |
2768756 |
00 |
United States |
00 |
Total for all sectors |
620 |
Firms with 5 to 9 employees |
950224 |
00 |
United States |
00 |
Total for all sectors |
630 |
Firms with 10 to 19 employees |
585516 |
00 |
United States |
00 |
Total for all sectors |
641 |
Firms with 20 to 49 employees |
376051 |
ase_cscb <- getCensus(name = "ase/cscb",
vintage = 2014,
vars = c("GEO_TTL", "NAICS2012_TTL", "ASECB", "ASECB_TTL", "SPOUSES", "SPOUSES_TTL", "YEAR",
"FIRMPDEMP", "FIRMPDEMP_PCT", "RCPPDEMP", "RCPPDEMP_F", "RCPPDEMP_PCT",
"EMP", "EMP_PCT", "PAYANN", "PAYANN_PCT", "FIRMPDEMP_S", "FIRMPDEMP_PCT_S",
"RCPPDEMP_S", "RCPPDEMP_PCT_S", "EMP_S", "EMP_PCT_S", "PAYANN_S", "PAYANN_PCT_S"),
region = "us:*")
head(ase_cscb)
00 |
United States |
Total for all sectors |
0000 |
All firms |
A1 |
All firms |
2014 |
5437782 |
0 |
33036935112 |
NA |
0 |
115129295 |
0 |
5640982990 |
0 |
0 |
0 |
0.5 |
0 |
0.3 |
0 |
0.3 |
0 |
00 |
United States |
Total for all sectors |
0000 |
All firms |
LZ |
Jointly owned and equally operated by spouses |
2014 |
335149 |
30.6 |
493143589 |
NA |
15.4 |
3303608 |
23 |
104343482 |
19.2 |
0.6 |
0.3 |
3.7 |
5.5 |
1.7 |
6.2 |
1.8 |
5.4 |
00 |
United States |
Total for all sectors |
0000 |
All firms |
MA |
Jointly owned but primarily operated by male spouse |
2014 |
336310 |
30.7 |
603733952 |
NA |
18.8 |
3015332 |
21 |
109460428 |
20.2 |
0.8 |
0.3 |
3.2 |
1.8 |
1.8 |
3.5 |
3 |
3.5 |
00 |
United States |
Total for all sectors |
0000 |
All firms |
MB |
Jointly owned but primarily operated by female spouse |
2014 |
96475 |
8.8 |
140228793 |
NA |
4.4 |
850573 |
5.9 |
25984506 |
4.8 |
1.9 |
0.2 |
12.6 |
1.1 |
3.6 |
0.6 |
4.7 |
0.3 |
00 |
United States |
Total for all sectors |
0000 |
All firms |
MC |
Not jointly owned by spouses |
2014 |
328625 |
30 |
1966858366 |
NA |
61.4 |
7222018 |
50.2 |
302838280 |
55.8 |
0.6 |
0.5 |
2.5 |
8.1 |
1.6 |
10.3 |
1.9 |
9 |
00 |
United States |
Total for all sectors |
0000 |
All firms |
MD |
Total reporting |
2014 |
1096559 |
100 |
3203964700 |
NA |
100 |
14391531 |
100 |
542626696 |
100 |
0.2 |
0 |
1.8 |
0 |
0.9 |
0 |
1.3 |
0 |
ase_cscbo <- getCensus(name = "ase/cscbo",
vintage = 2014,
vars = c("GEO_TTL", "NAICS2012_TTL", "ASECBO", "ASECBO_TTL", "ACQBUS", "ACQBUS_TTL",
"YEAR", "OWNPDEMP", "OWNPDEMP_PCT", "OWNPDEMP_S", "OWNPDEMP_PCT_S"),
region = "us:*")
head(ase_cscbo)
00 |
United States |
Total for all sectors |
00 |
All owners of respondent firms |
CA |
Founded or started |
2014 |
4063687 |
70.4 |
0.2 |
0.3 |
00 |
United States |
Total for all sectors |
00 |
All owners of respondent firms |
CB |
Purchased |
2014 |
1211902 |
21 |
0.5 |
0.2 |
00 |
United States |
Total for all sectors |
00 |
All owners of respondent firms |
CC |
Inherited |
2014 |
227408 |
3.9 |
1.7 |
0.1 |
00 |
United States |
Total for all sectors |
00 |
All owners of respondent firms |
CD |
Transfer of ownership or gift |
2014 |
405356 |
7 |
0.6 |
0.1 |
00 |
United States |
Total for all sectors |
00 |
All owners of respondent firms |
CE |
Total reporting |
2014 |
5768389 |
100 |
0.2 |
0 |
00 |
United States |
Total for all sectors |
00 |
All owners of respondent firms |
CF |
Item not reported |
2014 |
14476 |
0 |
7.3 |
0 |
Annual Survey of Manufactures
Annual Survey of Manufactures documentation
asm_state <- getCensus(name = "timeseries/asm/state",
vars = c("NAICS_TTL", "EMP", "GEO_TTL"),
region = "state:*",
time = 2016,
naics = "31-33")
head(asm_state)
2016 |
01 |
Manufacturing |
234803 |
Alabama |
31-33 |
2016 |
02 |
Manufacturing |
12178 |
Alaska |
31-33 |
2016 |
04 |
Manufacturing |
136946 |
Arizona |
31-33 |
2016 |
05 |
Manufacturing |
145733 |
Arkansas |
31-33 |
2016 |
06 |
Manufacturing |
1119896 |
California |
31-33 |
2016 |
08 |
Manufacturing |
121069 |
Colorado |
31-33 |
asm_product <- getCensus(name = "timeseries/asm/product",
vars = c("PSCODE_TTL", "GEO_TTL", "PRODVAL"),
region = "us:*",
time = 2016,
pscode = "311111")
head(asm_product)
2016 |
1 |
Dog and cat food manufacturing |
United States |
22933334 |
311111 |
Business Dynamics Statistics
Business Dynamics Statistics documentation
firms_states <- getCensus(name = "timeseries/bds/firms",
vars = c("firms", "emp", "fage4"),
region = "state:*",
time = 2014)
head(firms_states)
4224 |
31215 |
a |
2014 |
01 |
956 |
3709 |
a |
2014 |
02 |
7519 |
52198 |
a |
2014 |
04 |
2984 |
19464 |
a |
2014 |
05 |
55434 |
324873 |
a |
2014 |
06 |
9648 |
49369 |
a |
2014 |
08 |
firms_years <- getCensus(name = "timeseries/bds/firms",
vars = c("firms", "emp"),
region = "state:01",
time = "from 1977 to 2014")
head(firms_years)
52371 |
957297 |
1977 |
01 |
54168 |
1032199 |
1978 |
01 |
54730 |
1083112 |
1979 |
01 |
54494 |
1080569 |
1980 |
01 |
52551 |
1039172 |
1981 |
01 |
51528 |
1032118 |
1982 |
01 |
County Business Patterns and Nonemployer Statistics
County Business Patterns and Nonemployer Statistics documentation
County Business Patterns
County Business Patterns documentation
cbp_2016 <- getCensus(name = "cbp",
vintage = 2016,
vars = c("EMP", "ESTAB", "NAICS2012_TTL", "GEO_TTL"),
region = "state:*",
naics2012 = "23")
head(cbp_2016)
01 |
82327 |
7424 |
Construction |
Alabama |
23 |
02 |
17022 |
2521 |
Construction |
Alaska |
23 |
04 |
141740 |
11921 |
Construction |
Arizona |
23 |
05 |
45609 |
5293 |
Construction |
Arkansas |
23 |
06 |
723574 |
71981 |
Construction |
California |
23 |
08 |
152325 |
17730 |
Construction |
Colorado |
23 |
Zip Codes Business Patterns
Zip Codes Business Patterns documentation
zbp_2016 <- getCensus(name = "zbp",
vintage = 2016,
vars = c("GEO_TTL", "EMP"),
region = "zipcode:90210")
head(zbp_2016)
90210 |
90210(BEVERLY HILLS,CA) |
37602 |
Nonemployer statistics
Nonemployer statistics documentation
nonemp <- getCensus(name = "nonemp",
vintage = 2016,
vars = c("GEO_TTL", "NRCPTOT", "NAICS2012_TTL"),
region = "state:*",
naics2012 = "54")
head(nonemp)
01 |
Alabama |
1284130 |
Professional, scientific, and technical services |
54 |
02 |
Alaska |
265996 |
Professional, scientific, and technical services |
54 |
04 |
Arizona |
2991782 |
Professional, scientific, and technical services |
54 |
06 |
California |
28746664 |
Professional, scientific, and technical services |
54 |
08 |
Colorado |
3709131 |
Professional, scientific, and technical services |
54 |
12 |
Florida |
11147761 |
Professional, scientific, and technical services |
54 |
Decennial Census
Decennial Census documentation
data2010 <- getCensus(name = "dec/sf1",
vintage = 2010,
vars = c("NAME", "P001001", "H010001"),
region = "metropolitan statistical area/micropolitan statistical area:*")
head(data2010)
38660 |
Ponce, PR Metro Area |
243147 |
237965 |
41900 |
San Germ?n-Cabo Rojo, PR Metro Area |
137462 |
136517 |
41980 |
San Juan-Caguas-Guaynabo, PR Metro Area |
2478905 |
2455092 |
42180 |
Santa Isabel, PR Micro Area |
23274 |
23250 |
25020 |
Guayama, PR Metro Area |
84214 |
81901 |
32420 |
Mayag?ez, PR Metro Area |
106330 |
104567 |
data2000 <- getCensus(name = "sf1",
vintage = 2000,
vars = "P001001",
region = "block:*",
regionin = "state:36+county:027+tract:010000")
head(data2000)
36 |
027 |
010000 |
1000 |
18 |
36 |
027 |
010000 |
1001 |
26 |
36 |
027 |
010000 |
1002 |
59 |
36 |
027 |
010000 |
1003 |
67 |
36 |
027 |
010000 |
1004 |
52 |
36 |
027 |
010000 |
1005 |
116 |
Decennial Census Surname Files
Economic Census
Economic Census documentation
ewks_2012 <- getCensus(name = "ewks",
vintage = 2012,
vars = c("EMP", "OPTAX", "GEOTYPE"),
region = "state:*",
naics2012 = "54")
head(ewks_2012)
01 |
89988 |
A |
02 |
54 |
01 |
88566 |
T |
02 |
54 |
01 |
1422 |
Y |
02 |
54 |
02 |
17648 |
A |
02 |
54 |
02 |
17328 |
T |
02 |
54 |
02 |
320 |
Y |
02 |
54 |
ewks_2007 <- getCensus(name = "ewks",
vintage = 2007,
vars = c("EMP", "OPTAX", "GEOTYPE"),
region = "state:*",
naics2007 = "54")
head(ewks_2007)
60 |
170 |
99 |
002 |
54 |
66 |
2217 |
99 |
002 |
54 |
69 |
404 |
99 |
002 |
54 |
72 |
32801 |
99 |
002 |
54 |
78 |
1370 |
99 |
002 |
54 |
01 |
94051 |
A |
002 |
54 |
Economic Indicators
Economic Indicators documentation
eits <- getCensus(name = "timeseries/eits/resconst",
vars = c("cell_value", "data_type_code", "time_slot_id", "error_data", "category_code", "seasonally_adj"),
region = "us:*",
time = "from 2004-05 to 2012-12")
head(eits)
677 |
TOTAL |
756 |
no |
ACOMPLETIONS |
yes |
2012-12 |
1 |
6 |
E_TOTAL |
756 |
yes |
ACOMPLETIONS |
yes |
2012-12 |
1 |
284 |
SINGLE |
756 |
no |
UNDERCONST |
yes |
2012-12 |
1 |
267.7 |
SINGLE |
756 |
no |
UNDERCONST |
no |
2012-12 |
1 |
3 |
E_SINGLE |
756 |
yes |
UNDERCONST |
no |
2012-12 |
1 |
615 |
SINGLE |
756 |
no |
ASTARTS |
yes |
2012-12 |
1 |
Health Insurance Statistics
Health Insurance Statistics documentation
sahie <- getCensus(name = "timeseries/healthins/sahie",
vars = c("NAME", "IPRCAT", "IPR_DESC", "PCTUI_PT"),
region = "state:1",
time = 2015)
head(sahie)
2015 |
01 |
Alabama |
0 |
All Incomes |
11.9 |
2015 |
01 |
Alabama |
1 |
<= 200% of Poverty |
19.8 |
2015 |
01 |
Alabama |
2 |
<= 250% of Poverty |
18.6 |
2015 |
01 |
Alabama |
3 |
<= 138% of Poverty |
21.2 |
2015 |
01 |
Alabama |
4 |
<= 400% of Poverty |
15.5 |
2015 |
01 |
Alabama |
5 |
138% to 400% of Poverty |
11.8 |
sahie_annual <- getCensus(name = "timeseries/healthins/sahie",
vars = c("NAME", "PCTUI_PT"),
region = "state:1",
time = "from 2006 to 2016")
sahie_annual
2006 |
01 |
Alabama |
15.7 |
2007 |
01 |
Alabama |
14.6 |
2008 |
01 |
Alabama |
15.3 |
2009 |
01 |
Alabama |
15.8 |
2010 |
01 |
Alabama |
16.9 |
2011 |
01 |
Alabama |
16.6 |
2012 |
01 |
Alabama |
15.8 |
2013 |
01 |
Alabama |
15.9 |
2014 |
01 |
Alabama |
14.2 |
2015 |
01 |
Alabama |
11.9 |
2016 |
01 |
Alabama |
10.8 |
Population Estimates and Projections
Population Estimates and Projections documentation
Population Estimates
Population Estimates documentation
popest <- getCensus(name = "pep/population",
vintage = 2016,
vars = c("POP", "GEONAME", "DATE_DESC"),
region = "state:*",
date = "9")
head(popest)
01 |
4863300 |
Alabama |
7/1/2016 population_old estimate |
9 |
02 |
741894 |
Alaska |
7/1/2016 population_old estimate |
9 |
04 |
6931071 |
Arizona |
7/1/2016 population_old estimate |
9 |
05 |
2988248 |
Arkansas |
7/1/2016 population_old estimate |
9 |
06 |
39250017 |
California |
7/1/2016 population_old estimate |
9 |
08 |
5540545 |
Colorado |
7/1/2016 population_old estimate |
9 |
popest_housing <- getCensus(name = "pep/housing",
vintage = 2016,
vars = c("DATE", "DATE_DESC", "GEONAME", "HUEST"),
region = "county:195",
regionin = "state:2")
head(popest_housing)
02 |
195 |
1 |
4/1/2010 Census population |
Petersburg Borough, Alaska |
1994 |
02 |
195 |
2 |
4/1/2010 population estimates base |
Petersburg Borough, Alaska |
1644 |
02 |
195 |
3 |
7/1/2010 population estimate |
Petersburg Borough, Alaska |
1644 |
02 |
195 |
4 |
7/1/2011 population estimate |
Petersburg Borough, Alaska |
1641 |
02 |
195 |
5 |
7/1/2012 population estimate |
Petersburg Borough, Alaska |
1648 |
02 |
195 |
6 |
7/1/2013 population estimate |
Petersburg Borough, Alaska |
1646 |
Population Projections
Population Projections documentation
popproj <- getCensus(name = "pep/projagegroups",
vintage = 2014,
vars = c("YEAR", "POP"),
region = "us:1")
head(popproj)
1 |
2014 |
318748017 |
1 |
2015 |
321368864 |
1 |
2016 |
323995528 |
1 |
2017 |
326625791 |
1 |
2018 |
329256465 |
1 |
2019 |
331883986 |
Poverty Statistics
Poverty Statistics documentation
saipe <- getCensus(name = "timeseries/poverty/saipe",
vars = c("NAME", "SAEPOVRT0_17_PT", "SAEPOVRTALL_PT"),
region = "state:*",
time = 2016)
head(saipe)
2016 |
01 |
Alabama |
24.7 |
17.2 |
2016 |
02 |
Alaska |
13.6 |
9.9 |
2016 |
04 |
Arizona |
23.6 |
16.4 |
2016 |
05 |
Arkansas |
24.0 |
17.2 |
2016 |
06 |
California |
19.9 |
14.4 |
2016 |
08 |
Colorado |
13.4 |
11 |
saipe_years <- getCensus(name = "timeseries/poverty/saipe",
vars = c("NAME", "SAEPOVRT0_17_PT", "SAEPOVRTALL_PT"),
region = "county:001",
regionin = "state:12",
time = "from 2000 to 2016")
head(saipe_years)
2000 |
12 |
001 |
Alachua County |
17.4 |
14.7 |
2001 |
12 |
001 |
Alachua County |
18.3 |
15.1 |
2002 |
12 |
001 |
Alachua County |
17.6 |
15.1 |
2003 |
12 |
001 |
Alachua County |
19.8 |
16.2 |
2004 |
12 |
001 |
Alachua County |
16.9 |
14.5 |
2005 |
12 |
001 |
Alachua County |
22.8 |
21.8 |
Quarterly Workforce Indicators
Quarterly Workforce Indicators documentation
qwi_counties <- getCensus(name = "timeseries/qwi/sa",
vars = c("Emp", "EarnBeg"),
region = "county:*",
regionin = "state:01",
time = "2016-Q1")
head(qwi_counties)
11587 |
2792 |
2016-Q1 |
01 |
001 |
64779 |
2632 |
2016-Q1 |
01 |
003 |
7649 |
2664 |
2016-Q1 |
01 |
005 |
3954 |
2848 |
2016-Q1 |
01 |
007 |
7963 |
2676 |
2016-Q1 |
01 |
009 |
2705 |
2554 |
2016-Q1 |
01 |
011 |
qwi_time <- getCensus(name = "timeseries/qwi/sa",
vars = c("Emp", "EarnBeg"),
region = "state:01",
time = "from 2007 to 2017")
head(qwi_time)
1874961 |
2838 |
2007-Q1 |
01 |
1899115 |
2791 |
2007-Q2 |
01 |
1888118 |
2779 |
2007-Q3 |
01 |
1906641 |
2985 |
2007-Q4 |
01 |
1879453 |
2896 |
2008-Q1 |
01 |
1904713 |
2879 |
2008-Q2 |
01 |
Survey of Business Owners
Survey of Business Owners documentation
sbo <- getCensus(name = "sbo",
vintage = 2012,
vars = c("GEO_TTL", "RCPSZFI", "RCPSZFI_TTL", "FIRMPDEMP"),
region = "state:*")
head(sbo)
01 |
Alabama |
001 |
All firms |
67449 |
01 |
Alabama |
511 |
Firms with sales/receipts of less than $5,000 |
356 |
01 |
Alabama |
518 |
Firms with sales/receipts of $5,000 to $9,999 |
533 |
01 |
Alabama |
519 |
Firms with sales/receipts of $10,000 to $24,999 |
1453 |
01 |
Alabama |
521 |
Firms with sales/receipts of $25,000 to $49,999 |
2843 |
01 |
Alabama |
522 |
Firms with sales/receipts of $50,000 to $99,999 |
5479 |
sbo_groups <- getCensus(name = "sbo",
vintage = 2012,
vars = c("GEO_TTL", "RACE_GROUP", "RACE_GROUP_TTL", "FIRMPDEMP"),
region = "county:*",
regionin = "state:09")
head(sbo_groups)
09 |
001 |
Fairfield County |
00 |
All firms |
21782 |
09 |
001 |
Fairfield County |
30 |
White |
17600 |
09 |
001 |
Fairfield County |
40 |
Black or African American |
176 |
09 |
001 |
Fairfield County |
50 |
American Indian and Alaska Native |
15 |
09 |
001 |
Fairfield County |
60 |
Asian |
1243 |
09 |
001 |
Fairfield County |
61 |
Asian Indian |
400 |
The Planning Database
The Planning Database documentation
pdb <- getCensus(name = "pdb/blockgroup",
vintage = 2016,
vars = c("County_name", "State_name", "GIDBG", "Tot_Population_CEN_2010", "Mail_Return_Rate_CEN_2010"),
region = "block group:*",
regionin = "state:01+county:001")
head(pdb)
Autauga County |
Alabama |
698 |
81.3 |
01 |
001 |
020100 |
1 |
010010201001 |
Autauga County |
Alabama |
1214 |
84.8 |
01 |
001 |
020100 |
2 |
010010201002 |
Autauga County |
Alabama |
1003 |
80.2 |
01 |
001 |
020200 |
1 |
010010202001 |
Autauga County |
Alabama |
1167 |
82.3 |
01 |
001 |
020200 |
2 |
010010202002 |
Autauga County |
Alabama |
2549 |
80.7 |
01 |
001 |
020300 |
1 |
010010203001 |
Autauga County |
Alabama |
824 |
76.2 |
01 |
001 |
020300 |
2 |
010010203002 |
Disclaimer
This product uses the Census Bureau Data API but is not endorsed or certified by the Census Bureau.