1.0.2 • Published 6 years ago

bls2 v1.0.2

Weekly downloads
4
License
MIT
Repository
github
Last release
6 years ago

Bureau of Labor Statistics API 2.0 Wrapper for Node.js

This is an independent wrapper library to make API calls to the Bureau of Labor Statistics 2.0 API. This library is not in any way associated with the US government. It is just to assist developers to use the API in a JavaScript environment.

About the BLS API

In order to use the Bureau of Labor Statistics API 2.0, you must register an API key. Please visit US Bureau of Labor Statistics Developer Website to register your key and learn how to use the API.

Installation

npm install bls2

Usage

var Bls2 = require('bls2');

const API_KEY = 'YOUR API KEY';

let bls = new Bls2(API_KEY);

let options = {
    'seriesid': ['CES3000000001'],
    'startyear': '2008',  
    'endyear': '2018',
    // ...
};

bls.fetch(options).then(function (response) {
    console.log(JSON.stringify(response));
});

Required Parameters

  • seriesid (Array, you can find series ids at the BLS website)
  • startyear (string representing the year you want the data to start at)
  • endyear (string representing the year you want the data to end at)

Refer to the US Bureau of Labor Statistics Developer Website for all optional parameters.

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago