Find an API

Search public APIs with auth details & Postman guides

← All APIs

FRED Economic Data API

fred.stlouisfed.org · Government

Government API Key Free & Open Government Financial Services Banking Economics Finance Government

Access 800,000+ economic time series from the Federal Reserve Bank of St. Louis. Covers GDP, unemployment, inflation, interest rates, money supply, trade, and state/regional data. Widely used for financial modeling, insurance pricing, and economic research.

Authentication

API Key Free API key from fred.stlouisfed.org/docs/api/api_key.html. Required on all requests.

Parameter name: api_key (in query)

Sample Requests

GET Get unemployment rate series

Returns monthly US unemployment rate observations (UNRATE series).

https://api.stlouisfed.org/fred/series/observations?limit=24&api_key=YOUR_API_KEY&file_type=json&series_id=UNRATE

Hover any highlighted part to learn what it does

curl -X GET "https://api.stlouisfed.org/fred/series/observations?limit=24&api_key=YOUR_API_KEY&file_type=json&series_id=UNRATE"
import requests
params = {
    "limit": "24",
    "api_key": "YOUR_API_KEY",
    "file_type": "json",
    "series_id": "UNRATE"
}
response = requests.get(
    "https://api.stlouisfed.org/fred/series/observations",
    params=params,
)
print(response.json())
const url = new URL('https://api.stlouisfed.org/fred/series/observations');
url.searchParams.set('limit', '24');
url.searchParams.set('api_key', 'YOUR_API_KEY');
url.searchParams.set('file_type', 'json');
url.searchParams.set('series_id', 'UNRATE');

const response = await fetch(url); 
const data = await response.json();
console.log(data);
package main

import (
	"fmt"
	"io"
	"net/http"
	"net/url"
)

func main() {
	baseURL, _ := url.Parse("https://api.stlouisfed.org/fred/series/observations")
	q := baseURL.Query()
	q.Set("limit", "24")
	q.Set("api_key", "YOUR_API_KEY")
	q.Set("file_type", "json")
	q.Set("series_id", "UNRATE")
	baseURL.RawQuery = q.Encode()
	targetURL := baseURL.String()
	req, _ := http.NewRequest("GET", targetURL, nil)

	client := &http.Client{}
	resp, _ := client.Do(req)
	defer resp.Body.Close()
	body, _ := io.ReadAll(resp.Body)
	fmt.Println(string(body))
}
require "net/http"
require "json"

uri = URI("https://api.stlouisfed.org/fred/series/observations")
uri.query = URI.encode_www_form({
  "limit" => "24",
  "api_key" => "YOUR_API_KEY",
  "file_type" => "json",
  "series_id" => "UNRATE"
})

http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"

req = Net::HTTP::Get.new(uri)

res = http.request(req)
puts JSON.parse(res.body)
<?php
$url = "https://api.stlouisfed.org/fred/series/observations?" . http_build_query([
    "limit" => "24",
    "api_key" => "YOUR_API_KEY",
    "file_type" => "json",
    "series_id" => "UNRATE"
]);
$opts = ["http" => [
    "method" => "GET",
]];
$ctx = stream_context_create($opts);
$res = file_get_contents($url, false, $ctx);
print_r(json_decode($res, true));
GET Search series by keyword

Search for series by keyword. Returns matching series IDs, names, and metadata.

https://api.stlouisfed.org/fred/series/search?api_key=YOUR_API_KEY&file_type=json&search_text=workers compensation

Hover any highlighted part to learn what it does

curl -X GET "https://api.stlouisfed.org/fred/series/search?api_key=YOUR_API_KEY&file_type=json&search_text=workers%20compensation"
import requests
params = {
    "api_key": "YOUR_API_KEY",
    "file_type": "json",
    "search_text": "workers compensation"
}
response = requests.get(
    "https://api.stlouisfed.org/fred/series/search",
    params=params,
)
print(response.json())
const url = new URL('https://api.stlouisfed.org/fred/series/search');
url.searchParams.set('api_key', 'YOUR_API_KEY');
url.searchParams.set('file_type', 'json');
url.searchParams.set('search_text', 'workers compensation');

const response = await fetch(url); 
const data = await response.json();
console.log(data);
package main

import (
	"fmt"
	"io"
	"net/http"
	"net/url"
)

func main() {
	baseURL, _ := url.Parse("https://api.stlouisfed.org/fred/series/search")
	q := baseURL.Query()
	q.Set("api_key", "YOUR_API_KEY")
	q.Set("file_type", "json")
	q.Set("search_text", "workers compensation")
	baseURL.RawQuery = q.Encode()
	targetURL := baseURL.String()
	req, _ := http.NewRequest("GET", targetURL, nil)

	client := &http.Client{}
	resp, _ := client.Do(req)
	defer resp.Body.Close()
	body, _ := io.ReadAll(resp.Body)
	fmt.Println(string(body))
}
require "net/http"
require "json"

uri = URI("https://api.stlouisfed.org/fred/series/search")
uri.query = URI.encode_www_form({
  "api_key" => "YOUR_API_KEY",
  "file_type" => "json",
  "search_text" => "workers compensation"
})

http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"

req = Net::HTTP::Get.new(uri)

res = http.request(req)
puts JSON.parse(res.body)
<?php
$url = "https://api.stlouisfed.org/fred/series/search?" . http_build_query([
    "api_key" => "YOUR_API_KEY",
    "file_type" => "json",
    "search_text" => "workers compensation"
]);
$opts = ["http" => [
    "method" => "GET",
]];
$ctx = stream_context_create($opts);
$res = file_get_contents($url, false, $ctx);
print_r(json_decode($res, true));

Postman Setup Guide

Get Postman ↗
  1. Get a free API key at https://fred.stlouisfed.org/docs/api/api_key.html
  2. Find series IDs by searching at https://fred.stlouisfed.org/
  3. In Postman, GET https://api.stlouisfed.org/fred/series/observations
  4. Required params: series_id (e.g. UNRATE, GDP, CPIAUCSL), api_key, file_type=json
  5. Optional: observation_start, observation_end (YYYY-MM-DD), limit, sort_order
  6. Response includes observations array with date and value fields

What can you build with FRED Economic Data API?

FRED Economic Data API is a Government API. Developers commonly use government APIs for:

  • surfacing public datasets in citizen-facing apps
  • building transparency and civic engagement tools
  • accessing legislation, court records, and official data
  • powering research and journalism tools
  • creating compliance and regulatory monitoring dashboards

API Key authentication. You'll receive a key after signing up. Send it with every request — in a header or query parameter. Keep it out of client-side code and never commit it to version control. FRED Economic Data API is free to use, making it a low-risk choice to experiment with.

New to APIs? Read our beginner's guide · Learn about API keys · What is REST?

Open documentation ↗