Bureau of Labor Statistics’ API

Data - BLS


Code
source("../../code/R-markdown/init_insee.R")
# library(devtools)
# install_github('mikeasilva/blsAPI')
library(blsAPI)

Info

source dataset Title .html .rData
insee api NA NA NA

List of APIs

source dataset Title .html .rData
bdf api NA NA NA
bea api NA NA NA
bis api NA NA NA
bls api NA NA NA
dbnomics api NA NA NA
ecb api NA NA NA
eurostat api NA NA NA
imf api NA NA NA
insee api NA NA NA
oecd api OECD's API 2026-07-26 2024-04-16
wdi api NA NA NA

Documentation on CRAN: Link.

BLS API

One needs first to create an account to get access to the Application Programming Interface (API): https://data.bls.gov/registrationEngine/

Retrieve new series

Code
data <- blsAPI('LAUCN040010000000005', 2, TRUE)

data |>
  print_table_conditional()
year period periodName value seriesID
2026 M06 June 16933 LAUCN040010000000005
2026 M05 May 17270 LAUCN040010000000005
2026 M04 April 17190 LAUCN040010000000005
2026 M03 March 17407 LAUCN040010000000005
2026 M02 February 17343 LAUCN040010000000005
2026 M01 January 17758 LAUCN040010000000005
2025 M12 December 17594 LAUCN040010000000005
2025 M11 November 17601 LAUCN040010000000005
2025 M10 October - LAUCN040010000000005
2025 M09 September 18152 LAUCN040010000000005
2025 M08 August 18615 LAUCN040010000000005
2025 M07 July 17325 LAUCN040010000000005
2025 M06 June 17247 LAUCN040010000000005
2025 M05 May 17359 LAUCN040010000000005
2025 M04 April 17283 LAUCN040010000000005
2025 M03 March 17524 LAUCN040010000000005
2025 M02 February 17617 LAUCN040010000000005
2025 M01 January 17760 LAUCN040010000000005
2024 M12 December 16953 LAUCN040010000000005
2024 M11 November 16861 LAUCN040010000000005
2024 M10 October 16927 LAUCN040010000000005
2024 M09 September 17188 LAUCN040010000000005
2024 M08 August 17148 LAUCN040010000000005
2024 M07 July 16282 LAUCN040010000000005
2024 M06 June 17021 LAUCN040010000000005
2024 M05 May 16874 LAUCN040010000000005
2024 M04 April 16915 LAUCN040010000000005
2024 M03 March 17058 LAUCN040010000000005
2024 M02 February 16975 LAUCN040010000000005
2024 M01 January 16972 LAUCN040010000000005

California Unemployment rate

One (very) annoying limitation of the BLS API is that you can only retrieve up to 20 years of data.

Code
data <- list(seriesid = c("LASST050000000000003", "LASST060000000000003"),
             startyear = 1970,
             endyear = 2018
             ) |>
  blsAPI(2, TRUE)

data |>
  head(10) |>
  print_table_conditional()
year period periodName value seriesID
1979 M12 December 6.1 LASST050000000000003
1979 M11 November 6.1 LASST050000000000003
1979 M10 October 6.2 LASST050000000000003
1979 M09 September 6.3 LASST050000000000003
1979 M08 August 6.3 LASST050000000000003
1979 M07 July 6.3 LASST050000000000003
1979 M06 June 6.3 LASST050000000000003
1979 M05 May 6.3 LASST050000000000003
1979 M04 April 6.3 LASST050000000000003
1979 M03 March 6.3 LASST050000000000003

BLS QCEW

Code
# Example: Request Construction data for the first quarter of 2017
Construction <- blsQCEW('Industry', year='2017', quarter='1', industry='1012')

Construction |>
  head(10) |>
  print_table_conditional()
