Sand AISand AI MAGI-2MAGI-2 jest teraz na SandBase: wideo 1080p z natywnym dźwiękiemWypróbuj teraz

FRED Get Series Observations

Dokumentacja API
https://api.sandbase.ai/v1/api/fred/series-observations

Get Series Observations from FRED. Returns the official FRED API response unchanged.

Cena
$0.00001USD / wywołanie
Metoda
POST
Odpowiedź
JSON
Parametry
1 wymaganych · 13 opcjonalnych
100 darmowych wywołań / dzieńPierwsze 100 wywołań dziennie za darmo (współdzielone w ramach organizacji) · Reset o 00:00 UTC. Później płatność za każde wywołanie.

Playground

Wejście
The id for a series. string, required
A key that indicates the aggregation method used for frequency aggregation. This parameter has no affect if the frequency parameter is not set. string, optional, default: avg One of the following values: 'avg', 'sum', 'eop' avg = Average sum = Sum eop = End of Period avg = Average sum = Sum eop = En
Response format. Only json is supported.
An optional parameter that indicates a lower frequency to aggregate values to. The FRED frequency aggregation feature converts higher frequency data series into lower frequency data series (e.g. converts a monthly data series into an annual data series). In FRED, the highest frequency data is daily,
The maximum number of results to return. integer between 1 and 100000, optional, default: 100000 Zakres: od 1 do 100000.
The end of the observation period. YYYY-MM-DD formatted string, optional, default: 9999-12-31 (latest available)
The start of the observation period. YYYY-MM-DD formatted string, optional, default: 1776-07-04 (earliest available)
non-negative integer, optional, default: 0 Minimum: 0.
An integer that indicates an output type. integer, optional, default: 1 One of the following values: '1', '2', '3', '4' 1 = Observations by Real-Time Period 2 = Observations by Vintage Date, All Observations 3 = Observations by Vintage Date, New and Revised Observations Only 4 = Observations, Initia
The end of the real-time period. For more information, see Real-Time Periods , vintage_dates . YYYY-MM-DD formatted string, optional, default: today's date
The start of the real-time period. For more information, see Real-Time Periods , vintage_dates . YYYY-MM-DD formatted string, optional, default: today's date
Sort results is ascending or descending observation_date order. One of the following strings: 'asc', 'desc'. optional, default: asc
A key that indicates a data value transformation. string, optional, default: lin (No transformation) One of the following values: 'lin', 'chg', 'ch1', 'pch', 'pc1', 'pca', 'cch', 'cca', 'log' lin = Levels (No transformation) chg = Change ch1 = Change from Year Ago pch = Percent Change pc1 = Percent
A comma separated string of YYYY-MM-DD formatted dates in history (e.g. 2000-01-01,2005-02-24). Vintage dates are used to download data as it existed on these specified dates in history. Vintage dates can be specified instead of a real-time period using realtime_start and realtime_end. Sometimes it
WyjścieGotowe

Twój wynik pojawi się tutaj

Uzupełnij dane wejściowe, a następnie kliknij Uruchom.

README API

FRED Get Series Observations API

Returns the observations (date and value pairs) for one FRED data series. It needs a series_id, such as GNPCA, and can filter by date range, change the units, or aggregate to a lower frequency.

Use cases

  • Pull the full history of a series such as GNPCA to chart it or load it into a spreadsheet.
  • Request units such as pch or pc1 to get percent changes without calculating them yourself.
  • Convert a monthly series to annual values with frequency and aggregation_method.
  • Fetch a series as it looked on past dates with vintage_dates or realtime_start and realtime_end to test models on the data known at that time.

Request

curl -X POST "https://api.sandbase.ai/v1/api/fred/series-observations" \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"series_id": "GNPCA", "file_type": "json"}'

The result is returned in outputs[0].data.

Parameters

