API documentation
An HTTP API for standardizing addresses in Kazakhstan. It takes a free-form address in Russian or Kazakh — with typos, abbreviations and extra words — and returns the “region → city → street → building” hierarchy with KATO, RCO and RCA codes, postal codes and coordinates from the state address register.
- Base URL
https://api.qaida.io- Authentication
X-Api-Key: <your key>- Format
- JSON, UTF-8
What you can get
Everything the API returns, in one table. Items marked “soon” are in development and documented ahead of time. Fields marked “extra access” are opened on request; without it the value comes as the string "*****".
| Data | Field | How to get it |
|---|---|---|
| Address | ||
| The address as one line in Russian and Kazakh | full_path_rus, full_path_kaz | /parse |
| Region, district, city, rural district, village, street, building — each level separately | hierarchy | /parse |
| KATO code of the administrative unit | cato | /parse |
| RCO of the street and the administrative unit | rco | /parse |
| RCA of the building | rca | /parse |
| New postcode | postcode | /parse |
| Old postcode | oldPostcode | /parse |
| extra access Cadastral number of the building | cadastre_number | /parse |
| extra access Cadastral number of the land plot the building stands on | land_cadastre_number | /parse |
| Building coordinates | point | /parse |
| Apartment or office from the input | match.requested_unit | /parse |
| Match quality | ||
| Whether the apartment or office from the input is in the Address Register | match.unit_status | /parse, see Apartment and office |
| How deep the address was found | match.level | /parse |
| Match type: exact, alternative spelling, corrected, ambiguous, partial | match.type | /parse |
| Corrections: typos, house number substitution, former city name | match.corrections | /parse |
| What from the input was not found | match.unmatched | /parse |
| The city in the input contradicts the given one | scope_conflict | scope parameter |
| Ways to search | ||
| Suggestions as the user types | suggestions | /suggest, /suggest/compact |
| Apartments of a house in suggestions | kind: "apartment" | units=true on /suggest and /suggest/compact |
| A street without a city: houses across the country | search | /parse and /suggest by default — the extended parameter; /parse/extended, /suggest/extended |
| Search only inside a region or city | scope | scope parameter, /parse/region, /parse/city |
| Up to 100 addresses in one request | items | /parse/batch |
| Address by new or old postcode, or by RCA | results | /lookup |
| Buildings near a point and the distance to them | distance_m, shared_point | /nearby |
| Extra data | ||
| soon Region boundary | geometry | include=region_polygon |
| soon City or village boundary | geometry | include=city_polygon |
| soon Building footprint | geometry | include=building_polygon |
| extra access Housing sale price per m² | market.sale_m2 | include=prices |
| extra access Housing rent price per m² | market.rent_m2 | include=prices |
| Year built | year_built | include=building_info |
| extra access Floor count | floors | include=building_info |
| Residential complex name | complex_name | include=building_info |
| extra access Number of flats in the building | flats_count | include=building_info |
| extra access Number of non-residential premises in the building | non_residential_count | include=building_info |
| Apartment or office from the input, per the Address Register: kind and number | type: "apartment" node in hierarchy | include=apartment |
| extra access RCA of the apartment or office | rca in the unit node | include=apartment |
| Drop unneeded fields: RCA, KATO, postcodes and more | — | exclude=rca,cato |
Quick start
One request, one address. The key goes in a header and the address in the q parameter. Cyrillic in a query string must be URL-encoded: curl has --data-urlencode for that, and HTTP libraries do it when you pass parameters as a separate dictionary.
curl -G https://api.qaida.io/parse \
-H "X-Api-Key: $QAIDA_API_KEY" \
--data-urlencode "q=астана кабанбай батыра 11/5" \
-d top_k=1The response lists candidates, best first. Each one has the node hierarchy, a ready-made address line in both languages, a coordinate and an assessment of how closely the input matched. The full response to this request is under GET /parse.
OpenAPI 3.1 description, for importing into Postman and generating clients: qaida.io/openapi.json.
API key
- Keys are issued in the cabinet after you sign up.
- Send the key in the
X-Api-Keyheader on every request except/demo/*. It is 48 characters: digits and lowercase Latin letters a–f. Send exactly one such header; keys in URL parameters are not accepted. - The
/demo/parse,/demo/suggest,/demo/lookup,/demo/nearbyendpoints and the/demo/parse/extended,/demo/suggest/extendedvariants serve the sandbox on qaida.io. They need no key, are limited per IP and are not meant for integration. They have noinclude,excludeorunitsparameters. The response is reduced: KATO, RCO and postcodes are returned, while the RCA and cadastre numbers come as the string"*****"; there are no internal identifiers./demo/parseshows an apartment or office from the input the same way asinclude=apartment— as the last hierarchy node, with its RCA masked; demo suggestions have no apartments. - A missing, malformed or revoked key returns
401. - Rotate or revoke your main key in the cabinet profile. Additional keys are issued and revoked on request at qaida@tenzor-ai.com. A revoked key stops working within a minute.
POST /parse/batchrequires separate batch access. Without it the request gets403. Ask for it at the same address.
Request and response format
- GET parameters go in the query string, UTF-8 and URL-encoded. A POST body is JSON with
Content-Type: application/json. - Responses are UTF-8 JSON and are not cached:
Cache-Control: no-store. - An address string is 1 to 200 characters.
pointis a[lon, lat]pair: longitude first, as in GeoJSON. Without a coordinate it is[null, null].- Coordinates are stored to about one metre. Digits beyond the fifth decimal place are storage noise, not extra precision.
- An empty
resultsorsuggestionslist is a normal200response meaning the address was not found. It is not an error.
Register codes in responses
| Code | Field | Shape | Meaning |
|---|---|---|---|
| KATO | cato | 9 digits, 750000000 | Classifier of administrative-territorial units: region, city, district, village |
| RCO | rco | 13 digits | Address-register object code: an administrative unit or a street |
| RCA | rca | 15 digits | Address-register code of a building |
| Unit RCA | rca in the unit node | 16 digits | Address-register code of an apartment or office, with extra access. See Apartment and office |
| New postcode | postcode | Z05T9X8 | Building postcode: letter, two digits, letter, digit, letter, digit |
| Old postcode | oldPostcode | "010000" | Six-digit post-office code. Sent as a string so the leading zero is kept |
KATO, RCO and RCA are JSON numbers. All of them are below 2^53 and safe to read in JavaScript, but store them as strings or 64-bit integers.
Limits
Request rates are limited per account, not per IP address: all your servers and all users of your service share one allowance. Parsing (/parse, /parse/extended, the level endpoints, /lookup, /nearby), suggestions (every /suggest) and batch processing are counted separately.
When the allowance runs out, the server returns 429 with a Retry-After header saying how many seconds to wait. The allowance refills gradually, so short bursts get through while a sustained stream above the limit does not.
- One
/parse/batchrequest holds at most 100 addresses. - A request body is at most 256 KB.
- Under overload the server answers
503withRetry-After: 1right away instead of queueing the request. Service status is on the Status page. - For your account’s limits or an increase, write to qaida@tenzor-ai.com.
Errors
An error body is an object with a detail field, usually a string. For invalid query parameters detail is a list, where each item names the field (loc) and the reason (msg).
{
"detail": [
{
"type": "less_than_equal",
"loc": ["query", "top_k"],
"msg": "Input should be less than or equal to 10"
}
]
}| Code | When | detail | What to do |
|---|---|---|---|
| 401 | No key, malformed key, revoked key | Missing or invalid API key | Check the X-Api-Key header |
| 403 | /parse/batch without batch access | Batch access is not enabled for this account | Request access |
| 404 | /lookup: the code is not in the register or the building has no street | код не найден в реестре, код есть в реестре, но дом не привязан к улице | Do not retry |
| 408 | The POST body did not arrive within 5 seconds | Request body timeout | Check the connection |
| 413 | The request body is over 256 KB | Request body too large | Split the batch |
| 422 | A parameter is out of range or a required one is missing | A list of errors, see the example above | Fix the request |
| 422 | scope was not recognized or is the wrong level | неизвестная область поиска, «…» — это …; ручка принимает … | See The scope parameter |
| 422 | /lookup: the string does not look like a code | строка не похожа ни на почтовый индекс, ни на РКА | Fix the request |
| 422 | More than 100 addresses in a batch | batch too large: max 100 addresses | Split the batch |
| 429 | The limit is exhausted | Rate limit exceeded | Wait Retry-After seconds |
| 503 | The server is overloaded or key checks are temporarily unavailable | Server busy, retry shortly, Authentication temporarily unavailable | Retry after Retry-After |
Only 429 and 503 are worth retrying. Every other code comes back unchanged on a retry. Some detail messages are in Russian, as shown.
/parse
API keyFull standardization of one address: hierarchy, codes, postcodes and coordinate. Returns up to top_k candidates, best first.
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
qrequired | string | — | Free-form address, 1–200 characters |
top_k | integer | 3 | How many candidates to return, 1–10 |
scope | string | — | Search only inside one administrative unit: name, KATO code or UID. See The scope parameter |
extended | boolean | true | Search the street across the whole country when the regular parse gives no confirmed address. false — the regular parse only. Has no effect together with scope. See The extended parameter |
units | boolean | true | false — do not check the apartment or office against the Address Register: match has no unit_status, a number after the house number is not read as an apartment, and include=apartment adds no unit. The number from the input stays in match.requested_unit. See Apartment and office |
include | string | — | Extra data, comma-separated: prices, building details, the apartment or office from the input; geometry currently returns null. See The include parameter |
exclude | string | — | Fields you do not need, comma-separated: rca, cato, postcodes and more. See The exclude parameter |
Request
curl -G https://api.qaida.io/parse \
-H "X-Api-Key: $QAIDA_API_KEY" \
--data-urlencode "q=астана кабанбай батыра 11/5" \
-d top_k=1Response
| Field | Type | Description |
|---|---|---|
query | string | The query string as sent |
results | array | Candidates, best first; an empty list when nothing is found. See Result object |
scope | object | null | How the service understood scope; null when it was not sent |
scope_conflict | boolean | null | true when the query names a city outside scope; null without the parameter |
search | object | null | How the country-wide search took part in the answer; null when the answer is a regular parse. See The extended parameter |
{
"query": "астана кабанбай батыра 11/5",
"results": [
{
"hierarchy": [
{
"type": "ats",
"kind": "country",
"name_kz": "Қазақстан",
"name_ru": "Казахстан",
"type_kz": "Республикасы",
"type_ru": "Республика",
"rco": null,
"cato": null
},
{
"type": "ats",
"kind": "city",
"name_kz": "Астана",
"name_ru": "Астана",
"type_kz": "Республикалық маңызы бар қаласы",
"type_ru": "Город республиканского значения",
"rco": 3000000008716,
"cato": 710000000
},
{
"type": "ats",
"kind": "region",
"name_kz": "Астана",
"name_ru": "Астана",
"type_kz": "Республикалық маңызы бар қаласы",
"type_ru": "Город республиканского значения",
"rco": 3000000008716,
"cato": 710000000
},
{
"type": "geo",
"kind": "street",
"name_kz": "Қабанбай Батыр",
"name_ru": "Қабанбай Батыр",
"type_kz": "Даңғылы",
"type_ru": "Проспект",
"rco": 4000000237184,
"cato": null
},
{
"type": "building",
"kind": "main",
"number": "11/5",
"rca": 202100297954282,
"type_kz": "Ғимарат",
"type_ru": "Здание",
"cadastre_number": null,
"postcode": "Z05T9X8",
"oldPostcode": "010000"
}
],
"full_path_rus": "Республика Казахстан, город республиканского значения Астана, проспект Қабанбай Батыр, здание 11/5",
"full_path_kaz": "Қазақстан республикасы, Астана республикалық маңызы бар қаласы, Қабанбай Батыр даңғылы, 11/5 ғимарат",
"point": [71.41329956054688, 51.14006042480469],
"match": {
"level": "house",
"type": "alias",
"ambiguous": false,
"unmatched": [],
"corrections": []
}
}
],
"scope": null,
"scope_conflict": null,
"search": null
}When only part of the address is found
- No such house number. The result stops at the street:
match.type = "partial", andunmatchedlists the missing number. The service never substitutes the nearest number. - The number is written differently in the register. When “102” exists only as “102/41”, or “12/6” as “building 12, block 6”, the service substitutes the register record:
match.type = "corrected"with akind: "house"pair incorrections. A neighbouring number is never substituted. - Part of the line was not read. An extra number after the house, “блок 4”, an entrance without a comma: the answer may reach the building, but
match.type = "partial"and the leftover is inunmatched. - A street without a locality. “абая 10” fits hundreds of streets across the country. By default the service searches for such a street country-wide and returns houses from different cities, but the city in that answer is its own choice. So
match.type = "partial"even thoughunmatchedis empty, and thesearchblock shows how the string was read. To get a confirmed address, add the city to the string or pass it inscope. Withextended=falsethere is no country-wide search andresultsis empty. See The extended parameter. - An apartment or office. For “туран 46а кв 12” the answer stops at the building: the address line and
pointbelong to the house. The number from the input comes inmatch.requested_unit, andmatch.unit_statustells whether the house has such a unit in the Address Register. The unit itself — kind, number and RCA — is added byinclude=apartment, see Apartment and office. - A number right after the house number. “туран 46а 12” without “кв”: if the register has no corpus 12 and no house 46А/12, but the house has apartment 12, the number is read as the apartment —
match.type = "corrected", andcorrectionshas a pair withkind: "unit". If the register has no such apartment, the answer is the house withmatch.type = "partial"and the number inunmatched.
{
"level": "street",
"type": "partial",
"ambiguous": false,
"unmatched": ["house:93"],
"corrections": []
}/parse/region and /parse/city
API keyThe same as /parse, but scope is required and matched only among units of its level. Use these when the region or city is a separate column in your data.
/parse/regionaccepts 20 top-level units: 17 regions and three cities of national significance — Almaty, Astana and Shymkent. No region sits above these cities, so they fill the “region” column themselves./parse/cityaccepts cities of national, regional and district significance.
Separate endpoints exist because a name alone is ambiguous. “Абай” is both a region and a city in the Karaganda Region. “Алматы” is both a city and the Kazakh name of the Almaty Region. /parse picks between them by a general rule, while a level endpoint only looks among its own units.
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
qrequired | string | — | Address, 1–200 characters. No need to repeat the region or city in it |
scoperequired | string | — | A region (for /region) or a city (for /city): name, KATO code or UID |
top_k | integer | 3 | How many candidates to return, 1–10 |
units | boolean | true | false — do not check the apartment or office against the Address Register: match has no unit_status, a number after the house number is not read as an apartment, and include=apartment adds no unit. The number from the input stays in match.requested_unit. See Apartment and office |
include | string | — | Extra data, comma-separated: prices, building details, the apartment or office from the input; geometry currently returns null. See The include parameter |
exclude | string | — | Fields you do not need, comma-separated: rca, cato, postcodes and more. See The exclude parameter |
Request
curl -G https://api.qaida.io/parse/region \
-H "X-Api-Key: $QAIDA_API_KEY" \
--data-urlencode "q=каргалы алатау 77" \
--data-urlencode "scope=алматинская" \
-d top_k=1{
"query": "каргалы алатау 77",
"results": [
{
"hierarchy": [ … ],
"full_path_rus": "Республика Казахстан, область Алматинская, район Жамбылский, сельский округ Каргалинский, село Каргалы, улица Алатау, дом 77",
"full_path_kaz": "Қазақстан республикасы, Алматы облысы, Жамбыл ауданы, Қарғалы ауылдық округі, Қарғалы ауылы, Алатау көшесі, 77 үй",
"point": [76.41905212402344, 43.165287017822266],
"match": {
"level": "house",
"type": "exact",
"ambiguous": false,
"unmatched": [],
"corrections": []
}
}
],
"scope": {
"uid": 4,
"kato": 190000000,
"name_ru": "Алматинская",
"name_kz": "Алматы",
"type_ru": "Область",
"type_kz": "Облысы",
"matched_by": "name"
},
"scope_conflict": false,
"search": null
}The response format is the same as for /parse. The type of the unit the service used is in scope.type_ru. These endpoints have no extended parameter: the country-wide search never runs, and search in the response is always null.
A value of the wrong level
If the value exists but belongs to another level, the 422 response says what it actually is. Usually that means columns were swapped in the source data.
{
"detail": "«Алматинская» — это область; ручка принимает город республиканского, областного или районного значения (91 единица)"
}{
"detail": "«Каргалы» — это село; ручка принимает область или город республиканского значения (20 единиц верхнего уровня)"
}/parse/region the Kazakh “Алматы” resolves to the city of Almaty, because the city and the Almaty Region share the Kazakh name. For the region pass the Russian “Алматинская” or KATO 190000000./parse/extended
API keyA parse where a street without a locality is always searched across the whole country. “достык 8” returns house 8 on Dostyk streets of different cities — each with its full hierarchy, best first.
This is not the same as the extended parameter of /parse. /parse first parses the string the regular way and searches country-wide only when that gives no confirmed address; a house in a city chosen by the service comes from it with match.type = "partial". Here the country-wide search always reads the string, with no regular parse first, and the answer type is not lowered: the same house may come as exact or ambiguous.
The search block explains how the string was read. If a city, district or region is named in the string, the search stays inside it (“алматы жандосова 2” → Almaty). The scope parameter outranks the string, as everywhere: with it this is a regular parse within the unit, and search.mode is context.
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
qrequired | string | — | Address, 1–200 characters. The locality may be omitted |
top_k | integer | 3 | How many candidates to return, 1–10. Without a city it makes sense to ask for more: candidates from different cities are equals |
scope | string | — | Search only inside one administrative unit, as in /parse. See The scope parameter |
units | boolean | true | false — do not check the apartment or office against the Address Register: match has no unit_status, a number after the house number is not read as an apartment, and include=apartment adds no unit. The number from the input stays in match.requested_unit. See Apartment and office |
include | string | — | Extra data, comma-separated. See The include parameter |
exclude | string | — | Fields you do not need, comma-separated. See The exclude parameter |
Request
curl -G https://api.qaida.io/parse/extended \
-H "X-Api-Key: $QAIDA_API_KEY" \
--data-urlencode "q=достык 8" \
-d top_k=3Response
The format is the same as for /parse, but the search block is present in every response and has no role, superseded or engine_type fields. When several addresses fit equally well, their match.type is "ambiguous".
| Field | Type | Description |
|---|---|---|
search.mode | string | streets — the street was searched across the country; scope — inside the unit named in the string; unit — the unit has no street with these words, the answer is the unit itself; units — unit suggestions; context — the scope parameter was passed, a regular parse |
search.streets, search.localities | integer | null | How many streets matched by name and in how many localities they are |
search.complete | boolean | false — some candidates were not checked because of a limit, the list may be incomplete |
search.dropped | string[] | Words of the string that did not make it into the street name of the answer: in no name at all, or dropped when relaxing |
search.place | string | null | The city, district or region named in the string |
search.hypothesis | string | null | The winning reading: H0 — a street across the country, H1 — without one word, S0…S2 — inside the named unit, U — the unit itself |
results[].match.locality_relation | string | Only when a place is named: same — the candidate is in it, descendant — in a part of it, none — outside it |
{
"query": "достык 8",
"results": [
{
"hierarchy": [ … ],
"full_path_rus": "Республика Казахстан, город республиканского значения Астана, улица Достық, дом 8",
"full_path_kaz": "Қазақстан республикасы, Астана республикалық маңызы бар қаласы, Достық көшесі, 8 үй",
"point": [71.42141723632812, 51.12685012817383],
"match": {
"level": "house",
"type": "ambiguous",
"ambiguous": true,
"unmatched": [],
"corrections": []
}
},
{
"hierarchy": [ … ],
"full_path_rus": "Республика Казахстан, город республиканского значения Шымкент, жилой массив Достык, улица Достык, дом 8",
"full_path_kaz": "Қазақстан республикасы, Шымкент республикалық маңызы бар қаласы, Достық тұрғын үй алабы, Достық көшесі, 8 үй",
"point": [69.73550415039062, 42.36028289794922],
"match": {
"level": "house",
"type": "ambiguous",
"ambiguous": true,
"unmatched": [],
"corrections": []
}
},
{
"hierarchy": [ … ],
"full_path_rus": "Республика Казахстан, город республиканского значения Алматы, микрорайон Шугыла, микрорайон Достық, дом 8",
"full_path_kaz": "Қазақстан республикасы, Алматы республикалық маңызы бар қаласы, Шұғыла шағын ауданы, Достық шағын ауданы, 8 үй",
"point": [76.83915710449219, 43.27186965942383],
"match": {
"level": "house",
"type": "ambiguous",
"ambiguous": true,
"unmatched": [],
"corrections": []
}
}
],
"scope": null,
"scope_conflict": null,
"search": {
"mode": "streets",
"streets": 929,
"localities": 853,
"complete": true,
"dropped": [],
"place": null,
"hypothesis": "H0"
}
}A city in the string
The named unit keeps the search inside itself, while scope in the response stays null: the parameter was not passed. A fallback reading, where the city words turned out to be part of a street name, may come below the main one with locality_relation: "none".
{
"query": "алматы жандосова 2",
"results": [
{
"hierarchy": [ … ],
"full_path_rus": "Республика Казахстан, город республиканского значения Алматы, улица Жандосова, дом 2",
"full_path_kaz": "Қазақстан республикасы, Алматы республикалық маңызы бар қаласы, Жандосов көшесі, 2 үй",
"point": [76.9127426147461, 43.23651123046875],
"match": {
"level": "house",
"type": "ambiguous",
"ambiguous": true,
"unmatched": [],
"corrections": [],
"locality_relation": "same"
}
},
{
"hierarchy": [ … ],
"full_path_rus": "Республика Казахстан, город республиканского значения Алматы, микрорайон Таусамалы, улица С Жандосов, дом 2",
"full_path_kaz": "Қазақстан республикасы, Алматы республикалық маңызы бар қаласы, Таусамалы шағын ауданы, С Жандосов көшесі, 2 үй",
"point": [76.81779479980469, 43.183414459228516],
"match": {
"level": "house",
"type": "ambiguous",
"ambiguous": true,
"unmatched": [],
"corrections": [],
"locality_relation": "same"
}
}
],
"scope": null,
"scope_conflict": null,
"search": {
"mode": "scope",
"streets": 6,
"localities": 1,
"complete": true,
"dropped": [],
"place": "Алматы",
"hypothesis": "S0"
}
}When there is no street
When the string holds only a locality, or the locality has no street with these words, the answer is the unit itself: search.mode = "unit" and match.level is its level.
{
"query": "талдыкорган",
"results": [
{
"hierarchy": [ … ],
"full_path_rus": "Республика Казахстан, область Жетісу, город областного значения Талдыкорган",
"full_path_kaz": "Қазақстан республикасы, Жетісу облысы, Талдықорған облыстық маңызы бар қаласы",
"point": [null, null],
"match": {
"level": "city",
"type": "exact",
"ambiguous": false,
"unmatched": [],
"corrections": [],
"locality_relation": "same"
}
}
],
"scope": null,
"scope_conflict": null,
"search": {
"mode": "unit",
"streets": 0,
"localities": 0,
"complete": true,
"dropped": [],
"place": "Талдыкорган",
"hypothesis": "U"
}
}/parse/batch
Key + batch accessParse up to 100 addresses in one request. For exports and address-database cleanup.
/parse with extended=false: the country-wide search never runs and the response has no search block. So a string without a city gets a different answer: in a batch without scope, “достык 89б” is the village of Dostyk and “абая 135” is an empty results, while /parse by default returns a house in Almaty for both. To get matching answers, pass the city in scope or call /parse with extended=false.Request body
| Parameter | Type | Default | Description |
|---|---|---|---|
addressesrequired | string[] | — | 1 to 100 addresses, each 1–200 characters |
top_k | integer | 1 | Candidates per address, 1–10. Defaults to one, not three as in /parse |
scope | string | — | One administrative unit for every address in the batch |
units | boolean | true | As in /parse, for the whole batch. See Apartment and office |
include | string[] | — | Extra data as a list of strings, shared by the whole batch. See The include parameter |
exclude | string[] | — | Unneeded fields as a list of strings, shared by the whole batch. See The exclude parameter |
Request
curl https://api.qaida.io/parse/batch \
-H "X-Api-Key: $QAIDA_API_KEY" \
-H "Content-Type: application/json" \
-d '{"addresses": ["достык 89б", "астана кабанбай батыра 11/5"], "scope": "алматы"}'Response
| Field | Type | Description |
|---|---|---|
count | integer | Number of addresses |
items | array | One item per address, in order: address, results and scope_conflict |
scope | object | null | How scope was understood, shared by the batch |
{
"count": 2,
"items": [
{
"address": "достык 89б",
"results": [
{
"hierarchy": [ … ],
"full_path_rus": "Республика Казахстан, город республиканского значения Алматы, проспект Достык, дом 89Б",
"full_path_kaz": "Қазақстан республикасы, Алматы республикалық маңызы бар қаласы, Достық даңғылы, 89Б үй",
"point": [76.95661163330078, 43.238582611083984],
"match": {
"level": "house",
"type": "exact",
"ambiguous": false,
"unmatched": [],
"corrections": []
}
}
],
"scope_conflict": false
},
{
"address": "астана кабанбай батыра 11/5",
"results": [
{
"hierarchy": [ … ],
"full_path_rus": "Республика Казахстан, город республиканского значения Алматы, улица Кабанбай батыра",
"full_path_kaz": "Қазақстан республикасы, Алматы республикалық маңызы бар қаласы, КАБАНБАЙ БАТЫР көшесі",
"point": [null, null],
"match": {
"level": "street",
"type": "partial",
"ambiguous": false,
"unmatched": ["house:11/5"],
"corrections": []
}
}
],
"scope_conflict": true
}
],
"scope": {
"uid": 1,
"kato": 750000000,
"name_ru": "Алматы",
"name_kz": "Алматы",
"type_ru": "Город республиканского значения",
"type_kz": "Республикалық маңызы бар қаласы",
"matched_by": "name"
}
}The second address names another city, so its answer comes from Almaty — the unit in scope — and is flagged scope_conflict: true. The flag is set per address. An address that cannot be parsed gets an empty results, and the rest of the batch is processed as usual.
/suggest
API keySuggestions while an address is typed: localities, streets and houses that continue the input.
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
qrequired | string | — | The typed part of the address, 1–200 characters |
limit | integer | 10 | How many suggestions to return, 1–20 |
scope | string | — | Suggest only inside one administrative unit |
extended | boolean | true | Suggest streets and houses across the whole country when there are no regular suggestions or the first of them is neither a street nor a house. false — regular suggestions only. Has no effect together with scope. See The extended parameter |
units | boolean | false | true — suggest apartments of the house from the Address Register. See Apartments in suggestions |
Request
curl -G https://api.qaida.io/suggest \
-H "X-Api-Key: $QAIDA_API_KEY" \
--data-urlencode "q=алматы абылай х" \
-d limit=3{
"query": "алматы абылай х",
"suggestions": [
{
"kind": "street",
"uid": 156094,
"text_ru": "Республика Казахстан, город республиканского значения Алматы, проспект Абылай хана",
"text_kz": "Қазақстан республикасы, Алматы республикалық маңызы бар қаласы, Абылай хан даңғылы",
"point": [null, null]
},
{
"kind": "street",
"uid": 71334,
"text_ru": "Республика Казахстан, город республиканского значения Алматы, микрорайон Мадениет, улица Абылай хан",
"text_kz": "Қазақстан республикасы, Алматы республикалық маңызы бар қаласы, Мәдениет шағын ауданы, Абылай хан көшесі",
"point": [null, null]
},
{
"kind": "street",
"uid": 8725,
"text_ru": "Республика Казахстан, область Алматинская, район Карасайский, город районного значения Каскелен, улица Абылай Хан",
"text_kz": "Қазақстан республикасы, Алматы облысы, Қарасай ауданы, Қаскелең аудандық маңызы бар қаласы, Абылай Хан көшесі",
"point": [null, null]
}
],
"scope": null,
"search": null
}Besides the suggestions, the response carries the scope and search blocks. In the example the city is named in the input, the suggestions are regular, and search is null. When the input names no locality, streets and houses from across the country join the list, and search shows how: see The extended parameter.
Suggestion fields
| Field | Type | Description |
|---|---|---|
kind | string | What is suggested, see the table below |
uid | integer | null | Internal object identifier. null for kind = "address" and "apartment" |
text_ru, text_kz | string | The full address line in Russian and Kazakh |
point | [lon, lat] | House coordinate. Usually [null, null] for streets and localities |
| kind | What it is |
|---|---|
region | Region or city of national significance |
city | City |
district | District of a region or of a city |
area | Rural district, microdistrict, housing estate and other areas |
locality | Village or settlement |
street | Street, avenue, lane |
house | House or building |
address | The input already resolves to a specific address |
apartment | Apartment of a house; only with units=true |
Suggestions carry no register codes, postcodes or hierarchy. Once the user picks one, get the full structure from /parse.
/suggest/compact
API keyThe same suggestions as /suggest, with short labels for an input field.
The q, limit, scope, extended and units parameters are the same, and so are the suggestions and their order. Only text_ru and text_kz differ: they drop “Республика Казахстан”, and long types of three or more words get short names — “город Алматы” instead of “город республиканского значения Алматы”, “район” instead of “район в городе”. Types of one or two words (“область”, “сельский округ”, “улица”) stay as they are.
Request
curl -G https://api.qaida.io/suggest/compact \
-H "X-Api-Key: $QAIDA_API_KEY" \
--data-urlencode "q=алматы абылай х" \
-d limit=3{
"query": "алматы абылай х",
"suggestions": [
{
"kind": "street",
"uid": 156094,
"text_ru": "город Алматы, проспект Абылай хана",
"text_kz": "Алматы қаласы, Абылай хан даңғылы",
"point": [null, null]
},
{
"kind": "street",
"uid": 71334,
"text_ru": "город Алматы, микрорайон Мадениет, улица Абылай хан",
"text_kz": "Алматы қаласы, Мәдениет шағын ауданы, Абылай хан көшесі",
"point": [null, null]
},
{
"kind": "street",
"uid": 8725,
"text_ru": "область Алматинская, район Карасайский, город Каскелен, улица Абылай Хан",
"text_kz": "Алматы облысы, Қарасай ауданы, Қаскелең қаласы, Абылай Хан көшесі",
"point": [null, null]
}
],
"scope": null,
"search": null
}Apartments in suggestions
With units=true, /suggest and /suggest/compact suggest down to the apartment, with numbers from the Address Register.
- Typing an apartment. The input ends with “кв”, “квартира” or “пәтер”, possibly followed by the start of a number: “…туран 46а кв 1”. The list holds the apartments of that house whose number starts with what was typed, with
kind: "apartment". - The address is complete. The input ends with a space or a comma, and the first suggestion is the address itself: “…туран 46а ”. The first apartments of the house follow it.
{
"query": "астана проспект туран 46а кв 1",
"suggestions": [
{
"kind": "apartment",
"uid": null,
"text_ru": "Республика Казахстан, город республиканского значения Астана, проспект Тұран, дом 46А, квартира 1",
"text_kz": "Қазақстан республикасы, Астана республикалық маңызы бар қаласы, Тұран даңғылы, 46А үй, пәтер 1",
"point": [71.40022277832031, 51.11112976074219]
},
{
"kind": "apartment",
"uid": null,
"text_ru": "Республика Казахстан, город республиканского значения Астана, проспект Тұран, дом 46А, квартира 10",
"text_kz": "Қазақстан республикасы, Астана республикалық маңызы бар қаласы, Тұран даңғылы, 46А үй, пәтер 10",
"point": [71.40022277832031, 51.11112976074219]
},
{
"kind": "apartment",
"uid": null,
"text_ru": "Республика Казахстан, город республиканского значения Астана, проспект Тұран, дом 46А, квартира 11",
"text_kz": "Қазақстан республикасы, Астана республикалық маңызы бар қаласы, Тұран даңғылы, 46А үй, пәтер 11",
"point": [71.40022277832031, 51.11112976074219]
}
],
"scope": null,
"search": null
}- Apartments are suggested only for a house the input names unambiguously: its parse type is neither
partialnorambiguous. If the house is ambiguous or has no apartments in the register, the suggestions are the same as withoutunits. - Only residential units are suggested — apartments and rooms. Offices and non-residential premises are not.
- An apartment suggestion has
uidset tonulland the housepoint. In/suggest/compactthe label is short, like the other suggestions. - Parse the chosen apartment with
/parseandinclude=apartment: the unit comes as the last hierarchy node, see Apartment and office.
/suggest/region and /suggest/city
API keyThe same as /suggest, but scope is required and matched only among units of its level — as with /parse/region and /parse/city.
The main use: the city is chosen in a separate form field and the user types only the street. Suggestions come only from that city, even when its name is not in the input. These endpoints have no extended parameter: the country-wide search never runs, and search in the response is always null. There is no units parameter either: only /suggest and /suggest/compact suggest apartments.
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
qrequired | string | — | The typed part of the address, 1–200 characters |
scoperequired | string | — | A region (for /region) or a city (for /city): name, KATO code or UID |
limit | integer | 10 | How many suggestions to return, 1–20 |
Request
curl -G https://api.qaida.io/suggest/city \
-H "X-Api-Key: $QAIDA_API_KEY" \
--data-urlencode "q=торайг" \
--data-urlencode "scope=экибастуз" \
-d limit=3{
"query": "торайг",
"suggestions": [
{
"kind": "street",
"uid": 12960,
"text_ru": "Республика Казахстан, область Павлодарская, город областного значения Экибастуз, улица С Торайгырова",
"text_kz": "Қазақстан республикасы, Павлодар облысы, Екібастұз облыстық маңызы бар қаласы, С Торайғыров көшесі",
"point": [null, null]
}
],
"scope": {
"uid": 66,
"kato": 552210000,
"name_ru": "Экибастуз",
"name_kz": "Екібастұз",
"type_ru": "Город областного значения",
"type_kz": "Облыстық маңызы бар қаласы",
"matched_by": "name"
},
"search": null
}/suggest/extended and /suggest/compact/extended
API keySuggestions where a street without a locality is always searched across the whole country — as in /parse/extended.
This is not the same as the extended parameter of /suggest: there country-wide suggestions appear only when there are no regular suggestions or the first of them is neither a street nor a house, while here the country-wide search always reads the input. The q, limit and scope parameters are the same as in /suggest. “дост” brings streets of different cities, “достык 8” brings house 8 on those streets. A city named in the string keeps the suggestions inside it; with the scope parameter these are regular suggestions within the unit. Every response carries the search block, the same as in /parse/extended. /suggest/compact/extended differs only by the short labels, like /suggest/compact.
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
qrequired | string | — | The typed part of the address, 1–200 characters. The locality may be omitted |
limit | integer | 10 | How many suggestions to return, 1–20 |
scope | string | — | Suggest only inside one administrative unit |
Request
curl -G https://api.qaida.io/suggest/extended \
-H "X-Api-Key: $QAIDA_API_KEY" \
--data-urlencode "q=достык 8" \
-d limit=3{
"query": "достык 8",
"suggestions": [
{
"kind": "house",
"uid": 2824283,
"text_ru": "Республика Казахстан, город республиканского значения Астана, улица Достық, дом 8",
"text_kz": "Қазақстан республикасы, Астана республикалық маңызы бар қаласы, Достық көшесі, 8 үй",
"point": [71.42141723632812, 51.12685012817383]
},
{
"kind": "house",
"uid": 2157681,
"text_ru": "Республика Казахстан, город республиканского значения Шымкент, жилой массив Достык, улица Достык, дом 8",
"text_kz": "Қазақстан республикасы, Шымкент республикалық маңызы бар қаласы, Достық тұрғын үй алабы, Достық көшесі, 8 үй",
"point": [69.73550415039062, 42.36028289794922]
},
{
"kind": "house",
"uid": 3970024,
"text_ru": "Республика Казахстан, город республиканского значения Алматы, микрорайон Шугыла, микрорайон Достық, дом 8",
"text_kz": "Қазақстан республикасы, Алматы республикалық маңызы бар қаласы, Шұғыла шағын ауданы, Достық шағын ауданы, 8 үй",
"point": [76.83915710449219, 43.27186965942383]
}
],
"scope": null,
"search": {
"mode": "streets",
"streets": 929,
"localities": 853,
"complete": true,
"dropped": [],
"place": null,
"hypothesis": "H0"
}
}Input ending with a space is read the same way as in /parse/extended: the first suggestion for “достык 8 ” matches the first result of parsing “достык 8”.
/lookup
API keyAn address from a register code: a new or old postcode, or an RCA. The kind of code is detected from the string itself.
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
qrequired | string | — | A code in one of the formats below. Case and surrounding spaces do not matter |
include | string | — | Extra data, comma-separated: prices and building details; geometry currently returns null. See The include parameter |
exclude | string | — | Fields you do not need, comma-separated: rca, cato, postcodes and more. See The exclude parameter |
| Code | Format | Example | Returns |
|---|---|---|---|
| New postcode | A00A0A0 | Z05T9X8 | A building. Almost always one, occasionally two |
| RCA | 15 digits | 202100297954282 | A building |
| Old postcode | 4–6 digits | 050010 | The locality most buildings with this code belong to. An old postcode cannot identify a building |
Request
curl -G https://api.qaida.io/lookup \
-H "X-Api-Key: $QAIDA_API_KEY" \
-d q=Z05T9X8Response
| Field | Type | Description |
|---|---|---|
query | string | The query string |
matched_by | string | postcode, rca or old_postcode |
house_count | integer | How many buildings in the register carry this code. 1 for a new postcode or RCA, thousands for an old postcode |
results | array | Result objects. match is null here: there was no string to parse |
{
"query": "Z05T9X8",
"matched_by": "postcode",
"house_count": 1,
"results": [
{
"hierarchy": [ … ],
"full_path_rus": "Республика Казахстан, город республиканского значения Астана, проспект Қабанбай Батыр, здание 11/5",
"full_path_kaz": "Қазақстан республикасы, Астана республикалық маңызы бар қаласы, Қабанбай Батыр даңғылы, 11/5 ғимарат",
"point": [71.41329956054688, 51.14006042480469],
"match": null
}
]
}{
"query": "050010",
"matched_by": "old_postcode",
"house_count": 8651,
"results": [
{
"hierarchy": [ … ],
"full_path_rus": "Республика Казахстан, город республиканского значения Алматы",
"full_path_kaz": "Қазақстан республикасы, Алматы республикалық маңызы бар қаласы",
"point": [null, null],
"match": null
}
]
}/nearby
API keyBuildings near a point, nearest first.
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
latrequired | number | — | Latitude |
lonrequired | number | — | Longitude |
limit | integer | 5 | How many buildings to return, 1–20 |
radius_m | number | 500 | Search radius in metres. Values up to 50,000 are accepted, but the search never goes beyond 1,000 m |
include | string | — | Extra data, comma-separated: prices and building details; geometry currently returns null. See The include parameter |
exclude | string | — | Fields you do not need, comma-separated: rca, cato, postcodes and more. See The exclude parameter |
Points outside Kazakhstan — outside latitudes 40–56° and longitudes 46–88° — return an empty results.
Request
curl -G https://api.qaida.io/nearby \
-H "X-Api-Key: $QAIDA_API_KEY" \
-d lat=51.14006 \
-d lon=71.4133 \
-d limit=2 \
-d radius_m=100Response
The response holds the query point query (fields lat and lon) and a results list. Each result is a result object with two extra fields:
| Field | Type | Description |
|---|---|---|
distance_m | number | Distance from the query point in metres, to 0.1 |
shared_point | integer | How many buildings the register places at exactly this point |
{
"query": {
"lat": 51.14006042480469,
"lon": 71.41329956054688
},
"results": [
{
"hierarchy": [ … ],
"full_path_rus": "Республика Казахстан, город республиканского значения Астана, проспект Қабанбай Батыр, здание 11/5",
"full_path_kaz": "Қазақстан республикасы, Астана республикалық маңызы бар қаласы, Қабанбай Батыр даңғылы, 11/5 ғимарат",
"point": [71.41329956054688, 51.14006042480469],
"match": null,
"distance_m": 0.0,
"shared_point": 1
},
{
"hierarchy": [ … ],
"full_path_rus": "Республика Казахстан, город республиканского значения Астана, проспект Қабанбай Батыр, здание 11/4",
"full_path_kaz": "Қазақстан республикасы, Астана республикалық маңызы бар қаласы, Қабанбай Батыр даңғылы, 11/4 ғимарат",
"point": [71.41276550292969, 51.140602111816406],
"match": null,
"distance_m": 70.9,
"shared_point": 1
}
]
}Map on your website: JS API
The qaida-maps.js script draws a map of Kazakhstan right on your web page: an address field with suggestions and a point on the map, branches, any markers. It is built on MapLibre GL JS and our basemap from OpenStreetMap data.
- The key is a browser key. It is bound to the addresses of your websites and works only on them. A server key is not accepted on a page. A browser key is issued on request at qaida@tenzor-ai.com: send the website addresses with the scheme, for example
https://shop.kz. For development you can addhttp://localhost:3000to the list. A key holds up to 20 websites, each written in full, without wildcards:https://shop.kzandhttps://www.shop.kzare different websites. - The key is visible in the page code, and that is expected. Binding to websites keeps other websites from opening the map with your key in a browser, but a request made outside a browser can name any website. That is why a browser key gives only the map, suggestions and address points, not the whole API, and each visitor’s requests are limited. If you notice someone else using your quota, write to us: we will reissue the key, and the old one stops working within a minute.
- Loading the map is free. Only address parsing and suggestions use the quota, see What uses the quota.
- Coordinates are always
[longitude, latitude], as in API responses and in MapLibre.
<div id="map" style="height: 400px"></div>
<script src="https://maps.qaida.io/js/v1/qaida-maps.js"></script>
<script>
qaida.ready.then(() => {
const map = new qaida.Map('map', { key: 'YOUR_BROWSER_KEY', center: [71.43, 51.13], zoom: 11 });
});
</script>The loader at a permanent address fetches the map bundle — about 700 KB on first load together with fonts and the visible part of the map, then the code and fonts come from the browser cache — and sets qaida.ready. Make all calls after it. Map updates arrive on their own and nothing needs to change on your website.
The map opens in the “Nature” theme, as on the Qaida map website. For dark websites there is a night theme: new qaida.Map('map', { key, theme: 'night' }).

From zoom 16 the map shows house numbers from the Qaida registry — for houses whose point is on the building or its plot. Turn them off with houseNumbers: false.
Address field with a point on the map
A visitor types an address and picks a suggestion. A marker appears on the map, and your code receives the address from the registry and its coordinate. This is how delivery, listing or application addresses are filled in.
<label for="address">Адрес доставки</label>
<input id="address" placeholder="Город, улица, дом">
<div id="map" style="height: 400px"></div>
<script src="https://maps.qaida.io/js/v1/qaida-maps.js"></script>
<script>
qaida.ready.then(() => {
const map = new qaida.Map('map', { key: 'YOUR_BROWSER_KEY', city: 'almaty' });
const input = new qaida.AddressInput('address', { map }); // search only in Almaty
input.on('select', (address) => {
// address.text — the address from the registry
// address.point — [longitude, latitude]; null if a street or a city was chosen
// address.level — house, street, city, …
console.log(address);
});
});
</script>
- Suggestions are requested from the third character, after a 250 ms pause. Repeated input is served from the page memory. Each suggestion request is one request from the suggestion quota.
- Only a building has a point. If the visitor picked a street or a city,
address.pointisnulland no marker is placed: ask for the house number. - The search can be limited to a city:
new qaida.Map('map', { key, city: 'almaty' })— the map opens on Almaty, and suggestions and parsing search only there. The list of cities is in the reference.
Without an input field of your own, an address is put on the map with one call. It is one parse from the quota:
map.geocode('Астана, Мангилик Ел 8')
.then((address) => map.setMarker(address))
.catch((error) => console.log(error.code, error.message));Branches and markers
A list of points with a title and a card. The map view fits all the markers by itself.
<div id="map" style="height: 400px"></div>
<script src="https://maps.qaida.io/js/v1/qaida-maps.js"></script>
<script>
qaida.ready.then(async () => {
const map = new qaida.Map('map', { key: 'YOUR_BROWSER_KEY' });
const { added, failed } = await map.addMarkers([
{ point: [76.9466, 43.2421], title: 'Филиал на Абая', text: 'Пн–Пт 9:00–18:00' },
{ point: [76.9431, 43.2556], title: 'Филиал на Толе би', text: 'Ежедневно 10:00–22:00' },
{ address: 'Алматы, Достык 89', title: 'Склад' },
]);
map.on('markerclick', (branch) => console.log(branch.title));
});
</script>
- A marker is set by a
pointcoordinate or by anaddress. Markers by coordinates are free. An address is parsed every time the page opens and uses a parse. The same previously found address from the same website within 10 minutes does not use the quota. For a permanent list, get the coordinates once via /parse with your server key and keep them on your side. - The
titleand thetextare shown as text: HTML in them is not interpreted. addMarkersreturns{ added, failed }: how many markers were placed and which could not be placed, with the reason.- A new
addMarkerscall replaces the previous markers. To remove them all —map.clearMarkers().
Many points
From 51 markers the map groups them into clusters with a count. A click on a cluster zooms in.
<div id="map" style="height: 400px"></div>
<script src="https://maps.qaida.io/js/v1/qaida-maps.js"></script>
<script>
qaida.ready.then(async () => {
const map = new qaida.Map('map', { key: 'YOUR_BROWSER_KEY' });
// points from your server: [{ point: [longitude, latitude], title, text }, …]
const points = await fetch('/api/points').then((response) => response.json());
await map.addMarkers(points);
});
</script>
Route
A route between two points or addresses: by car, with live traffic, or on foot. The line is drawn on the map and the view fits it.
<div id="map" style="height: 400px"></div>
<script src="https://maps.qaida.io/js/v1/qaida-maps.js"></script>
<script>
qaida.ready.then(async () => {
const map = new qaida.Map('map', { key: 'YOUR_BROWSER_KEY', city: 'almaty' });
// from and to: [longitude, latitude] or an address; mode: 'drive' (default, live traffic) or 'walk'
const route = await map.route('Алматы, Абая 10', [76.9431, 43.2556], { mode: 'drive' });
console.log(Math.round(route.distance / 100) / 10, 'km,', Math.round(route.duration / 60), 'min');
});
</script>mode—drive(by car, the default) orwalk(on foot). The answer is{ distance, duration, delay, geometry }: length in meters, time in seconds, traffic delay in seconds (0 on foot) and a GeoJSON line.- A point is
[lon, lat]. Instead of a point you can pass an address: it is parsed as ingeocode. Both points must be in Kazakhstan, no more than 30 km apart in a straight line on foot and 1500 km by car. - Routes are built by Geoapify (on foot) and TomTom (by car). Their credit is added to the map data credit and must not be removed.
- A new
routecall replaces the previous route. To remove the route —map.clearRoute().
JS API reference
new qaida.Map(container, options)
The container is an element id or the element itself. The element must have a height.
| Parameter | Type | Default | Description |
|---|---|---|---|
keyrequired | string | — | Browser API key |
center | [lon, lat] | [71.43, 51.13] | Map center |
zoom | number | 11 | Zoom, from 3 to 18 |
lang | string | ru | Language of labels and messages: ru or kk |
cooperativeGestures | boolean | false | true — the map zooms with the wheel only with Ctrl or Cmd held, on a phone — with two fingers. Useful when the map sits in the middle of a long page |
houseNumbers | boolean | true | House numbers from the Qaida registry from zoom 16. false — no numbers |
theme | string | nature | Map theme: nature — “Nature”, as on the Qaida map website, or night |
city | string | — | City: the map opens on it, suggestions and parsing search only there. Values — below |
scope | string | — | The same search limit without the map frame: any scope value — region, city, KATO code |
Cities for city: astana — Astana, almaty — Almaty, shymkent — Shymkent, karaganda — Karaganda, aktobe — Aktobe, taraz — Taraz, pavlodar — Pavlodar, oskemen — Oskemen (Ust-Kamenogorsk), semey — Semey, atyrau — Atyrau, kostanay — Kostanay, kyzylorda — Kyzylorda, oral — Oral (Uralsk), petropavl — Petropavl, aktau — Aktau, turkistan — Turkistan, kokshetau — Kokshetau, taldykorgan — Taldykorgan, zhezkazgan — Zhezkazgan, konaev — Konaev. The list is also in the script itself — qaida.cities.
| Method or property | What it does |
|---|---|
map.ready | Promise: the map has loaded. On an error it rejects with error.code, see Map errors |
map.geocode(address) | Parses the address and returns { text, point, level }. One parse from the quota, even if no building is found. The same previously found address from the same website within 10 minutes does not use the quota. On an error the promise rejects with error.code |
map.setMarker(value, { fly }) | One marker: [lon, lat], { point, title, text, zoom } or a geocode result. The previous marker is removed. fly: false — no flight to the marker |
map.addMarkers(list, { fit }) | Markers from a list, see Branches and markers. fit: false — keep the map view |
map.clearMarkers() | Removes the list markers |
map.route(from, to, { mode, fit }) | A route, see Route. fit: false — keep the map view |
map.clearRoute() | Removes the route |
map.on(event, handler) | Subscribes to an event; map.off unsubscribes |
map.remove() | Removes the map from the page |
map.maplibre | The MapLibre GL JS map object — for your own layers and handlers. Do not remove the OpenStreetMap and OpenMapTiles attribution: the data terms require it |
| Event | When | Payload |
|---|---|---|
load | The map has loaded | The map itself |
error | The map failed to load | An error with a code field |
markerclick | A click on a marker | The addMarkers list item or the setMarker marker |
route | A route is built | The route answer |
new qaida.AddressInput(field, options)
The field is the id of an <input> element or the element itself. The suggestion list appears below it, or above it when there is little room below. The field and the list are marked up for screen readers (WAI-ARIA combobox); the field’s <label for> also labels the list.
| Parameter | Type | Default | Description |
|---|---|---|---|
map | qaida.Map | — | The map where the marker of the chosen address is placed |
key | string | map key | Needed only if no map is passed |
lang | string | map language | ru or kk |
scope | string | map city | Search within a region or a city, as scope. By default — the map’s city or scope |
limit | integer | 7 | How many suggestions to show, 1–10 |
minChars | integer | 3 | From which character suggestions are requested |
| Event | Payload |
|---|---|
select | { text, point, kind, level }. kind is the suggestion type, as in /suggest. level is house for a building, for the rest — the same as kind. point is null if the choice is not a building |
error | An error with a code field |
input.remove() detaches the suggestions from the field. qaida.version is the script version, qaida.maplibregl is the MapLibre GL JS module.
What uses the quota
| Action | What it uses |
|---|---|
| Loading the map, markers by coordinates, zooming and panning | Nothing |
| A suggestion request while typing | One request from the suggestion quota |
geocode, a marker by address | One parse from the quota, even if no building is found. The same previously found address from the same website within 10 minutes does not use the quota |
route | One parse from the quota per route. An address instead of a point — one more parse |
The quota is the same as your account’s API quota, see Limits.
So that one visitor cannot use up the quota of the whole website, requests are limited by the visitor’s IP address. Per minute: suggestions — 60 and no more than 5 per second, parses — 15, routes — 6, map loads — 60. Per day from one IP address with one key: suggestions — 1000, parses — 200, routes — 30. Suggestions for the whole website — up to 30 per second. Beyond that the visitor gets a limit error. Addresses in addMarkers are parsed two at a time, and on a limit the script waits and retries by itself. For a list of more than 15 addresses pass points. The limits are approximate: a short burst of requests may go slightly above them.
A browser key has its own daily cap: half of the account’s daily limit, or two average days of a package, but no less than 1000 suggestions and 100 parses. A route counts as a parse. When the key uses 80% of the cap, or requests in an hour become five times the usual, an email is sent to the account address. If these are your visitors, write to support@qaida.io and the cap will be raised.
Website requirements
- A browser with WebGL 2: recent versions of Chrome, Edge, Firefox and Safari.
- The page is opened from a server, not from a file: otherwise the browser does not send the website address and the key is not confirmed.
- The map element has a height.
- On phones: if the map sits in the middle of a long page, turn on
cooperativeGestures: true, otherwise the page does not scroll with a finger over the map. Use a font of at least 16 px in the address field, otherwise Safari on iPhone zooms the page while typing.
If your website has a strict Content-Security-Policy, add to your policy:
script-src https://maps.qaida.io;
style-src https://maps.qaida.io;
connect-src https://maps.qaida.io;
worker-src blob:;
img-src data: blob:;Without worker-src blob: the map stays empty: the drawing worker starts from a blob. The list was checked on a page with default-src 'none', where the page’s own code and styles are loaded as files from its website ('self'). For brevity, the examples above use an inline <script> and a style attribute: under a strict policy, move the code to your own file or allow it with a nonce, and set the map height with a class in your CSS.
The loader is included without an integrity attribute: it is updated with every map release. If your policy requires SRI, write to us — we will give you the address of a bundle with a hash in its name and its sha384.
Visitor data. For suggestions, parsing and limits, the map sends Qaida the visitor’s IP address and the addresses the visitor types or your code parses. They are written to the request log of your key. Mention this in your website’s privacy policy.
Map errors
If the map fails to load, the error text appears inside the map block, and the map’s error event receives an error with a code field. The geocode promise rejects with the same kind of error, AddressInput emits its own error event, and addMarkers lists the markers it could not place in failed, each with its error. The map shows the text in Russian or Kazakh, by lang.
| Code | Text (ru) | What to do |
|---|---|---|
denied | Этому сайту карта с этим ключом не разрешена | The website address is not in the key’s list. Check the scheme and the subdomain: https://shop.kz and https://www.shop.kz are different websites |
serverKey | На странице можно использовать только браузерный ключ, привязанный к сайту | A browser key is needed, see Map on your website |
badKey | Ключ API не подошел | The key is wrong or revoked |
key | Не задан ключ API | Pass key in the map options |
origin | Сайт не передал свой адрес | Open the page from a server, not from a file |
limit | Превышен лимит запросов, попробуйте позже | Retry later, see What uses the quota |
notFound | Адрес не найден на карте | The address has no building point: check the house number |
q | Не задан адрес | Pass a non-empty address |
token | Сессия карты истекла | The script renews the session by itself. If the error repeats, reload the page |
unavailable | Сервис карты временно недоступен | Retry later |
scope | Город поиска не найден | Check city or scope: the value must be from the list of cities or understood by scope |
mode | Способ маршрута — walk или drive | Pass mode: 'walk' or mode: 'drive' |
points | Для маршрута нужны две разные точки или два адреса | Check the route points |
outOfBounds | Точки маршрута должны быть в Казахстане | Routes are built only within Kazakhstan |
tooFar | Точки маршрута слишком далеко друг от друга | On foot — up to 30 km in a straight line, by car — up to 1500 km |
noRoute | Маршрут между этими точками не найден | Take points closer to a road or a crossing |
dailyLimit | Маршруты на сегодня закончились, попробуйте завтра | The shared daily route limit is used up; retry tomorrow |
The include parameter
Extra data for an address, on request. It is not in the response by default: boundaries outweigh the address itself, and not everyone needs prices.
Works on every endpoint that returns a result object: /parse, /parse/region, /parse/city, /parse/batch, /lookup and /nearby. In a GET request list the values comma-separated; in the /parse/batch body pass a list of strings.
Values
| Value | Adds | Where in the response |
|---|---|---|
region_polygon | Region boundary | geometry in the kind: "region" node |
city_polygon | City or village boundary | geometry in the kind: "city" or kind: "locality" node |
building_polygon | Building footprint | geometry in the building node |
prices | Housing sale and rent prices per m² | A market object in the result |
building_info | Year built, floor count, residential complex and number of premises | year_built, floors, complex_name, flats_count and non_residential_count in the building node |
apartment | The apartment or office from the input: kind, number and RCA | The last hierarchy node and the end of full_path_rus, full_path_kaz |
Request
curl -G https://api.qaida.io/parse \
-H "X-Api-Key: $QAIDA_API_KEY" \
--data-urlencode "q=астана кабанбай батыра 11/5" \
-d top_k=1 \
-d include=prices,building_info- A requested field is always present. Without data its value is
null, so missing data cannot be confused with a field nobody asked for. - The exception is
apartment: without a unit no node is added and the address line does not change. Whether the unit exists is shown inmatch.unit_status. - An unknown value is a
422error, so a typo never turns into a silently empty field. - If the address is not found down to the building, the hierarchy has no building node — and so no footprint, year built, floor count, complex, premises counts or apartment. Prices then come at street level.
/lookupand/nearbyhave no address string, soapartmentadds nothing there.
The exclude parameter
Drops fields you do not need from the response: register codes, postcodes, the address line in the second language. The response gets shorter and batches lighter.
Works on the same endpoints: /parse, /parse/region, /parse/city, /parse/batch, /lookup and /nearby. In a GET request list fields comma-separated; in the /parse/batch body pass a list of strings.
Values
| Value | Drops |
|---|---|
hierarchy | The whole node list: the address line, coordinate and match remain |
full_path_rus, full_path_kaz | The address line in Russian or Kazakh |
cato | KATO in administrative-unit nodes |
rco | RCO in unit and street nodes |
rca | RCA of the building and unit |
postcode, oldPostcode | New and old postcode |
cadastre_number | Cadastral number of the building |
land_cadastre_number | Cadastral number of the land plot |
match | The match field |
Request
curl -G https://api.qaida.io/parse \
-H "X-Api-Key: $QAIDA_API_KEY" \
--data-urlencode "q=астана кабанбай батыра 11/5" \
-d top_k=1 \
-d exclude=rca,rco,cato{
"query": "астана кабанбай батыра 11/5",
"results": [
{
"hierarchy": [
{ … },
{ … },
{ … },
{
"type": "geo",
"kind": "street",
"name_kz": "Қабанбай Батыр",
"name_ru": "Қабанбай Батыр",
"type_kz": "Даңғылы",
"type_ru": "Проспект"
},
{
"type": "building",
"kind": "main",
"number": "11/5",
"type_kz": "Ғимарат",
"type_ru": "Здание",
"cadastre_number": null,
"land_cadastre_number": "21-320-000-0000",
"postcode": "Z05T9X8",
"oldPostcode": "010000"
}
],
"full_path_rus": "Республика Казахстан, город республиканского значения Астана, проспект Қабанбай Батыр, здание 11/5",
"full_path_kaz": "Қазақстан республикасы, Астана республикалық маңызы бар қаласы, Қабанбай Батыр даңғылы, 11/5 ғимарат",
"point": [71.41329956054688, 51.14006042480469],
"match": { … }
}
],
"scope": null,
"scope_conflict": null,
"search": null
}- A field is dropped everywhere it appears:
catodisappears from every hierarchy node. - A dropped field is absent from the response, not sent as
null. - Node
typeandkindcannot be dropped: they are how nodes are found in the hierarchy. - An unknown value is a
422error.
Boundaries and footprints
soonBoundaries of regions, cities and villages, and building footprints, as GeoJSON.
Each value adds a geometry field to its node of the hierarchy. It is a GeoJSON geometry — Polygon or MultiPolygon; its coordinates, like point, are [lon, lat] pairs.
- Region boundary (
region_polygon) — for the 17 regions and the three cities of national significance. For Almaty, Astana and Shymkent the city and “region” boundaries are the same: if both values are requested, it comes in both nodes. - City or village boundary (
city_polygon) — in the locality node:cityfor cities,localityfor villages and settlements. Not every village has a boundary. - Building footprint (
building_polygon) — the outline of the building on the ground. Large cities are covered best; where there is no footprint,geometryisnull.
{
"type": "building",
"kind": "main",
"number": "11/5",
"rca": 202100297954282,
"postcode": "Z05T9X8",
"geometry": {
"type": "Polygon",
"coordinates": [
[
[71.41301, 51.14021],
[71.41358, 51.14019],
[71.41355, 51.13991],
[71.41298, 51.13993],
[71.41301, 51.14021]
]
]
},
"year_built": 2008,
"floors": 12,
"complex_name": "Пример",
"flats_count": 180,
"non_residential_count": 12
}region_polygon and city_polygon only when you really need the boundary, and store it on your side by KATO: boundaries rarely change, and sending them in every response is wasteful.Rent and sale prices
Market housing prices per square metre for an address: flat sales and long-term rentals.
Enabled by the prices value. The result gets a market object:
| Field | Type | Description |
|---|---|---|
sale_m2 | integer | null | Sale: median, tenge per m² of total area |
rent_m2 | integer | null | Rent: median, tenge per m² per month |
sale_source, rent_source | string | null | Source of each price: house, complex, street or null |
{
"hierarchy": [ … ],
"full_path_rus": "Республика Казахстан, город республиканского значения Астана, проспект Қабанбай Батыр, здание 11/5",
"point": [71.41329956054688, 51.14006042480469],
"match": { … },
"market": {
"sale_m2": 520000,
"rent_m2": 4300,
"sale_source": "house",
"rent_source": "street"
}
}Sale and rent are selected independently, so one address may use different levels. sale_source and rent_source identify each price source.
Where the price comes from
Prices are computed from sale and rental listings linked to register buildings. If a building has no listings, the price is taken from its residential complex, and failing that from the street.
- This is the median of prices asked by sellers and landlords, not of closed deals.
- A building-level price is given only for addresses found down to the building unambiguously:
match.levelis"house"andmatch.typeisexact,aliasorcorrected. Otherwise the price could land on the house next door; such addresses get the street level straight away. - If there is no price at any level,
sale_m2orrent_m2isnull.
Year built, floors, complex and premises
Year built, floor count, residential complex and number of premises of the building.
Enabled by the building_info value. The building node gets these fields:
| Field | Type | Description |
|---|---|---|
year_built | integer | null | Year of construction |
floors | integer | null | Number of floors |
complex_name | string | null | Name of the residential complex the building belongs to |
flats_count | integer | null | Number of flats and rooms in the building, per the Address Register |
non_residential_count | integer | null | Number of non-residential premises, offices and built-in premises in the building, per the Address Register |
Premises are counted for the building record in the Address Register. null in both fields means the register knows no premises of the building: typical for private houses and new buildings. A number in one field and 0 in the other means there are premises of one kind only: a business centre has 0 flats. Parking spaces are not counted.
Apartment and office
The apartment or office from the address string, per the Address Register: unit kind, number and RCA.
When the input has an apartment or office number and the address is found down to the building, the service looks the unit up for that building in the Address Register. The result of the check comes in match.unit_status; the unit itself only with include=apartment.
The check: match.unit_status
| unit_status | Meaning |
|---|---|
found | The building has a unit with this number in the register |
not_found | The register has units for the building, but not this number |
no_data | The register knows no units of the building. Typical for private houses and new buildings |
ambiguous | A Latin letter in the number fits two units of the house: “12b” is both “12б” and “12в”. Neither is chosen |
The field is absent when the input has no unit number or the address is not found down to the building. The check does not affect match.type: the type rates the address down to the building, so “туран 46а кв 999” is exact with unit_status = "not_found". The unit is looked up for the answer record: the corpus if a corpus was found, otherwise the house.
The unit in the response
Enabled by the apartment value. When the unit is found (unit_status = "found"), it becomes the last hierarchy node, and the address line ends with it: “…, дом 46А, квартира 12”, “…, 46А үй, 12 пәтер”. point stays the building point.
{
"hierarchy": [
{ … },
{ … },
{ … },
{ … },
{ … },
{ … },
{
"type": "apartment",
"kind": "flat",
"number": "12",
"rca": "*****",
"type_ru": "Квартира",
"type_kz": "Пәтер"
}
],
"full_path_rus": "Республика Казахстан, город республиканского значения Астана, район Нұра, проспект Тұран, дом 46А, квартира 12",
"full_path_kaz": "Қазақстан республикасы, Астана республикалық маңызы бар қаласы, Нұра ауданы, Тұран даңғылы, 46А үй, 12 пәтер",
"point": [71.40022277832031, 51.11112976074219],
"match": {
"level": "house",
"type": "exact",
"ambiguous": false,
"unmatched": [],
"corrections": [],
"requested_unit": "12",
"unit_status": "found"
}
}| Field | Type | Description |
|---|---|---|
type | string | Always apartment |
kind | string | Unit kind: flat — apartment, room — room, non_residential — non-residential premises, office — office, built_in — built-in premises |
number | string | Number as in the register, letters in lower case: “12”, “12а”, “5/1” |
rca | integer | string | Unit RCA, 16 digits. A number only for accounts with access to unit RCAs; others get the string "*****". Access is granted on request at qaida@tenzor-ai.com |
type_ru, type_kz | string | Unit kind in words: “Квартира”, “Нежилое помещение”…; the word used for the unit in full_path |
If the unit is not found, there is no node and the address line does not change. exclude=rca removes the RCA from the unit node too.
Which unit is looked up
An apartment and a non-residential unit in one building often share a number, with different RCAs. The word in the input decides which one to look for:
- “кв”, “квартира”, “пәтер” right at the number — apartments and rooms only; “офис”, “оф”, “кеңсе”, “кабинет” — non-residential premises, offices and built-in premises only. “туран 46а кв 12” is apartment 12, “туран 46а офис 12” is non-residential unit 12 of the same house.
- A word elsewhere in the input — units of its kind first, then the rest.
- No word (“абая 10-12”) — apartments and rooms first.
- “н.п. 12” is how the eGov portal writes a non-residential unit: only non-residential premises are looked up, and an apartment with the same number is never substituted.
- The spelling of the number does not matter: “12-А”, “12 а” and “12a” all find “12а”.
A number right after the house number
Apartments are often written without “кв”: “астана проспект туран 46а 12”. If the register has no corpus 12 and no house 46А/12, but house 46А has apartment 12, the number is read as the apartment:
{
"level": "house",
"type": "corrected",
"ambiguous": false,
"unmatched": [],
"corrections": [
{
"original": "46А 12",
"replacement": "46А, кв. 12",
"kind": "unit"
}
],
"requested_unit": "12",
"unit_status": "found"
}- The answer type is
corrected,correctionshas a pair withkind: "unit", and the number is inrequested_unit. If the response has asearchblock, the type does not change and stayspartial. - Only an apartment is read this way. A non-residential unit needs the word “офис”.
- If the register has no apartment with this number, the answer is as before: the house with
match.type = "partial"and the number inunmatched— it may be an apartment or something else.
The units parameter
On /parse, /parse/extended, /parse/region, /parse/city and /parse/batch the Address Register check is on by default (units=true). units=false turns it off entirely: match has no unit_status, a number after the house number is not read as an apartment, and include=apartment adds no unit. A number named explicitly in the input (“кв 12”) stays in match.requested_unit. On /suggest and /suggest/compact the parameter works the other way round — false by default, see Apartments in suggestions. /lookup, /nearby and /demo/* have no such parameter.
The scope parameter
Restricts the search to one administrative unit. Works in /parse, every /suggest, /parse/batch, and is required on the level endpoints. When the city is known in advance, there is no need to glue it onto the address string.
Three kinds of value
| Kind | Example | Rules |
|---|---|---|
| Name | алматы, Екібастұз | Russian or Kazakh, as in the register. Case-insensitive. No words like “город” or “область”, no “г.” abbreviations, no typos: “Алматинская” is recognized, “Алматинская область” is not. The register spells the Jetisu and Ulytau regions, Konaev and Ushtobe in Kazakh, but their Russian names are accepted too: “Жетысуская”, “Улытауская”, “Конаев”, “Кунаев”, “Капчагай”, “Уштобе” |
| KATO code | 750000000 | Nine digits |
| UID | 1 | The scope.uid value from an earlier response |
When several units share a name, the most significant one wins: cities of national significance first, then regions, then everything else. For example, “алматы” is the city of Almaty, not the Almaty Region and not a village of the same name. The scope block in the response shows which unit was taken. Pass KATO to be unambiguous.
{
"uid": 1,
"kato": 750000000,
"name_ru": "Алматы",
"name_kz": "Алматы",
"type_ru": "Город республиканского значения",
"type_kz": "Республикалық маңызы бар қаласы",
"matched_by": "name"
}| Field | Type | Description |
|---|---|---|
uid | integer | Internal unit identifier |
kato | integer | KATO code |
name_ru, name_kz | string | Name in Russian and Kazakh |
type_ru, type_kz | string | Unit type: “Область”, “Город республиканского значения”, “Село”… |
matched_by | string | How the value was recognized: name, kato or uid |
Behaviour
| Case | Response |
|---|---|
| The address is not in the unit | 200 With an empty results. The service does not fall back to a country-wide search, so an address from another city is never substituted: the extended parameter has no effect together with scope |
| The value is not recognized | 422 неизвестная область поиска |
| The query names another city | 200 The answer still comes from the scope unit, and scope_conflict is true. Worth checking the source data |
{
"query": "астана кабанбай батыра 11/5",
"results": [
{
"hierarchy": [ … ],
"full_path_rus": "Республика Казахстан, город республиканского значения Алматы, улица Кабанбай батыра",
"full_path_kaz": "Қазақстан республикасы, Алматы республикалық маңызы бар қаласы, КАБАНБАЙ БАТЫР көшесі",
"point": [null, null],
"match": {
"level": "street",
"type": "partial",
"ambiguous": false,
"unmatched": ["house:11/5"],
"corrections": []
}
}
],
"scope": {
"uid": 1,
"kato": 750000000,
"name_ru": "Алматы",
"name_kz": "Алматы",
"type_ru": "Город республиканского значения",
"type_kz": "Республикалық маңызы бар қаласы",
"matched_by": "name"
},
"scope_conflict": true,
"search": null
}scope_conflict can fire falsely when a street is named after a city, such as “Алатау”.
The extended parameter
Covers strings where a street is given without a locality: “достык 89б”, “абая 135”. /parse, /suggest and /suggest/compact have this parameter, and it defaults to true.
true. The service first parses the string the regular way. If that gives no confirmed address, it tries again: it reads a locality written after the house number, or searches for the street across the whole country. Such an answer is marked with asearchblock. When the answer is regular,searchisnull.false. The regular parse only: a street is searched just inside the locality named in the string. A string without one gives an emptyresultsor a unit with that name: “достык 89б” is the village of Dostyk.
{
"query": "достык 89б",
"results": [
{
"hierarchy": [ … ],
"full_path_rus": "Республика Казахстан, город республиканского значения Алматы, проспект Достык, дом 89Б",
"full_path_kaz": "Қазақстан республикасы, Алматы республикалық маңызы бар қаласы, Достық даңғылы, 89Б үй",
"point": [76.95661163330078, 43.238582611083984],
"match": {
"level": "house",
"type": "partial",
"ambiguous": false,
"unmatched": [],
"corrections": []
}
}
],
"scope": null,
"scope_conflict": null,
"search": {
"mode": "streets",
"streets": 929,
"localities": 853,
"complete": true,
"dropped": [],
"place": null,
"hypothesis": "H0",
"role": "replaced",
"superseded": {
"level": "locality",
"type": "partial",
"full_path_rus": "Республика Казахстан, область Жетісу, район Каратальский, город районного значения Үштөбе, село Достык",
"full_path_kaz": "Қазақстан республикасы, Жетісу облысы, Қаратал ауданы, Үштөбе аудандық маңызы бар қаласы, Достық ауылы"
},
"engine_type": "exact"
}
}The house is found, but Almaty was not in the string, so match.type is partial, and search.engine_type keeps the type given by the country-wide search — exact. The previous answer of the regular parse, the village of Dostyk, is in search.superseded. The same query with extended=false returns that village:
curl -G https://api.qaida.io/parse \
-H "X-Api-Key: $QAIDA_API_KEY" \
--data-urlencode "q=достык 89б" \
-d extended=falseThe search block
| Field | Type | Description |
|---|---|---|
search.role | string | What was done with the answer, see the table below |
search.mode | string | streets — the street was searched across the country, the city in the answer was chosen by the service; scope — the answer lies inside the unit named in the string; unit — the answer is the named unit itself; units — unit suggestions. The context value never occurs here |
search.superseded | object | null | The replaced answer of the regular parse: level, type, full_path_rus, full_path_kaz. Only with role = "replaced", otherwise null |
search.engine_type | string | null | The type of the first answer in the country-wide search when match.type lowers it to partial; otherwise null |
The other fields of the block — streets, localities, complete, dropped, place and hypothesis — are the same as in /parse/extended.
| role | What happened | Example |
|---|---|---|
filled | The regular answer was empty; the country-wide search answers | “абая 135” → Almaty, Abai Avenue, 135 |
replaced | The regular answer was unconfirmed and was replaced with the country-wide one; the former is in superseded | “достык 89б”: the village of Dostyk → Almaty, Dostyk Avenue, 89Б |
appended | The regular answer stays first; country-wide candidates follow it, ahead of the other regular answers. Only occurs with top_k of two or more | “достык”: the village of Dostyk, then Dostyk Avenue in Almaty |
reordered | The locality stood after the house number. The answer is the regular parse of the same string with the locality moved to the front; the country-wide search took no part. place is that locality; mode is scope when the answer is an address inside it and unit when it is the locality itself | “ул. Абая 135, Кокшетау” → Kokshetau, Abai Street, 135 |
merged | Suggestions only: a word is being typed, and suggestions of units and of streets across the country are merged into one list | “астана”: the city of Astana, then Astana streets in other cities |
{
"mode": "scope",
"streets": null,
"localities": null,
"complete": true,
"dropped": [],
"place": "Кокшетау",
"hypothesis": null,
"role": "reordered",
"superseded": null,
"engine_type": null
}With role = "reordered" the country-wide search took no part, so streets, localities and hypothesis are null.
The service chose the city
With role of filled or replaced and mode = "streets", the string had no city: the service chose it. Such an answer always comes with match.type = "partial", even when the house is found and match.unmatched is empty. Country-wide candidates under role = "appended" come with the same type. The type given by the country-wide search is in search.engine_type.
So the rule for automatic processing needs no change: a house in a city you did not name is not treated as confirmed. If you want such a house anyway, read search.engine_type. With role = "reordered" the city comes from the string, and the answer type is the same as in the regular parse.
Suggestions
In /suggest and /suggest/compact the country-wide search runs when there are no regular suggestions or the first of them is neither a street nor a house. While a word is being typed, the order is: the region or city whose name is being typed, then streets across the country, then regular suggestions — villages, districts and the rest. A region or city comes first from three typed letters; at two letters only Almaty, Astana and Shymkent do.
{
"query": "астана",
"suggestions": [
{
"kind": "region",
"uid": 2,
"text_ru": "Республика Казахстан, город республиканского значения Астана",
"text_kz": "Қазақстан республикасы, Астана республикалық маңызы бар қаласы",
"point": [null, null]
},
{
"kind": "street",
"uid": 25446,
"text_ru": "Республика Казахстан, город республиканского значения Алматы, микрорайон Альмерек, улица Астана",
"text_kz": "Қазақстан республикасы, Алматы республикалық маңызы бар қаласы, Әлмерек шағын ауданы, Астана көшесі",
"point": [null, null]
},
{
"kind": "street",
"uid": 95890,
"text_ru": "Республика Казахстан, город республиканского значения Шымкент, микрорайон Тассай, улица Астана",
"text_kz": "Қазақстан республикасы, Шымкент республикалық маңызы бар қаласы, Тассай шағын ауданы, Астана көшесі",
"point": [null, null]
},
{
"kind": "street",
"uid": 8843,
"text_ru": "Республика Казахстан, область Павлодарская, город областного значения Павлодар, улица Астана",
"text_kz": "Қазақстан республикасы, Павлодар облысы, Павлодар облыстық маңызы бар қаласы, Астана көшесі",
"point": [null, null]
},
{
"kind": "district",
"uid": 81,
"text_ru": "Республика Казахстан, область Актюбинская, город областного значения Актобе, район в городе Астана",
"text_kz": "Қазақстан республикасы, Ақтөбе облысы, Ақтөбе облыстық маңызы бар қаласы, Астана қала ішіндегі аудан",
"point": [null, null]
}
],
"scope": null,
"search": {
"mode": "streets",
"streets": 317,
"localities": 287,
"complete": true,
"dropped": [],
"place": null,
"hypothesis": "H0",
"role": "merged",
"superseded": null,
"engine_type": null
}
}- The list is never longer than
limit, so some regular suggestions drop out of it. Withlimitabove one at least one stays; withlimit = 1none may stay. - Input ending with a space or an apartment is read as in
/parse: the rolesfilled,replaced,appended,reordered. - With
extended=falseonly regular suggestions come: for “астана” that is the city and a district, with no streets.
Where the country-wide search never runs
- With the
scopeparameter. You set the search area, and it is never widened. - On the level endpoints
/parse/region,/parse/city,/suggest/regionand/suggest/city: they have noextendedparameter. - In
/parse/batch. Every string of a batch is parsed like/parsewithextended=false, and the batch response has nosearchblock. - When the regular parse found a house, even with type
partial: it is no longer searched for across the country. A locality after the house number is still read (reordered).
include and exclude leave the search block as it is; it cannot be removed with exclude.
results as a found address, or takes point of the first result without looking at match.type, then for a string without a city it gets a house in a city the string never named. If your users pick a village or a district from suggestions, streets rank above them by default. extended=false brings back the previous behaviour in both cases: the regular parse and regular suggestions only.The extended parameter and the /parse/extended and /suggest/extended endpoints are different things: on the endpoints the country-wide search always runs and the answer type is not lowered.
Result object
One address candidate. The same in /parse, /parse/extended, the level endpoints, /parse/batch, /lookup and /nearby.
| Field | Type | Description |
|---|---|---|
hierarchy | array | Address nodes from the country down to the building, or down to the unit with include=apartment |
full_path_rus | string | The full address as one line in Russian |
full_path_kaz | string | The same in Kazakh |
point | [lon, lat] | Building coordinate or [null, null] |
match | object | null | How closely the input matched, see The match field |
market | object | Sale and rent prices per m², only with include=prices. See Rent and sale prices |
Hierarchy
Nodes go from general to specific: country, administrative units, streets and areas, building, and with include=apartment an apartment or office. Depth depends on the place: a village in a region has a district and a rural district, a street in Almaty does not. So find the level you need by the kind field, not by position in the list.
- atscountryRepublic of Kazakhstan
- atsregionAlmaty Region KATO 190000000
- atsdistrictZhambyl District KATO 194200000
- atsareaKargaly Rural District KATO 194279000
- atslocalityKargaly village KATO 194279100
- geostreetAlatau Street RCO 4000000023817
- buildingmainhouse 77 RCA 201300062040406 · B33G1H8
For the cities of national significance — Almaty, Astana and Shymkent — the same node appears twice: with kind: "city" and with kind: "region". That way every address has a node with kind: "region".
| Node field | Description |
|---|---|
type: "ats" — administrative unit | |
kind | country, region, district, city, area or locality |
name_ru, name_kz | Name |
type_ru, type_kz | Type: “Область”, “Район”, “Село”… |
rco | RCO; null for the country |
cato | KATO; null for the country |
geometry | soon GeoJSON boundary, only with include=region_polygon or city_polygon. See Boundaries and footprints |
type: "geo" — street or area | |
kind | street — street, avenue, lane; area — microdistrict, housing estate, garden partnership |
name_ru, name_kz, type_ru, type_kz | Name and type |
rco | RCO |
cato | Always null: only administrative units have KATO |
type: "building" — building | |
kind | Register record kind: main, corpus or block |
number | Number as in the register: “77”, “89Б”, “11/5” |
type_ru, type_kz | “Дом”, “Здание”…; the word used for the building in full_path |
rca | RCA |
cadastre_number | Cadastral number of the building itself; null for many buildings |
land_cadastre_number | Cadastral number of the land plot the building stands on; null if unknown |
postcode | New postcode |
oldPostcode | Old postcode, a 6-digit string |
geometry | soon GeoJSON building footprint, only with include=building_polygon |
year_built, floors, complex_name, flats_count, non_residential_count | Year built, floor count, complex name and premises counts, only with include=building_info. See Year built, floors, complex and premises |
type: "apartment" — apartment or office, only with include=apartment | |
kind | flat, room, non_residential, office or built_in |
number | Number as in the register, letters in lower case |
rca | Unit RCA with extra access, otherwise "*****". See Apartment and office |
type_ru, type_kz | “Квартира”, “Нежилое помещение”…; the word used for the unit in full_path |
Names come exactly as they are in the register. The Russian field sometimes holds the Kazakh spelling (“Қабанбай Батыр”), and letter case varies.
The match field
Shows how well the answer corresponds to the input. Use it to decide whether to accept an address automatically.
| Field | Type | Description |
|---|---|---|
level | string | How deep the address was found: house or the kind of the last node — street, area, locality, city… |
type | string | Match quality, see the table below |
ambiguous | boolean | Several objects fit equally well |
unmatched | string[] | What from the input was not found. Words come as typed, number components with a prefix: house:93, corpus:2, structure:1 |
corrections | array | Corrections: {"original": …, "replacement": …, "kind": …}. No kind — a corrected typo; kind: "house" — the house number was replaced with the register record (“102” → “102/41”, “7 2” → “7/2”); kind: "name" — a former city name (“актюбинск” → “актобе”); kind: "unit" — a number after the house number was read as an apartment (“46А 12” → “46А, кв. 12”) |
requested_unit | string | Apartment or office number from the input. Present only when the input had one |
unit_status | string | Whether the requested_unit unit exists for the building in the Address Register: found, not_found, no_data or ambiguous. Only when the address is found down to the building. See Apartment and office |
locality_relation | string | Only on results of the country-wide search — in /parse/extended and in /parse with a search block — when the string contains a place name: same, descendant or none |
type values
| type | Meaning | What to do |
|---|---|---|
exact | Everything matched the register directly | Accept |
alias | The street was found by another spelling of its name or by a duplicate record in the register | Accept |
corrected | Something in the input was corrected: a typo, the house number, the apartment or a city name; listed in corrections | Accept; spot-check in bulk processing |
ambiguous | Several objects fit equally well; the first is the best ranked | Request top_k above 1 and show the options, or clarify the address |
partial | Part of the input was not found or not read: the answer may be less detailed than the query, or reach the building with the leftover in unmatched. It also comes with an empty unmatched, when the string had no city and the service chose one. The reason is then in the search block, see The extended parameter | Do not treat the address as confirmed; check unmatched and search |
When several values apply, type shows the strictest in the order partial → ambiguous → corrected → alias → exact. For example, a typo in an ambiguous address gives ambiguous, while the correction stays visible in corrections:
{
"level": "house",
"type": "ambiguous",
"ambiguous": true,
"unmatched": [],
"corrections": [
{
"original": "алмаиы",
"replacement": "алматы"
}
]
}{
"level": "house",
"type": "corrected",
"ambiguous": false,
"unmatched": [],
"corrections": [
{
"original": "102",
"replacement": "102/41",
"kind": "house"
}
]
}match.level is "house" and match.type is not "partial".All response fields
Every field the API returns, by response and object. Details are in the endpoint sections. Fields marked “soon” currently return null when requested with include.
| Field | Type | Description |
|---|---|---|
/parse, /parse/region, /parse/city response | ||
query | string | The query string as sent |
results | array | Result objects, best first |
scope | object | null | How scope was understood, see the fields below |
scope_conflict | boolean | null | The query names a city outside scope |
search | object | null | How the country-wide search took part; null when the answer is a regular parse. Always null in /parse/region and /parse/city. See The extended parameter |
search.role | string | filled, replaced, appended or reordered |
search.mode | string | streets, scope or unit; the other fields of the block are as in /parse/extended below |
search.superseded | object | null | The replaced answer of the regular parse: level, type, full_path_rus, full_path_kaz |
search.engine_type | string | null | The answer type in the country-wide search when match.type lowers it to partial |
/parse/extended response | ||
search | object | How the string was read; present in every response, without role, superseded and engine_type. The other fields are as in /parse. See /parse/extended |
search.mode | string | streets, scope, unit, units or context |
search.streets, search.localities | integer | null | How many streets matched by name and in how many localities |
search.complete | boolean | false — some candidates were not checked because of a limit |
search.dropped | string[] | Words of the string that did not make it into the street name of the answer |
search.place | string | null | The unit named in the string |
search.hypothesis | string | null | The winning reading: H0, H1, S0, U and others |
results[].match.locality_relation | string | same, descendant or none; only when a place is named |
/parse/batch response | ||
count | integer | Number of addresses |
items[].address | string | The address from the request |
items[].results | array | Result objects for this address |
items[].scope_conflict | boolean | null | The scope_conflict flag for this address |
scope | object | null | How scope was understood, shared by the batch |
/lookup response | ||
query | string | The query string |
matched_by | string | postcode, rca or old_postcode |
house_count | integer | How many buildings in the register carry this code |
results | array | Result objects; match is null |
/nearby response | ||
query.lat, query.lon | number | The query point |
results | array | Result objects, nearest first |
results[].distance_m | number | Distance from the query point, m |
results[].shared_point | integer | How many buildings sit at the same point |
/suggest, /suggest/compact, /suggest/region, /suggest/city, /suggest/extended, /suggest/compact/extended response | ||
search | object | null | In /suggest and /suggest/compact — how the country-wide search took part, as in /parse, plus the merged role; null when the suggestions are regular. Always null in /suggest/region and /suggest/city. In /suggest/extended and /suggest/compact/extended — the same block as in /parse/extended, always present |
query | string | The query string |
suggestions[].kind | string | region, city, district, area, locality, street, house, address, and with units=true — apartment |
suggestions[].uid | integer | null | Internal object identifier |
suggestions[].text_ru, suggestions[].text_kz | string | Address line in Russian and Kazakh |
suggestions[].point | [lon, lat] | House coordinate or [null, null] |
scope | object | null | How scope was understood |
| Result object | ||
hierarchy | array | Nodes from the country down to the building, or to the unit with include=apartment; see below |
full_path_rus, full_path_kaz | string | The full address as one line |
point | [lon, lat] | Building coordinate or [null, null] |
match | object | null | Match quality, see below |
market | object | Prices per m², with include=prices |
type: "ats" node — administrative unit | ||
type, kind | string | ats; country, region, district, city, area or locality |
name_ru, name_kz | string | Name |
type_ru, type_kz | string | Unit type |
rco | integer | null | RCO |
cato | integer | null | KATO |
geometrysoon | object | null | Boundary, with include=region_polygon or city_polygon |
type: "geo" node — street or area | ||
type, kind | string | geo; street or area |
name_ru, name_kz, type_ru, type_kz | string | Name and type |
rco | integer | RCO |
cato | null | Always null |
type: "building" node — building | ||
type, kind | string | building; main, corpus or block |
number | string | Number as in the register |
type_ru, type_kz | string | “Дом”, “Здание”… |
rca | integer | RCA |
cadastre_number | string | null | Cadastral number of the building |
land_cadastre_number | string | null | Cadastral number of the land plot |
postcode | string | null | New postcode |
oldPostcode | string | null | Old postcode, 6 digits |
geometrysoon | object | null | Building footprint, with include=building_polygon |
year_built | integer | null | Year built, with include=building_info |
floors | integer | null | Floor count, with include=building_info |
complex_name | string | null | Residential complex name, with include=building_info |
flats_count | integer | null | Number of flats, with include=building_info |
non_residential_count | integer | null | Number of non-residential premises, with include=building_info |
type: "apartment" node — apartment or office, with include=apartment | ||
type, kind | string | apartment; flat, room, non_residential, office or built_in |
number | string | Number as in the register |
rca | integer | string | Unit RCA with extra access, otherwise "*****" |
type_ru, type_kz | string | “Квартира”, “Нежилое помещение”… |
match object | ||
level | string | How deep the address was found |
type | string | exact, alias, corrected, ambiguous or partial |
ambiguous | boolean | Several objects fit equally well |
unmatched | string[] | What from the input was not found |
corrections[].original, corrections[].replacement | string | What was corrected and what it became |
corrections[].kind | string | house — the house number was replaced with the register record, name — a former city name, unit — a number after the house number was read as an apartment; absent for a typo |
requested_unit | string | Apartment or office from the input; only when present |
unit_status | string | found, not_found, no_data or ambiguous; only with requested_unit and an address down to the building |
locality_relation | string | same, descendant or none; only on results of the country-wide search |
scope object | ||
uid | integer | Internal unit identifier |
kato | integer | KATO |
name_ru, name_kz, type_ru, type_kz | string | Name and type |
matched_by | string | name, kato or uid |
market object | ||
sale_m2, rent_m2 | integer | null | Sale and rent: median, tenge per m² |
sale_source, rent_source | string | null | Price source: house, complex, street or null |
| Error | ||
detail | string | array | Reason for the error |
detail[].type, detail[].loc, detail[].msg | string, array, string | For parameter errors: error kind, field and reason |
Valid regions
The 20 scope values for /parse/region and /suggest/region. Use the Russian or Kazakh name, or the KATO code.
| Name | Kazakh | KATO | Type |
|---|---|---|---|
| Алматы | Алматы | 750000000 | City of national significance |
| Астана | Астана | 710000000 | City of national significance |
| Шымкент | Шымкент | 790000000 | City of national significance |
| Абай | Абай | 100000000 | Region |
| Акмолинская | Ақмола | 110000000 | Region |
| Актюбинская | Ақтөбе | 150000000 | Region |
| Алматинская | Алматы | 190000000 | Region |
| Атырауская | Атырау | 230000000 | Region |
| Восточно-Казахстанская | Шығыс Қазақстан | 630000000 | Region |
| Жамбылская | Жамбыл | 310000000 | Region |
| Жетысуская | Жетісу | 330000000 | Region |
| Западно-Казахстанская | Батыс Қазақстан | 270000000 | Region |
| Карагандинская | Қарағанды | 350000000 | Region |
| Костанайская | Қостанай | 390000000 | Region |
| Кызылординская | Қызылорда | 430000000 | Region |
| Мангистауская | Маңғыстау | 470000000 | Region |
| Павлодарская | Павлодар | 550000000 | Region |
| Северо-Казахстанская | Солтүстік Қазақстан | 590000000 | Region |
| Туркестанская | Түркістан | 610000000 | Region |
| Улытауская | Ұлытау | 620000000 | Region |
Valid cities
scope values for /parse/city and /suggest/city, grouped by region. Use the Russian or Kazakh name, or the KATO code. /parse and /suggest also accept any other administrative unit — district, rural district, village — by name or KATO.
| City | Kazakh | KATO | Significance |
|---|---|---|---|
| Cities of national significance | |||
| Алматы | Алматы | 750000000 | national |
| Астана | Астана | 710000000 | national |
| Шымкент | Шымкент | 790000000 | national |
| Abai Region | |||
| Курчатов | Курчатов | 101810000 | regional |
| Семей | Семей | 101010000 | regional |
| Аягоз | Аягөз | 103620100 | district |
| Шар | Шар | 104221100 | district |
| Akmola Region | |||
| Кокшетау | Көкшетау | 111010000 | regional |
| Косшы | Косшы | 111610000 | regional |
| Степногорск | Степногорск | 111810000 | regional |
| Акколь | Ақкөл | 113220100 | district |
| Атбасар | Атбасар | 113820100 | district |
| Державинск | Державин | 115420100 | district |
| Ерейментау | Ерейментау | 114620100 | district |
| Есиль | Есіл | 114820100 | district |
| Макинск | Макинск | 114020100 | district |
| Степняк | Степняк | 114520100 | district |
| Щучинск | Щучинск | 117020100 | district |
| Aktobe Region | |||
| Актобе | Ақтөбе | 151010000 | regional |
| Алга | Алға | 153220100 | district |
| Жем | Жем | 154825100 | district |
| Кандыагаш | Қандыағаш | 154820100 | district |
| Темир | Темір | 155621100 | district |
| Хромтау | Хромтау | 156020100 | district |
| Шалкар | Шалқар | 156420100 | district |
| Эмба | Ембі | 154823100 | district |
| Almaty Region | |||
| Алатау | Алатау | 191810000 | regional |
| Конаев (Кунаев, Капчагай) | Қонаев | 191010000 | regional |
| Есик | Есік | 194020100 | district |
| Каскелен | Қаскелең | 195220100 | district |
| Талгар | Талғар | 196220100 | district |
| Atyrau Region | |||
| Атырау | Атырау | 231010000 | regional |
| Кульсары | Құлсары | 233620100 | district |
| East Kazakhstan Region | |||
| Риддер | Риддер | 632410000 | regional |
| Усть-Каменогорск | Өскемен | 631010000 | regional |
| Алтай | Алтай | 634820100 | district |
| Зайсан | Зайсан | 634620100 | district |
| Серебрянск | Серебрянск | 634821100 | district |
| Шемонаиха | Шемонаиха | 636820100 | district |
| Jambyl Region | |||
| Тараз | Тараз | 311010000 | regional |
| Жанатас | Жаңатас | 316020100 | district |
| Каратау | Қаратау | 316220100 | district |
| Шу | Шу | 316621100 | district |
| Jetisu Region | |||
| Талдыкорган | Талдықорған | 331010000 | regional |
| Текели | Текелі | 331810000 | regional |
| Жаркент | Жаркент | 334620100 | district |
| Саркан | Сарқан | 334820100 | district |
| Ушарал | Үшарал | 333420100 | district |
| Уштобе | Үштөбе | 334420100 | district |
| West Kazakhstan Region | |||
| Уральск | Орал | 271010000 | regional |
| Аксай | Ақсай | 273620100 | district |
| Karaganda Region | |||
| Балхаш | Балқаш | 351610000 | regional |
| Караганда | Қарағанды | 351010000 | regional |
| Приозерск | Приозерск | 352110000 | regional |
| Сарань | Саран | 352210000 | regional |
| Темиртау | Теміртау | 352410000 | regional |
| Шахтинск | Шахтинск | 352810000 | regional |
| Абай | Абай | 353220100 | district |
| Каркаралинск | Қарқаралы | 354820100 | district |
| Kostanay Region | |||
| Аркалык | Арқалық | 391610000 | regional |
| Костанай | Қостанай | 391010000 | regional |
| Лисаковск | Лисаковск | 392010000 | regional |
| Рудный | Рудный | 392410000 | regional |
| Житикара | Жітіқара | 394420100 | district |
| Тобыл | Тобыл | 395420100 | district |
| Kyzylorda Region | |||
| Байконыр | Байқоңыр | 431910000 | regional |
| Кызылорда | Қызылорда | 431010000 | regional |
| Аральск | Арал | 433220100 | district |
| Казалинск | Қазалы | 434423100 | district |
| Mangystau Region | |||
| Актау | Ақтау | 471010000 | regional |
| Жанаозен | Жаңаөзен | 471810000 | regional |
| Форт-Шевченко | Форт-Шевченко | 475220100 | district |
| Pavlodar Region | |||
| Аксу | Ақсу | 551610000 | regional |
| Павлодар | Павлодар | 551010000 | regional |
| Экибастуз | Екібастұз | 552210000 | regional |
| North Kazakhstan Region | |||
| Петропавловск | Петропавл | 591010000 | regional |
| Булаево | Булаев | 593620100 | district |
| Мамлютка | Мамлютка | 595220100 | district |
| Сергеевка | Сергеевка | 595620100 | district |
| Тайынша | Тайынша | 596020100 | district |
| Turkistan Region | |||
| Арыс | Арыс | 611610000 | regional |
| Кентау | Кентау | 612010000 | regional |
| Туркестан | Түркістан | 611010000 | regional |
| Жетысай | Жетісай | 613820100 | district |
| Ленгер | Леңгір | 615820100 | district |
| Сарыағаш | Сарыағаш | 615420100 | district |
| Шардара | Шардара | 616420100 | district |
| Ulytau Region | |||
| Жезказган | Жезқазған | 621010000 | regional |
| Каражал | Қаражал | 621810000 | regional |
| Сатпаев | Сәтбаев | 622010000 | regional |
Integrating reliably
- Timeouts and retries. Use a timeout of about 5 seconds. Retry only
429and503, after waitingRetry-After. - Check quality, not just presence. A non-empty
resultsdoes not mean a house was found: look atmatch.levelandmatch.type. For a string without a city/parseby default returns a house in a city of its own choice — with typepartial. - Pass the city you know. If the city or region is a separate field in your data, use
scopeor the level endpoints. The address is then found even when the city is not in the string, and is never confused with a same-named street elsewhere. - Watch
scope_conflict. In bulk processingtrueusually points to an error in the source data. - Large volumes in batches. For a database export use
/parse/batchwith 100 addresses per request, not separate/parsecalls. A batch is always parsed like/parsewithextended=false, so for strings without a city its answer differs from the default/parseanswer, see /parse/batch.
Contacts
- Integration questions, limits, batch access, additional and browser keys: qaida@tenzor-ai.com
- Data and privacy questions: privacy@qaida.io
- Short API description for LLM agents: api.qaida.io/llms.txt