Sand AISand AI MAGI-2MAGI-2 kini tersedia di SandBase: video 1080p dengan audio nativeCoba sekarang

FRED GeoFRED Shape Files

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

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

Harga
$0.00001USD / panggilan
Metode
POST
Respons
JSON
Parameter
1 wajib · 0 opsional

Playground

Input
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
OutputSiap

Output Anda akan muncul di sini

Lengkapi input, lalu klik Run.

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.

Jelajahi lebih lanjut

API Terkait

Semua APIs
APIHargaRespons
FRED$0.00001 per panggilanJSON
FRED$0.00001 per panggilanJSON
FRED$0.00001 per panggilanJSON
FRED$0.00001 per panggilanJSON
FRED$0.00001 per panggilanJSON
FRED$0.00001 per panggilanJSON

Pertanyaan

FAQ

Bagaimana cara menggunakan API FRED GeoFRED Shape Files?

Kirim permintaan POST ke https://api.sandbase.ai/v1/api/fred/geo-shapes-file dengan kunci API SandBase Anda di header Authorization (Bearer) dan parameter sebagai body JSON. Anda juga dapat mencobanya di Playground di halaman ini tanpa menulis kode.

Berapa biaya API FRED GeoFRED Shape Files?

$0.00001 per panggilan, ditagihkan dari saldo SandBase Anda. Anda hanya dikenai biaya untuk panggilan yang Anda lakukan; tidak ada langganan.

Parameter apa yang diterima API FRED GeoFRED Shape Files?

Wajib: shape (salah satu dari bea, msa, frb, necta, state, country, county, censusregion, censusdivision). Tabel Parameters dan Playground di halaman ini mencantumkan setiap field.

Apa yang dikembalikan API FRED GeoFRED Shape Files?

Respons JSON yang dikembalikan dalam permintaan HTTP yang sama (sinkron). README di halaman ini menyertakan contoh respons.

Apakah saya memerlukan akun developer atau kunci API FRED?

Tidak. FRED GeoFRED Shape Files berjalan melalui SandBase, jadi satu kunci API SandBase mencakup endpoint ini dan setiap API serta model lain di katalog. Anda tidak perlu mendaftar akses API FRED secara terpisah.