Sand AISand AI MAGI-2MAGI-2 теперь на SandBase: видео 1080p с нативным звукомПопробовать сейчас

FRED GeoFRED Shape Files

Документация API
https://api.sandbase.ai/v1/api/fred/geo-shapes-file

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

Цена
$0.00001USD / вызов
Метод
POST
Ответ
JSON
Параметры
1 обязательных · 0 необязательных

Песочница

Ввод
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
ВыходГотово

Ваш результат появится здесь

Заполните входные данные, затем нажмите «Запустить».

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.

Посмотреть больше

Связанные APIs

Все APIs
APIЦенаОтвет
FRED$0.00001 за запросJSON
FRED$0.00001 за запросJSON
FRED$0.00001 за запросJSON
FRED$0.00001 за запросJSON
FRED$0.00001 за запросJSON
FRED$0.00001 за запросJSON

Вопросы

FAQ

Как использовать API FRED GeoFRED Shape Files?

Отправьте POST-запрос на https://api.sandbase.ai/v1/api/fred/geo-shapes-file, указав ключ SandBase API в заголовке Authorization (Bearer), а параметры — в теле JSON. Вы также можете попробовать это в Playground на этой странице без написания кода.

Сколько стоит API FRED GeoFRED Shape Files?

$0.00001 за вызов, списывается с баланса SandBase. Оплата взимается только за сделанные вызовы; подписка не требуется.

Какие параметры принимает API FRED GeoFRED Shape Files?

Обязательные: shape (один из bea, msa, frb, necta, state, country, county, censusregion, censusdivision). В таблице Parameters и в Playground на этой странице перечислены все поля.

Что возвращает API FRED GeoFRED Shape Files?

JSON-ответ, возвращаемый в том же HTTP-запросе (синхронно). В README на этой странице приведен пример ответа.

Нужен ли мне аккаунт разработчика FRED или API key?

Нет. FRED GeoFRED Shape Files работает через SandBase, поэтому один API key SandBase покрывает этот endpoint и все остальные API и модели в каталоге. Вам не нужно отдельно запрашивать доступ к API FRED.