Skip to main content
POST
/
api
/
twogis
/
places
/
suggest
/twogis/places/suggest
curl --request POST \
  --url https://api.anysite.io/api/twogis/places/suggest \
  --header 'Content-Type: application/json' \
  --header 'access-token: <api-key>' \
  --data '
{
  "query": "<string>",
  "count": 2,
  "timeout": 300,
  "region_id": "32",
  "point": "37.62,55.75"
}
'
[
  {
    "type": "<string>",
    "@type": "@twogis_suggestion",
    "suggested_text": "<string>",
    "id": "<string>",
    "name": "<string>",
    "address": "<string>",
    "branch_count": 123
  }
]

Authorizations

access-token
string
header
required

API token from the dashboard

Headers

access-token
string
required

Body

application/json
query
string
required

Partial query to autocomplete

Minimum string length: 1
Example:

"кофе"

count
integer
required

Max number of suggestions

Required range: x >= 1
timeout
integer
default:300

Max scrapping execution timeout (in seconds)

Required range: 20 <= x <= 1500
region_id
string | null

2GIS region id to scope suggestions (e.g. 32 = Moscow)

Example:

"32"

point
string | null

Center point 'lon,lat' to bias suggestions

Example:

"37.62,55.75"

Response

Successful Response

type
string
required
@type
string
default:@twogis_suggestion
suggested_text
string | null
id
string | null
name
string | null
address
string | null
branch_count
integer | null