fred_request: Make a raw request to the FRED API

View source: R/request.R

fred_requestR Documentation

Make a raw request to the FRED API

Description

Low-level function that sends a request to any FRED API endpoint and returns the parsed JSON as a list. Most users should use the higher-level functions such as fred_series() or fred_search().

Usage

fred_request(endpoint, ...)

Arguments

endpoint

Character. The API endpoint path (e.g. "series/observations").

...

Named parameters passed as query string arguments to the API.

Value

A list parsed from the JSON response.

See Also

Other configuration: clear_cache(), fred_get_key(), fred_set_key()

Examples


op <- options(fred.cache_dir = tempdir())
fred_request("series", series_id = "GDP")
options(op)


fred documentation built on March 19, 2026, 5:09 p.m.