series_idstringobrigatório
The id for a series. string, required
https://api.sandbase.ai/v1/api/fred/series-observationsGet Series Observations from FRED. Returns the official FRED API response unchanged.
Sua saída aparecerá aqui
Preencha as entradas e clique em Executar.
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.
GNPCA to chart it or load it into a spreadsheet.units such as pch or pc1 to get percent changes without calculating them yourself.frequency and aggregation_method.vintage_dates or realtime_start and realtime_end to test models on the data known at that time.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.
| Name | Type | Required | Description |
|---|---|---|---|
series_id | string | Yes | The id for a series. string, required |
aggregation_method | string | No | 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', 'e |
file_type | string | No | Response format. Only json is supported. |
frequency | string | No | 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 s |
limit | integer | No | The maximum number of results to return. integer between 1 and 100000, optional, default: 100000 |
observation_end | string | No | The end of the observation period. YYYY-MM-DD formatted string, optional, default: 9999-12-31 (latest available) |
observation_start | string | No | The start of the observation period. YYYY-MM-DD formatted string, optional, default: 1776-07-04 (earliest available) |
offset | integer | No | non-negative integer, optional, default: 0 |
output_type | integer | No | 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 = Observat |
realtime_end | string | No | 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 |
realtime_start | string | No | 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_order | string | No | Sort results is ascending or descending observation_date order. One of the following strings: 'asc', 'desc'. optional, default: asc |
units | string | No | 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 transformat |
vintage_dates | string | No | 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 in |
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"
}
| Field | Meaning |
|---|---|
count | Total number of observations that match the request. In the example it is 97. |
observations[].date | Date of the observation in YYYY-MM-DD format. For this annual series each date is January 1 of a year. |
observations[].value | Value of the observation as a string. Convert it to a number before you calculate with it. |
observations[].realtime_start / observations[].realtime_end | Start and end of the real-time period in which this value was the current one. Both are YYYY-MM-DD dates. |
observation_start / observation_end | Observation date range used for the request. The defaults 1776-07-04 and 9999-12-31 mean no limit. |
units | Transformation applied to the values. lin means levels with no transformation. |
sort_order / order_by | Sort direction and the field used to sort the observations. The example uses asc and observation_date. |
limit / offset | Page size and starting position used for this response. Use them to page through long series. |
output_type | Output type used for the response. The example uses 1, which is observations by real-time period. |
series_id is required. To find an ID, use FRED Search Series.limit (1 to 100000) and offset. Compare offset plus the number of returned rows with count to know when to stop.$0.00001 per successful call. Failed calls are not charged. It is included in the daily free quota of each organization.
Comece a construir
Endpoint da API da plataforma com autenticação unificada e rastreamento de uso.
curl -X POST "https://api.sandbase.ai/v1/api/fred/series-observations" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"limit": 100000,
"units": "lin",
"offset": 0,
"file_type": "json",
"series_id": "GNPCA",
"sort_order": "asc",
"output_type": 1,
"observation_end": "9999-12-31",
"observation_start": "1776-07-04",
"aggregation_method": "avg"
}'Defina sua chave da API SandBase no ambiente do seu servidor. As requisições usam autenticação Bearer.
export SANDBASE_API_KEY="YOUR_API_KEY"Mantenha sua chave no servidor. Não a exponha em código do navegador.
series_idstringobrigatórioThe id for a series. string, required
aggregation_methodstringA 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
Padrão: "avg"
Valores possíveis: avg, sum, eop
file_typestringResponse format. Only json is supported.
Padrão: "json"
Valores possíveis: json
frequencystringAn 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,
Valores possíveis: d, w, bw, m, q, sa, a, wef, weth, wew, wetu, wem, wesu, wesa, bwew, bwem
limitintegerThe maximum number of results to return. integer between 1 and 100000, optional, default: 100000
Padrão: 100000
observation_endstringThe end of the observation period. YYYY-MM-DD formatted string, optional, default: 9999-12-31 (latest available)
Padrão: "9999-12-31"
observation_startstringThe start of the observation period. YYYY-MM-DD formatted string, optional, default: 1776-07-04 (earliest available)
Padrão: "1776-07-04"
offsetintegernon-negative integer, optional, default: 0
Padrão: 0
output_typeintegerAn 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
Padrão: 1
Valores possíveis: 1, 2, 3, 4
realtime_endstringThe 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_startstringThe 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_orderstringSort results is ascending or descending observation_date order. One of the following strings: 'asc', 'desc'. optional, default: asc
Padrão: "asc"
Valores possíveis: asc, desc
unitsstringA 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
Padrão: "lin"
Valores possíveis: lin, chg, ch1, pch, pc1, pca, cch, cca, log
vintage_datesstringA 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
Resposta de exemplo salva para esta API; nenhuma requisição ao vivo é feita ao visualizá-la.
Nenhuma resposta salva foi publicada. Execute a API no Playground para inspecionar a resposta.
Explorar mais
| API | Preço | Resposta |
|---|---|---|
FRED Get Series ObservationsEsta API FRED | $0.00001 por chamada | JSON |
FRED | $0.00001 por chamada | JSON |
FRED | $0.00001 por chamada | JSON |
FRED | $0.00001 por chamada | JSON |
FRED | $0.00001 por chamada | JSON |
FRED | $0.00001 por chamada | JSON |
Perguntas
Envie uma solicitação POST para https://api.sandbase.ai/v1/api/fred/series-observations com sua chave de API da SandBase no cabeçalho Authorization (Bearer) e os parâmetros no corpo JSON. Você também pode testar no Playground desta página sem escrever código.
$0.00001 por chamada. Cada organização recebe 100 chamadas grátis por dia UTC, compartilhadas entre as APIs elegíveis da SandBase, incluindo esta; depois disso, cada chamada é cobrada nesse valor do seu saldo SandBase. Não há assinatura.
Obrigatórios: series_id (string). Opcionais: aggregation_method (um de avg, sum, eop), file_type (um de json), frequency (um de d, w, bw, m, q, sa, a, wef, weth, wew, wetu, wem, wesu, wesa, bwew, bwem), limit (integer), observation_end (string) e observation_start (string) e mais 7. A tabela de Parâmetros e o Playground nesta página listam todos os campos.
Uma resposta JSON retornada na mesma solicitação HTTP (síncrona). O README desta página inclui um exemplo de resposta.
Não. FRED Get Series Observations funciona via SandBase, então uma única chave de API da SandBase cobre este endpoint e todas as outras APIs e modelos do catálogo. Você não precisa solicitar acesso à API do FRED separadamente.