Sand AISand AI MAGI-2MAGI-2 agora está na SandBase: vídeo em 1080p com áudio nativoExperimente agora

FRED GeoFRED Shape Files

Docs da API
https://api.sandbase.ai/v1/api/fred/geo-shapes-file

GeoFRED Shape Files from FRED. Returns the official FRED API response unchanged.

Preço
$0.00001USD / chamada
Método
POST
Resposta
JSON
Parâmetros
1 obrigatórios · 0 opcionais

Playground

Entrada
The type of shape you want to pull GeoJSON data for. Available Shape Types: bea (Bureau of Economic Anaylis Region) msa (Metropolitan Statistical Area) frb (Federal Reserve Bank Districts) necta (New England City and Town Area) state country county (USA Counties) censusregion (US Census Regions) cen
SaídaPronto

Sua saída aparecerá aqui

Preencha as entradas e clique em Executar.

README da API

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

NameTypeRequiredDescription
shapestringYesThe type of shape you want to pull GeoJSON data for. Available Shape Types: bea (Bureau of Economic Anaylis Region) msa (Metropolitan Statistical Area) frb (Federal Reserve Bank Districts) necta (New England City and Tow

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

FieldMeaning
nameName of the shape set returned. For shape set to bea it is state_bea_region.
typeGeoJSON type of the whole response. The value is FeatureCollection.
crs.properties.nameCoordinate reference system identifier for the shapes. The value is urn:ogc:def:crs:OGC:1.3:CRS84.
features[]One entry per region. Each entry is a GeoJSON Feature with a geometry and a properties object.
features[].geometry.typeGeometry type of the region. The sample shows MultiPolygon, so one region can have several separate parts.
features[].geometry.coordinatesNested lists of [x, y] points that outline each polygon of the region. The sample values are large whole numbers, not longitude and latitude degrees, so check them before you plot on a world map.
features[].properties.bea_regi_1Name of the BEA region, for example Far West, Great Lakes or Southwest.
features[].properties.bea_regionNumeric code for the BEA region, for example 8 for Far West.

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.

Explorar mais

APIs relacionadas

Todas as APIs
APIPreçoResposta
FRED$0.00001 por chamadaJSON
FRED$0.00001 por chamadaJSON
FRED$0.00001 por chamadaJSON
FRED$0.00001 por chamadaJSON
FRED$0.00001 por chamadaJSON
FRED$0.00001 por chamadaJSON

Perguntas

FAQ

Como eu uso a API FRED GeoFRED Shape Files?

Envie uma solicitação POST para https://api.sandbase.ai/v1/api/fred/geo-shapes-file 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.

Quanto custa a API FRED GeoFRED Shape Files?

$0.00001 por chamada, cobrado do seu saldo SandBase. Você paga apenas pelas chamadas que fizer; não há assinatura.

Quais parâmetros a API FRED GeoFRED Shape Files aceita?

Obrigatórios: shape (um de bea, msa, frb, necta, state, country, county, censusregion, censusdivision). A tabela de Parâmetros e o Playground nesta página listam todos os campos.

O que a API FRED GeoFRED Shape Files retorna?

Uma resposta JSON retornada na mesma solicitação HTTP (síncrona). O README desta página inclui um exemplo de resposta.

Preciso de uma conta de desenvolvedor FRED ou de uma chave de API?

Não. FRED GeoFRED Shape Files 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.