List or search locations
Lists the points of a location layer in id order, or finds the ones near a point. Filters combine with AND:
lookup_key: exact match.bbox: insidewest,south,east,north.meta[key]=value: metadata contains the member (repeatable, at most 10).lat+lonwithradius(meters, 1 to 500,000): points within the radius, nearest first, paged withnext_cursor.lat+lonwithnearest(1 to 1,000): the N closest points, exactly ranked, in one page (next_cursorisnull).max_distance(meters) bounds it.lat+lonneedradiusornearest;radiusandnearestcannot be combined.
Radius and nearest results carry distance_m on each feature. A zone layer or cell layer is 404 (Unknown location layer).
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}$lookup_key?stringExact Lookup Key.
bbox?stringwest,south,east,north.
meta[key]?stringMetadata filter, written meta[region]=central. Repeatable, at most 10.
lat?numberLatitude of the query point. Needs lon and radius or nearest.
-90 <= value <= 90lon?numberLongitude of the query point.
-180 <= value <= 180radius?numberSearch radius in meters.
1 <= value <= 500000nearest?integerReturn the N closest points (one page).
1 <= value <= 1000max_distance?numberWith nearest, ignore points farther than this many meters.
1 <= value <= 500000limit?integerPage size.
1 <= value <= 1000100cursor?stringOpaque next_cursor from the previous page. Omit for the first page.
A page of locations.
application/json- response
type*unknownfeatures*array<>next_cursor*|Null on the last page, and always null for nearest (it returns one page).
curl -X GET 'https://api.data.graphitelab.ai/v1/custom/layers/dead_zones/locations'{ "type": "FeatureCollection", "features": [ { "type": "Feature", "properties": { "place_id": "gp:layer:zz_docs_places:ab0baad7-d2c5-44bc-b1b1-e6ad71425299", "boundary_type": "custom:zz_docs_places", "name": "Demo store", "lookup_key": "store-1", "metadata": { "region": "central" }, "distance_m": 240.958, "lon": -86.1581, "lat": 39.7684, "datasource": { "sourcename": "The Graphite Lab", "attribution": "© The Graphite Lab", "raw": { "layer": "zz_docs_places", "revision": 4 } } }, "geometry": { "type": "Point", "coordinates": [ -86.1581, 39.7684 ] } }, { "type": "Feature", "properties": { "place_id": "gp:layer:zz_docs_places:534fa417-6bfd-47f5-82c0-6b3fbac6890d", "boundary_type": "custom:zz_docs_places", "name": "Second store (moved)", "lookup_key": "store-2", "metadata": { "region": "north" }, "distance_m": 3745.681, "lon": -86.14, "lat": 39.8, "datasource": { "sourcename": "The Graphite Lab", "attribution": "© The Graphite Lab", "raw": { "layer": "zz_docs_places", "revision": 4 } } }, "geometry": { "type": "Point", "coordinates": [ -86.14, 39.8 ] } } ], "next_cursor": null}