NameTypeRequiredDescription
series_idstringYesThe id for a series. string, required
aggregation_methodstringNoA key that indicates the aggregation method used for frequency aggregation. This parameter has no affect if the frequency parameter is not set. string, optional, default: avg One of the following values: 'avg', 'sum', 'e
file_typestringNoResponse format. Only json is supported.
frequencystringNoAn optional parameter that indicates a lower frequency to aggregate values to. The FRED frequency aggregation feature converts higher frequency data series into lower frequency data series (e.g. converts a monthly data s
limitintegerNoThe maximum number of results to return. integer between 1 and 100000, optional, default: 100000
observation_endstringNoThe end of the observation period. YYYY-MM-DD formatted string, optional, default: 9999-12-31 (latest available)
observation_startstringNoThe start of the observation period. YYYY-MM-DD formatted string, optional, default: 1776-07-04 (earliest available)
offsetintegerNonon-negative integer, optional, default: 0
output_typeintegerNoAn integer that indicates an output type. integer, optional, default: 1 One of the following values: '1', '2', '3', '4' 1 = Observations by Real-Time Period 2 = Observations by Vintage Date, All Observations 3 = Observat
realtime_endstringNoThe end of the real-time period. For more information, see Real-Time Periods , vintage_dates . YYYY-MM-DD formatted string, optional, default: today's date
realtime_startstringNoThe start of the real-time period. For more information, see Real-Time Periods , vintage_dates . YYYY-MM-DD formatted string, optional, default: today's date
sort_orderstringNoSort results is ascending or descending observation_date order. One of the following strings: 'asc', 'desc'. optional, default: asc
unitsstringNoA key that indicates a data value transformation. string, optional, default: lin (No transformation) One of the following values: 'lin', 'chg', 'ch1', 'pch', 'pc1', 'pca', 'cch', 'cca', 'log' lin = Levels (No transformat
vintage_datesstringNoA comma separated string of YYYY-MM-DD formatted dates in history (e.g. 2000-01-01,2005-02-24). Vintage dates are used to download data as it existed on these specified dates in history. Vintage dates can be specified in

Example response

Real response for the request above, trimmed: lists keep their first item and long strings are cut.

{
  "count": 97,
  "file_type": "json",
  "limit": 100000,
  "observation_end": "9999-12-31",
  "observation_start": "1776-07-04",
  "observations": [
    {
      "date": "1929-01-01",
      "realtime_end": "2026-10-30",
      "realtime_start": "2026-10-30",
      "value": "1202.659"
    }
  ],
  "offset": 0,
  "order_by": "observation_date",
  "output_type": 1,
  "realtime_end": "2026-10-30",
  "realtime_start": "2026-10-30",
  "sort_order": "asc"
}

Response fields

FieldMeaning
countTotal number of observations that match the request. In the example it is 97.
observations[].dateDate of the observation in YYYY-MM-DD format. For this annual series each date is January 1 of a year.
observations[].valueValue of the observation as a string. Convert it to a number before you calculate with it.
observations[].realtime_start / observations[].realtime_endStart and end of the real-time period in which this value was the current one. Both are YYYY-MM-DD dates.
observation_start / observation_endObservation date range used for the request. The defaults 1776-07-04 and 9999-12-31 mean no limit.
unitsTransformation applied to the values. lin means levels with no transformation.
sort_order / order_bySort direction and the field used to sort the observations. The example uses asc and observation_date.
limit / offsetPage size and starting position used for this response. Use them to page through long series.
output_typeOutput type used for the response. The example uses 1, which is observations by real-time period.

Notes

  • series_id is required. To find an ID, use FRED Search Series.
  • Page through long series with limit (1 to 100000) and offset. Compare offset plus the number of returned rows with count to know when to stop.
  • To see the title, units and frequency of a series, call FRED Get Series.
  • To see the dates on which past values were revised, call FRED Get Series Vintage Dates.

Pricing

$0.00001 per successful call. Failed calls are not charged. It is included in the daily free quota of each organization.

Odkryj więcej

Powiązane APIs

Wszystkie APIs
APICenaOdpowiedź
FRED$0.00001 za wywołanieJSON
FRED$0.00001 za wywołanieJSON
FRED$0.00001 za wywołanieJSON
FRED$0.00001 za wywołanieJSON
FRED$0.00001 za wywołanieJSON
FRED$0.00001 za wywołanieJSON

Pytania

FAQ

Jak używać API FRED Get Series Observations?

Wyślij żądanie POST do https://api.sandbase.ai/v1/api/fred/series-observations z kluczem API SandBase w nagłówku Authorization (Bearer) oraz parametrami w treści JSON. Możesz też wypróbować je w Playground na tej stronie bez pisania kodu.

Ile kosztuje API FRED Get Series Observations?

$0.00001 za wywołanie. Każda organizacja otrzymuje 100 bezpłatnych wywołań na dzień UTC, współdzielonych między kwalifikującymi się API SandBase, w tym to; potem każde wywołanie jest rozliczane według tej stawki z salda SandBase. Nie ma subskrypcji.

Jakie parametry przyjmuje API FRED Get Series Observations?

Wymagane: series_id (string). Opcjonalne: aggregation_method (jedna z opcji: avg, sum, eop), file_type (jedna z opcji: json), frequency (jedna z opcji: d, w, bw, m, q, sa, a, wef, weth, wew, wetu, wem, wesu, wesa, bwew, bwem), limit (integer), observation_end (string) i observation_start (string) i jeszcze 7. Tabela Parameters oraz Playground na tej stronie zawierają wszystkie pola.

Co zwraca API FRED Get Series Observations?

Odpowiedź JSON zwrócona w tym samym żądaniu HTTP (synchronicznie). README na tej stronie zawiera przykładową odpowiedź.

Czy potrzebuję konta deweloperskiego FRED lub klucza API?

Nie. FRED Get Series Observations działa przez SandBase, więc jeden klucz API SandBase obejmuje ten endpoint i każde inne API oraz model w katalogu. Nie musisz osobno ubiegać się o dostęp do API FRED.