Custom zones

Read the cells of a cell zone

GET
/custom/zones/{id}/cells

Returns the H3 cells of a cell-layer zone.

  • format=list (default): a page of cell IDs in index order, limit up to 100,000 (default 10,000), paged with next_cursor. values=true adds the layer's per-cell values as arrays aligned with cells.
  • format=count: just {h3_resolution, count}.
  • bbox (west,south,east,north) limits the answer to cells inside the box. A box covering more than 500,000 cells is 413.

A zone that is not in a cell layer is 404 Not a cell 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

format?string

list for cell IDs, count for the number of cells.

Default"list"
Value in"list""count"
bbox?string

west,south,east,north.

limit?integer

Cells per page (list format).

Range1 <= value <= 100000
Default10000
values?boolean

true adds the per-cell values.

Defaultfalse
cursor?string

Opaque next_cursor from the previous page. Omit for the first page.

Response Body

Cells of the zone.

application/json
  1. response

format=list: a page of cell IDs. format=count: just h3_resolution and count (of the whole zone, or of the bbox).

h3_resolution*integer
count*integer
cells?array<string>

H3 cell IDs in index order. List format only.

next_cursor?|

List format only.

values?

List format with values=true: one array per layer cell_value_keys entry, aligned with cells.

Example Request
curl -X GET 'https://api.data.graphitelab.ai/v1/custom/zones/gp:layer:coverage:3f6c0a52-8c1e-4c5e-9a64-0f1b2d7e9a10/cells'
Example Response
{  "h3_resolution": 7,  "count": 3,  "cells": [    "872661a20ffffff",    "872661a21ffffff",    "872661a23ffffff"  ],  "next_cursor": null,  "values": {    "households": [      95,      120,      40    ]  }}