List States and Counties

Get all states and counties from Federal Reserve data

List states

List of all US states

/fred/states

import tradingeconomics as te
te.login('your_api_key')

te.getFedRStates()
const te = require('tradingeconomics');
te.login('your_api_key');

data = te.getFred().then(function(data){
    console.log(data)     
});
WebRequest request = WebRequest.Create("https://api.tradingeconomics.com/fred/states?c=guest:guest");

List counties

List of all counties per state

/fred/counties/{state}

te.getFedRStates(county = 'arkansas')
data = te.getFred(counties = 'arkansas').then(function(data){
    console.log(data)     
});
WebRequest request = WebRequest.Create("https://api.tradingeconomics.com/fred/counties/arkansas?c=guest:guest");

Response fields

Field ‘List states’

FieldTypeDescriptionExample
NamestringState name“Arkansas”

Field ‘List counties’

FieldTypeDescriptionExample
CountystringCounty name“Little River County, AR”