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

NameTypeRequiredMaxDescription
latnumberYes-Latitude coordinate of the center point to search around.
lngnumberYes-Longitude coordinate of the center point to search around.
radiusnumberNo-Optional search radius in meters. Must be between 1 and 30000. Default is 1000.
tagstringNo-Optional tag to filter POIs by type (e.g., 'restaurant', 'hotel', 'tourism:*').
languagestringNo-Optional preferred language for the results, example: 'en', 'fr', 'es'.

Response

NameTypeDescription
dataarrayArray of nearby POIs
data[].placeIdstringUnique identifier for the place
data[].shortNamestringShort name of the place
data[].namestringFull formatted name/address of the place
data[].latnumberLatitude coordinate of the place
data[].lngnumberLongitude coordinate of the place
data[].countrystringCountry where the place is located
data[].countryCodestringTwo-letter country code (ISO 3166-1 alpha-2)
data[].citystringCity where the place is located
data[].statestringState or region where the place is located
data[].tagsstring[]Array of tags/categories describing the place
metadataobjectMetadata about the request
metadata.costnumberCost of the request
metadata.countnumberNumber of results returned

Errors

{
   "error": "string",
   "code": "string"
}
HTTP StatusError CodeMessage
400INVALID_PAYLOADThe lat parameter is required
400INVALID_PAYLOADThe lat parameter must be a number
400INVALID_PAYLOADThe lng parameter is required
400INVALID_PAYLOADThe lng parameter must be a number
400INVALID_PAYLOADThe radius parameter must be a number
400INVALID_PAYLOADThe radius must be between 1 and 30000 meters
400INVALID_PAYLOADThe tag parameter must be a string
400INVALID_PAYLOADThe language parameter must be a string
400REQUEST_ERRORThe request failed
400INSUFFICIENT_BALANCEThe user has insufficient balance
401UNAUTHORIZEDThe token is invalid.
429TOO_MANY_REQUESTSThe request limit has been reached.