---
title: "Suggests geocodes for a given query string"
method: GET
path: "/geocode/suggest"
tags: ["Suggest", "Geocode"]
---

# Suggests geocodes for a given query string

`GET /geocode/suggest`

## Request

- Base URL: `http://localhost:8080`
- URL: `http://localhost:8080/geocode/suggest`
- Auth: none declared

## Query parameters

- `q` string, required
- `limitToResolution` string

## Response `200`

OK

- Location[]: A list of geo locations
  - `query` string
  - `country` string: ISO-3166-2 code of a country
  - `administrativeAreaLevel1` string
  - `administrativeAreaLevel2` string
  - `administrativeAreaLevel3` string
  - `place` string
  - `name` string
  - `geoResolution` string
  - `geometry` Position
    - `latitude` number, required
    - `longitude` number, required

## Other responses

- `422`: Unprocessable entity
- `500`: Internal server error

## Changes

- **2021-05-17** `ca9a67c30e72`: 2 breaking
  - the `items/country` response property's maxLength was unset from `2` for the response status `200`
  - the `items/country` response property's minLength was decreased from `2` to `0` for the response status `200`

[Operation history](https://skmtc.dev/globaldothealth/apis/global-health-geolocation-service/changes/geocode/suggest/get.md)

---

[API](https://skmtc.dev/globaldothealth/apis/global-health-geolocation-service.md) - [All operations](https://skmtc.dev/globaldothealth/apis/global-health-geolocation-service/llms.txt) - [OpenAPI document](https://skmtc.dev/globaldothealth/apis/global-health-geolocation-service/revisions/97f3a25df026?raw)
