GET /geocode/search/2/json

Transform a physical address description to a location on the Earth's surface (spatial representation in numerical coordinates)

Query parameters

  • q string Required

    Query to search for

  • limit integer

    Limit results

    Minimum value is 0.

  • offset integer

    Get results starting with offset

    Minimum value is 0.

Responses

  • 200 application/json

    Results matching criteria

    Hide response attributes Show response attributes object
    • status string(string) Required

      Values are OK or error.

    • code integer Required
    • content object Required
      Hide content attributes Show content attributes object
      • total integer
      • points array[object]
        Hide points attributes Show points attributes object
        • id string Required
        • name string Required
        • address array[string]
        • lat number Required
        • lon number Required
        • type string
        • ISO2 string(ISO2) Required
  • 400 application/json

    Bad input parameter

    Hide response attributes Show response attributes object
    • status string(string) Required

      Value is error.

    • code integer Required
    • message string Required
  • 401 application/json

    Authorization failed

    Hide response attributes Show response attributes object
    • status string(string) Required

      Value is error.

    • code integer Required
    • message string Required
  • 503 application/json

    Service Temporarily Unavailable

    Hide response attributes Show response attributes object
    • status string(string) Required

      Value is error.

    • code integer Required
    • message string Required
GET /geocode/search/2/json
curl \
 --request GET 'https://api.geoapi.me/geocode/search/2/json?q=string' \
 --header "X-Api-Key: $API_KEY"
Response examples (200)
{
  "status": "OK",
  "code": 200,
  "content": {
    "total": 145,
    "points": [
      {
        "id": "riomgiocex",
        "name": "Salzburg",
        "address": [
          "Salzburg",
          "Salzkammergut-Berge",
          "Alps"
        ],
        "lat": 47.8265734834002,
        "lon": 13.0367495820614,
        "type": "rail",
        "ISO2": "AT"
      }
    ]
  }
}
Response examples (400)
{
  "code": 400,
  "status": "error",
  "message": "Latitude range error"
}
Response examples (401)
{
  "code": 401,
  "status": "error",
  "message": "Latitude range error"
}
Response examples (503)
{
  "code": 503,
  "status": "error",
  "message": "[Geo]: DB Driver loading failed"
}