Sand AISand AI MAGI-2MAGI-2 jest teraz na SandBase: wideo 1080p z natywnym dźwiękiemWypróbuj teraz

FRED GeoFRED Shape Files

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

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

Cena
$0.00001USD / wywołanie
Metoda
POST
Odpowiedź
JSON
Parametry
1 wymaganych · 0 opcjonalnych

Playground

Wejście
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
WyjścieGotowe

Twój wynik pojawi się tutaj

Uzupełnij dane wejściowe, a następnie kliknij Uruchom.

README 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.

Odkryj więcej

Powiązane APIs

Wszystkie APIs
APICenaOdpowiedź
FRED$0.00001 za wywołanieJSON
FRED$0.00001 za wywołanieJSON
FRED$0.00001 za wywołanieJSON
FRED$0.00001 za wywołanieJSON
FRED$0.00001 za wywołanieJSON
FRED$0.00001 za wywołanieJSON

Pytania

FAQ

Jak używać API FRED GeoFRED Shape Files?

Wyślij żądanie POST do https://api.sandbase.ai/v1/api/fred/geo-shapes-file z kluczem API SandBase w nagłówku Authorization (Bearer) oraz parametrami w treści JSON. Możesz też wypróbować je w Playground na tej stronie bez pisania kodu.

Ile kosztuje API FRED GeoFRED Shape Files?

$0.00001 za wywołanie, rozliczane z salda SandBase. Płacisz tylko za wykonane wywołania; nie ma subskrypcji.

Jakie parametry przyjmuje API FRED GeoFRED Shape Files?

Wymagane: shape (jedna z opcji: bea, msa, frb, necta, state, country, county, censusregion, censusdivision). Tabela Parameters oraz Playground na tej stronie zawierają wszystkie pola.

Co zwraca API FRED GeoFRED Shape Files?

Odpowiedź JSON zwrócona w tym samym żądaniu HTTP (synchronicznie). README na tej stronie zawiera przykładową odpowiedź.

Czy potrzebuję konta deweloperskiego FRED lub klucza API?

Nie. FRED GeoFRED Shape Files działa przez SandBase, więc jeden klucz API SandBase obejmuje ten endpoint i każde inne API oraz model w katalogu. Nie musisz osobno ubiegać się o dostęp do API FRED.