API reference · FRED
fred/geo-regional-data
Integrate this model through SandBase's unified API, with production-ready schemas and examples.
Production endpoint
Send your first request
OpenAI-compatible endpoint with unified authentication and usage tracking.
POST
https://api.sandbase.ai/v1/api/fred/geo-regional-dataModel ID
fred/geo-regional-data01
Input Schema
10 parameters · 6 required · 4 optional
| Parameter | Type | Required | Description |
|---|---|---|---|
date | string | Required | The date you want to pull a series group data from. YYYY-MM-DD formatted string, required |
units | string | Required | The units of the series you want to pull. string, required |
season | string | Required | The seasonality of the series group. string, required, five possible SA (Seasonally Adjusted), NSA (Not Seasonally Adjusted), SSA (Smoothed Seasonally Adjusted), SAAR (Seasonally Adjusted Annual Rate), or NSAAR (Not Seasonally Adjusted Annual Rate) |
frequency | string | Required | Frequency automatically assigns the default frequency of the map when using the Request Wizard above. The parameter can be used as a frequency aggregation feature. The maps frequency aggregation feature converts higher frequency data series into lower frequency data series (e.g. converts a monthly d · Options: d, w, bw, m, q, sa, a, wef, weth, wew, wetu, wem, wesu, wesa, bwew, bwem dwbwmqsaawefwethwewwetuwemwesuwesabwewbwem |
region_type | string | Required | The region you want to pull data for. string, required One of the following values: bea msa frb necta state country county censusregion bea msa frb necta state country county censusregion · Options: bea, msa, frb, necta, state, country, county, censusregion beamsafrbnectastatecountrycountycensusregion |
series_group | string | Required | The ID for a group of series found in FRED. string, required |
file_type | string | Optional | Response format. Only json is supported. · Options: json · Default: "json" json |
start_date | string | Optional | The start date you want to request series group data from. This allows you to pull a range of data YYYY-MM-DD formatted string, optional |
transformation | string | Optional | 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 · Options: lin, chg, ch1, pch, pc1, pca, cch, cca, log · Default: "lin" linchgch1pchpc1pcacchccalog |
aggregation_method | string | Optional | 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 = End of Period · Options: avg, sum, eop · Default: "avg" avgsumeop |
02
Output Schema
| Field | Type | Description |
|---|---|---|
id | string | Unique identifier for the generation task |
status | string | Task status: pending, running, completed, failed, timeout |
model | string | Model used for the generation |
outputs | array | Array of output items |
outputs[].url | string | URL of the generated artifact |
outputs[].content_type | string | MIME type (e.g. image/png, video/mp4) |
error | object | null | Error details if failed, null on success |
error.type | string | Machine-readable error type code |
error.message | string | Human-readable error description |
03
Code Examples
Ready-to-run snippets
const apiKey = process.env.SANDBASE_API_KEY;
const response = await fetch("https://api.sandbase.ai/v1/api/fred/geo-regional-data", {
method: "POST",
headers: {
Authorization: `Bearer ${apiKey}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"file_type": "json",
"transformation": "lin",
"aggregation_method": "avg"
}),
});
if (!response.ok) throw new Error(await response.text());
console.log(await response.json());