Skip to content

Geocode

Convert an address string to geographic coordinates.

POST /api/v1/{customer_uuid}/geocode/

Request Body

Field Type Required Description
address string Yes The address to geocode
country string No ISO 3166-1 alpha-3 country code (e.g., USA, CHL)
language string No BCP47 language code (e.g., en-US, es-CL)
limit integer No Max results (1-20, default 5)

Example Request

curl -X POST https://geocoder.amigocloud.com/api/v1/{uuid}/geocode/ \
  -H "X-API-Key: your-key" \
  -H "Content-Type: application/json" \
  -d '{
    "address": "Costanera Center, Santiago",
    "country": "CHL",
    "language": "es-CL",
    "limit": 3
  }'

Example Response

{
  "results": [
    {
      "label": "Costanera Center, Av. Andrés Bello 2425, Providencia, Región Metropolitana, Chile",
      "position": { "lat": -33.4175, "lng": -70.6065 },
      "address": {
        "house_number": "2425",
        "street": "Av. Andrés Bello",
        "neighborhood": "Providencia",
        "city": "Santiago",
        "county": null,
        "state": "Región Metropolitana",
        "state_code": "RM",
        "postal_code": null,
        "country": "Chile",
        "country_code": "CHL"
      },
      "result_type": "poi",
      "provider_id": "locationiq:way:123456789",
      "relevance": 0.85,
      "distance": null,
      "bounding_box": [-33.418, -33.416, -70.608, -70.605]
    }
  ],
  "provider": "locationiq",
  "cached": false
}

Caching

Results are cached for 5 minutes. Cached responses include "cached": true.