npm install fred
Fred and the FRED API require and API key. You can request an api key from the official Federal Reserve web site.
Create an instance of fred
with your API key:
var fred = require('fred')('GiVeMe1APIKeYPLeaSe' || process.env.FRED_API_KEY);
Request a resource:
fred.series.observations('GDP', function(err, grossNationalProduct) {
if (!err) console.log(grossNationalProduct.observations)
done(err);
});
The documentation for the FRED API is available on the Federal Reserve's web site.