FRED GeoFRED Shape Files API
Returns GeoJSON boundary shapes for a chosen type of US region, such as BEA regions, states, counties or Federal Reserve districts. It needs one input, shape, which sets the region type.
Use cases
- Draw a map of BEA economic regions in a web or desktop mapping tool.
- Join the shapes to regional values from GeoFRED to build a choropleth map.
- Match region names to shapes to label charts that group data by region.
- Load county or state boundaries into a GIS tool without downloading shape files by hand.
Request
curl -X POST "https://api.sandbase.ai/v1/api/fred/geo-shapes-file" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"shape": "bea"}'
The result is returned in outputs[0].data.
Parameters
Example response
Real response for the request above, trimmed: lists keep their first item and long strings are cut.
{
"crs": {
"properties": {
"name": "urn:ogc:def:crs:OGC:1.3:CRS84"
},
"type": "name"
},
"features": [
{
"geometry": {
"coordinates": [
[
[
[
1485
]
]
]
],
"type": "MultiPolygon"
},
"properties": {
"bea_regi_1": "Far West",
"bea_region": 8
},
"type": "Feature"
}
],
"name": "state_bea_region",
"type": "FeatureCollection"
}
Response fields
Notes
- Property names inside
features[].properties depend on the shape value. The names bea_regi_1 and bea_region appear for bea.
- Allowed
shape values are bea, msa, frb, necta, state, country, county, censusregion and censusdivision.
- To get data values for these regions, call FRED GeoFRED Regional Data and match them to the shapes by region name or code.
- To find series that exist by region, see FRED GeoFRED Series Group.
Pricing
$0.00001 per successful call. Failed calls are not charged. It is included in the daily free quota of each organization.