area_fips own_code industry_code agglvl_code size_code year qtr disclosure_code qtrly_estabs month1_emplvl month2_emplvl month3_emplvl total_qtrly_wages taxable_qtrly_wages qtrly_contributions avg_wkly_wage lq_disclosure_code lq_qtrly_estabs lq_month1_emplvl lq_month2_emplvl lq_month3_emplvl lq_total_qtrly_wages lq_taxable_qtrly_wages lq_qtrly_contributions lq_avg_wkly_wage oty_disclosure_code oty_qtrly_estabs_chg oty_qtrly_estabs_pct_chg oty_month1_emplvl_chg oty_month1_emplvl_pct_chg oty_month2_emplvl_chg oty_month2_emplvl_pct_chg oty_month3_emplvl_chg oty_month3_emplvl_pct_chg oty_total_qtrly_wages_chg oty_total_qtrly_wages_pct_chg oty_taxable_qtrly_wages_chg oty_taxable_qtrly_wages_pct_chg oty_qtrly_contributions_chg oty_qtrly_contributions_pct_chg oty_avg_wkly_wage_chg oty_avg_wkly_wage_pct_chg
01000 3 1012 53 0 2017 1 N 3 0 0 0 0 0 0 0 N 0.05 0.00 0.00 0.00 0.00 0.00 0.00 0.00 N 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0
01000 5 1012 53 0 2017 1 9418 83172 83992 85415 1090022541 623745976 15390351 996 0.96 0.96 0.96 0.95 1.05 0.96 1.00 1.10 210 2.3 353 0.4 1208 1.5 834 1.0 87644260 8.7 22362749 3.7 -2418247 -13.6 71 7.7
01001 5 1012 73 0 2017 1 79 443 434 424 4508287 2900721 51398 800 1.16 0.91 0.88 0.85 0.93 0.96 0.68 1.06 -2 -2.5 7 1.6 -6 -1.4 -15 -3.4 121174 2.8 15737 0.5 -14955 -22.5 30 3.9
01003 5 1012 73 0 2017 1 572 3621 3623 3645 41852796 26384742 386967 887 1.21 1.17 1.15 1.10 1.49 1.16 0.83 1.31 30 5.5 217 6.4 206 6.0 60 1.7 6352836 17.9 2666038 11.2 -38263 -9.0 100 12.7
01005 5 1012 73 0 2017 1 30 144 151 152 2248580 963074 11157 1161 0.68 0.40 0.41 0.41 0.68 0.36 0.20 1.66 -2 -6.2 -9 -5.9 4 2.7 2 1.3 386568 20.8 20912 2.2 -5875 -34.5 206 21.6
01007 5 1012 73 0 2017 1 31 628 615 706 10215205 5174429 139467 1210 1.09 3.39 3.29 3.65 5.42 4.26 4.21 1.57 2 6.9 -126 -16.7 -123 -16.7 -104 -12.8 -1001795 -8.9 -952161 -15.5 -28136 -16.8 86 7.7
01009 5 1012 73 0 2017 1 89 483 496 491 4524333 3173331 56491 710 1.47 1.30 1.32 1.28 1.40 1.31 1.28 1.07 10 12.7 62 14.7 64 14.8 55 12.6 773109 20.6 500248 18.7 10787 23.6 38 5.7
01011 5 1012 73 0 2017 1 N 4 0 0 0 0 0 0 0 N 0.35 0.00 0.00 0.00 0.00 0.00 0.00 0.00 N -1 -20.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0
01013 5 1012 73 0 2017 1 26 198 197 191 2275535 1408889 30673 896 0.68 0.65 0.64 0.61 0.89 0.61 0.54 1.41 -1 -3.7 -40 -16.8 -40 -16.9 -37 -16.2 -271954 -10.7 -181999 -11.4 -13977 -31.3 60 7.2
01015 5 1012 73 0 2017 1 157 853 857 851 9055626 5689071 133766 816 0.79 0.43 0.43 0.41 0.45 0.45 0.42 1.07 6 4.0 67 8.5 58 7.3 44 5.5 983511 12.2 406766 7.7 -14851 -10.0 37 4.7