Search zones by area
Finds the zones that meet an area.
Zone layer. Body {intersects, meta?, limit?, cursor?}: intersects (a Polygon or MultiPolygon) is required; bbox, area_id and cells are 400.
Cell layer. Give exactly one of intersects, bbox or area_id (a gp:osm: or gp:pc: Place ID). The area is turned into H3 cells at the layer's resolution. The response adds area_cells (cells in the area) and, per zone, cell_count, coverage_pct and, with cells: true, the overlapping cells.
- An area over 500,000 cells is 413, as is a page needing over 100,000 cell IDs.
area_id: 404 for an unknown area.- Body limit 10 MB.
This is our own API, not Geoapify-compatible. Every request costs 1 rivet.
apiKey<token>Your API key from the dashboard, sent as ?apiKey=<key>.
layer*stringLayer slug: lowercase letters, digits and underscores, 2 to 40 characters (^[a-z0-9_]{2,40}$).
^[a-z0-9_]{2,40}$geometry?stringHow much geometry each zone carries: point (a representative point), geometry_1000, geometry_5000, geometry_10000 (simplified to about that many meters of tolerance) or full.
"point""geometry_1000""geometry_5000""geometry_10000""full"application/json- body
Search body. Zone layer: intersects (required); bbox, area_id and cells are rejected (400).
Cell layer: exactly one of intersects, bbox or area_id.
intersects?GeoJSON Polygon or MultiPolygon.
bbox?array<number>Cell layers only. [west, south, east, north].
4 <= items <= 4area_id?stringCell layers only. A built-in boundary Place ID (gp:osm: or gp:pc:). 404 for an unknown area, 503 when the boundary database is not configured.
cells?booleanCell layers only. Include each zone's overlapping H3 cell IDs (capped at 100,000 IDs per page, else 413).
meta?Keep zones whose metadata contains these members.
limit?integer1 <= value <= 1000100cursor?stringA page of zones.
application/json- response
Zone-layer search returns a ZoneCollection. A cell-layer search adds area_cells and, per feature, cell_count, coverage_pct and (with cells: true) cells.
type*unknownfeatures*array<>area_cells?integerCell layers only: number of cells covering the searched area.
next_cursor*string|nullcurl -X POST 'https://api.data.graphitelab.ai/v1/custom/layers/dead_zones/zones/search' \ -H 'Content-Type: application/json' \ -d '{}'{ "type": "FeatureCollection", "features": [ { "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": "Point", "coordinates": [ -86.16, 39.77 ] }, "bbox": [ -86.17, 39.76, -86.15, 39.78 ] } ], "next_cursor": null}