Custom locations
Search locations with a JSON body
POST
The same search as GET /custom/layers/{layer}/locations, for filters too long for a URL. meta is an object ({"region": "central"}) instead of meta[key] parameters. Body limit 128 KB.
This is our own API, not Geoapify-compatible. Every request costs 1 rivet.
query
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}$).
Match
^[a-z0-9_]{2,40}$application/json- body
Same parameters as GET .../locations, as a JSON body. lat and lon need radius or nearest.
lookup_key?stringbbox?array<number>Items
4 <= items <= 4meta?Up to 10 members; each must be contained in the item's metadata.
lat?numberlon?numberradius?numberMeters.
Range
1 <= value <= 500000nearest?integerRange
1 <= value <= 1000max_distance?numberMeters; with nearest.
Range
1 <= value <= 500000limit?integerRange
1 <= value <= 1000Default
100cursor?stringA 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 POST 'https://api.data.graphitelab.ai/v1/custom/layers/dead_zones/locations/search' \ -H 'Content-Type: application/json' \ -d '{}'Example Response
{ "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 ] } } ], "next_cursor": null}