API reference · FRED

fred/geo-regional-data

Integrate this model through SandBase's unified API, with production-ready schemas and examples.

APISynchronousOpen model
Production endpoint

Send your first request

OpenAI-compatible endpoint with unified authentication and usage tracking.

POSThttps://api.sandbase.ai/v1/api/fred/geo-regional-data
Model IDfred/geo-regional-data
01

Input Schema

10 parameters · 6 required · 4 optional

ParameterTypeRequiredDescription
datestringRequiredThe date you want to pull a series group data from. YYYY-MM-DD formatted string, required
unitsstringRequiredThe units of the series you want to pull. string, required
seasonstringRequiredThe 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)
frequencystringRequiredFrequency 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_typestringRequiredThe 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_groupstringRequiredThe ID for a group of series found in FRED. string, required
file_typestringOptionalResponse format. Only json is supported. · Options: json · Default: "json"
json
start_datestringOptionalThe 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
transformationstringOptionalA 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_methodstringOptionalstring, 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

FieldTypeDescription
idstringUnique identifier for the generation task
statusstringTask status: pending, running, completed, failed, timeout
modelstringModel used for the generation
outputsarrayArray of output items
outputs[].urlstringURL of the generated artifact
outputs[].content_typestringMIME type (e.g. image/png, video/mp4)
errorobject | nullError details if failed, null on success
error.typestringMachine-readable error type code
error.messagestringHuman-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());