Place Nearby
Find nearby points of interest (POIs) around a specific location. Returns detailed information about places near the specified coordinates with optional filtering by type and distance radius.
Endpoint
Get nearby points of interest (POIs) based on location coordinates
POSThttps://api.xtartapp.com/place/nearby
*Authentication
You must use a Bearer token provided by the dashboard to use for authentication. Add the token to the Authorization header.
Request body
Name | Type | Required | Max | Description |
---|---|---|---|---|
lat | number | Yes | - | Latitude coordinate of the center point to search around. |
lng | number | Yes | - | Longitude coordinate of the center point to search around. |
radius | number | No | - | Optional search radius in meters. Must be between 1 and 30000. Default is 1000. |
tag | string | No | - | Optional tag to filter POIs by type (e.g., 'restaurant', 'hotel', 'tourism:*'). |
language | string | No | - | Optional preferred language for the results, example: 'en', 'fr', 'es'. |
Response
Name | Type | Description |
---|---|---|
data | array | Array of nearby POIs |
data[].placeId | string | Unique identifier for the place |
data[].shortName | string | Short name of the place |
data[].name | string | Full formatted name/address of the place |
data[].lat | number | Latitude coordinate of the place |
data[].lng | number | Longitude coordinate of the place |
data[].country | string | Country where the place is located |
data[].countryCode | string | Two-letter country code (ISO 3166-1 alpha-2) |
data[].city | string | City where the place is located |
data[].state | string | State or region where the place is located |
data[].tags | string[] | Array of tags/categories describing the place |
metadata | object | Metadata about the request |
metadata.cost | number | Cost of the request |
metadata.count | number | Number of results returned |
Errors
{
"error": "string",
"code": "string"
}
HTTP Status | Error Code | Message |
---|---|---|
400 | INVALID_PAYLOAD | The lat parameter is required |
400 | INVALID_PAYLOAD | The lat parameter must be a number |
400 | INVALID_PAYLOAD | The lng parameter is required |
400 | INVALID_PAYLOAD | The lng parameter must be a number |
400 | INVALID_PAYLOAD | The radius parameter must be a number |
400 | INVALID_PAYLOAD | The radius must be between 1 and 30000 meters |
400 | INVALID_PAYLOAD | The tag parameter must be a string |
400 | INVALID_PAYLOAD | The language parameter must be a string |
400 | REQUEST_ERROR | The request failed |
400 | INSUFFICIENT_BALANCE | The user has insufficient balance |
401 | UNAUTHORIZED | The token is invalid. |
429 | TOO_MANY_REQUESTS | The request limit has been reached. |