Filtering
Points of interest (POIs) are real-world locations: a restaurant, a depot, a charging station, a customer's address. When you list them with GET /v1/pois, you can combine any of the filters below. Filters work together with pagination.
Attributes
Attributes are typed custom fields you define for your team, such as an owner_id string, a rating number or an open boolean. Use them to store extra data on each POI, or to keep the locations of each of your clients apart. See the attribute resource to manage them.
Filter POIs by attributes
Pass each filter as attributes[<name or id>]=<value>. You can use the attribute's name or its ID, and combine several attributes: a POI must match all of them.
Values are compared by the attribute's type. Numbers match numerically, so 4.5 and 4.50 are equal. Booleans accept true, false, 1, 0, yes and no. An unknown attribute or a value of the wrong type returns a 422.
- Name
attributes[<name>]- Type
- string
- Description
The value the attribute with this name must have.
- Name
attributes[<id>]- Type
- string
- Description
The value the attribute with this ID must have.
Filter by attributes
# By attribute name
curl -G https://api.lanewise.app/v1/pois \
-H "X-API-KEY: {YOUR_API_KEY}" \
--data-urlencode "attributes[owner_id]=123"
# By attribute ID, combined with a boolean
curl -G https://api.lanewise.app/v1/pois \
-H "X-API-KEY: {YOUR_API_KEY}" \
--data-urlencode "attributes[01J9ZC0Q3K4ZY2PZSWRBFX6KWP]=123" \
--data-urlencode "attributes[open]=true"
Response
{
"data": [
{
"id": "01J9ZC4Y4B5Q8QD42ZS3ZEV751",
"name": "Mercat de la Boqueria",
"attributes": {
"owner_id": "123",
"open": true
},
// ...
}
],
"next": null
}
Categories
Categories group POIs by type: restaurants, parks, depots. A POI has at most one category. They are optional, but they make it easy to organize and filter your POIs. See the category resource to manage them.
Filter POIs by category
Filter by the category's ID or by its exact name. Use one or the other, not both.
- Name
category_id- Type
- string
- Description
The ID of the category.
- Name
category_name- Type
- string
- Description
The exact name of the category.
Filter by category
# By category ID
curl -G https://api.lanewise.app/v1/pois \
-H "X-API-KEY: {YOUR_API_KEY}" \
-d category_id=01J9ZC2M8TGDMQEWN2AY9CCP5V
# By category name
curl -G https://api.lanewise.app/v1/pois \
-H "X-API-KEY: {YOUR_API_KEY}" \
-d category_name=restaurant
Response
{
"data": [
{
"id": "01J9ZC4Y4B5Q8QD42ZS3ZEV751",
"name": "Mercat de la Boqueria",
"category": {
"id": "01J9ZC2M8TGDMQEWN2AY9CCP5V",
"name": "restaurant",
"created_at": "2026-09-27T09:10:02.000000Z",
"updated_at": "2026-09-27T09:10:02.000000Z"
},
// ...
}
],
"next": null
}
Geolocation
When you create or move a POI, Lanewise reverse-geocodes its coordinates in the background with OpenStreetMap data. It fills the POI's address with the street, the full display name, and the city, country and zip code, usually within a few seconds. address.geocoded_at tells you when that happened.
You can then filter POIs by distance from a point, or by country, city and zip code. The geolocation resource lists the countries, cities and zip codes your POIs are in, with the IDs to use here.
Filter POIs by distance
Send a point with latitude and longitude to get the POIs within distance meters of it. Each result then includes its distance from the point, in meters.
- Name
latitude- Type
- float
- Description
Latitude of the point, between -90 and 90. Required with
longitudeordistance.
- Name
longitude- Type
- float
- Description
Longitude of the point, between -180 and 180. Required with
latitudeordistance.
- Name
distance- Type
- integer
- Description
Search radius in meters, between 1 and 100,000. Defaults to 1,000.
Filter by distance
curl -G https://api.lanewise.app/v1/pois \
-H "X-API-KEY: {YOUR_API_KEY}" \
-d latitude=41.3825 \
-d longitude=2.1722 \
-d distance=500
Response
{
"data": [
{
"id": "01J9ZC4Y4B5Q8QD42ZS3ZEV751",
"name": "Mercat de la Boqueria",
"latitude": 41.3818,
"longitude": 2.1716,
"distance": 92.35,
// ...
}
],
"next": null
}
Filter POIs by country, city or zip code
Use the IDs returned by the geolocation endpoints. POIs that are not geocoded yet do not match these filters.
- Name
country_id- Type
- string
- Description
The ID of the country.
- Name
city_id- Type
- string
- Description
The ID of the city.
- Name
zipcode_id- Type
- string
- Description
The ID of the zip code.
Filter by location
# By country
curl -G https://api.lanewise.app/v1/pois \
-H "X-API-KEY: {YOUR_API_KEY}" \
-d country_id=9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d
# By city
curl -G https://api.lanewise.app/v1/pois \
-H "X-API-KEY: {YOUR_API_KEY}" \
-d city_id=1b9d6bcd-bbfd-4b2d-9b5d-ab8dfbbd4bed
Response
{
"data": [
{
"id": "01J9ZC4Y4B5Q8QD42ZS3ZEV751",
"name": "Mercat de la Boqueria",
"address": {
"display_name": "Mercat de la Boqueria, La Rambla, Barcelona, 08002, Spain",
"street": "La Rambla",
"city": { "id": "1b9d6bcd-bbfd-4b2d-9b5d-ab8dfbbd4bed", "name": "Barcelona" },
"country": { "id": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d", "name": "Spain" },
"zipcode": { "id": "6ec0bd7f-11c0-43da-975e-2a8ad9ebae0b", "code": "08002" },
"geocoded_at": "2026-09-27T09:12:46.000000Z"
},
// ...
}
],
"next": null
}