Geopoint Address
Get detailed address information based on geographic coordinates (latitude and longitude). This reverse geocoding API converts coordinates to a formatted address.
Endpoint
Get address information for a specific geographic point
POSThttps://api.xtartapp.com/place/reverse
*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 | - | The latitude coordinate of the location |
| lng | number | Yes | - | The longitude coordinate of the location |
| language | string | No | - | Optional preferred language for the results, example: 'en', 'fr', 'es' |
Response
| Name | Type | Description |
|---|---|---|
| data | object | Address information for the requested coordinates |
| data.placeId | string | Unique identifier for the place (OSM ID) |
| data.shortName | string | Short name of the location |
| data.name | string | Full formatted address of the location |
| data.lat | number | Latitude coordinate of the location |
| data.lng | number | Longitude coordinate of the location |
| data.country | string | Country where the location is situated |
| data.countryCode | string | Two-letter country code (ISO 3166-1 alpha-2) |
| data.city | string | City of the location |
| data.state | string | State or province of the location |
| data.tags | string[] | Array of tags categorizing the location type |
| metadata | object | Metadata about the request |
| metadata.cost | number | Cost of the request |
| metadata.count | number | Number of results returned (1 or 0) |
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 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. |