MapScale Docs
•••
API ReferenceGeocoding
MapScale API
GET/v1/geocode

Geocode a place or address query

Turn a complete place name or address into matching GeoJSON features and coordinates.

LIVE API PLAYGROUND

Sign in or create an account

Continue to run live requests directly from the docs.

Sends this request to the live API and shows the real response.

Parameters

Equivalent request
curl \
  -H "X-MapScale-Key: $MAPSCALE_API_KEY" \
  "https://api.mapscale.io/v1/geocode?q=Siam+Paragon&lang=th&limit=5"
Response
Default response
{
  "type": "FeatureCollection",
  "features": [
    {
      "type": "Feature",
      "id": "place_bangkok_123",
      "text": "Siam Paragon",
      "place_name": "Siam Paragon, Pathum Wan, Bangkok",
      "geometry": {
        "type": "Point",
        "coordinates": [
          100.5348,
          13.7466
        ]
      },
      "properties": {
        "latitude": 13.7466,
        "longitude": 100.5348,
        "formattedAddress": "Siam Paragon, Pathum Wan, Bangkok 10330, Thailand",
        "street": "Rama I Road",
        "neighborhood": "Siam",
        "subdistrict": "Pathum Wan",
        "district": "Pathum Wan",
        "province": "Bangkok",
        "postalCode": "10330",
        "country": "Thailand"
      }
    }
  ]
}

Responses

200Geocode resultsapplication/json
400Invalid requestapplication/json
401mapscale/effect-api/UnauthorizedFailureapplication/json
403mapscale/effect-api/ForbiddenFailureapplication/json
404Not foundapplication/json
429mapscale/effect-api/RateLimitedFailureapplication/json
500mapscale/effect-api/MiddlewareInternalFailureapplication/json
502Upstream geocoding engine failureapplication/json
503Upstream geocoding engine unavailable | mapscale/effect-api/UpstreamUnavailableFailureapplication/json

On this page