The federal government collects an amazing amount of economic data. Several agencies such as the Securities and Exchange Commission, the Treasury, and the Census Bureau collect economic data, ranging from the stock market activity to local business conditions. The Bureau of Labor Statistics (BLS) collects information on the labor market and is a rich source of data for researchers and the general public.
The BLS offers two APIs for accessing labor data. Version 1 of the Public Data API is a limited access API, which does not require registration. The Public Data API Version 2 requires registration but allows access to more data sources. Once a developer chooses a version, they can then specify one or more series of BLS data such as employment, pay, benefits, inflation, and other similar economic data.
The BLS also offers sample code for using the APIs. Along with the usual languages such as Java, Python, and PHP, developers can also access the data through the commercial statistical software application, SAS, or through the popular open source statistical programming language, R. This is especially useful to researchers and policy analysts who can easily analyze the BLS datasets.