Custom zones

Get one zone

GET
/custom/zones/{id}

Returns the zone with its full polygon by default (geometry=point for just a representative point). Works for zone-layer and cell-layer zones; a cell zone is a Point at the center of its bbox plus n_cells: read its cells with GET /custom/zones/{id}/cells.

An unknown or malformed id is 404 Unknown zone.

This is our own API, not Geoapify-compatible. Every request costs 1 rivet.

Authorization

queryapiKey<token>

Your API key from the dashboard, sent as ?apiKey=<key>.

Path Parameters

id*string

Zone ID: the zone's layer Place ID, gp:layer:<slug>:<uuid>, exactly as place_id returns it. Colons may be sent raw or as %3A. A bare UUID is 404.

Match^gp:layer:[a-z0-9_]{2,40}:[0-9a-f-]{36}$

Query Parameters

geometry?string

full (default here), geometry_1000, geometry_5000, geometry_10000 or point.

Default"full"
Value in"point""geometry_1000""geometry_5000""geometry_10000""full"

Response Body

The zone.

application/json
  1. response

A zone as a GeoJSON Feature. The geometry follows the geometry query parameter (a Point by default on lists, the full polygon on a single zone). Cell-layer zones always carry a Point at the center of their bbox.

type*unknown
geometry*

A GeoJSON geometry (WGS84, [lon, lat]).

bbox?array<number>

[west, south, east, north].

Items4 <= items <= 4
properties*
Example Request
curl -X GET 'https://api.data.graphitelab.ai/v1/custom/zones/gp:layer:dead_zones:3f6c0a52-8c1e-4c5e-9a64-0f1b2d7e9a10'
Example Response
{  "type": "Feature",  "properties": {    "place_id": "gp:layer:zz_docs_zones:f4e920c0-89e7-4bf7-a5de-bc42e7510af2",    "boundary_type": "custom:zz_docs_zones",    "name": "Downtown demo zone",    "lookup_key": "downtown",    "metadata": {      "tier": "gold",      "population": 12000    },    "lon": -86.16,    "lat": 39.769999999999996,    "datasource": {      "sourcename": "The Graphite Lab",      "attribution": "© The Graphite Lab",      "raw": {        "layer": "zz_docs_zones",        "revision": 5      }    }  },  "geometry": {    "type": "MultiPolygon",    "coordinates": [      [        [          [            -86.17,            39.76          ],          [            -86.15,            39.76          ],          [            -86.15,            39.78          ],          [            -86.17,            39.78          ],          [            -86.17,            39.76          ]        ]      ]    ]  },  "bbox": [    -86.17,    39.76,    -86.15,    39.78  ]}