KLADR Integration for Address Suggestions on Website
KLADR (Classifier of Russian Addresses) — older address base standard compared to FIAS/GAR. Formally considered obsolete: FTS stopped updating it, recommending migration to FIAS. Yet in practice KLADR still found in projects — especially with banking and government systems not yet migrated. DaData supports both standards, returns KLADR codes in response alongside FIAS identifiers.
KLADR Structure
KLADR database distributed as DBF format. Main files:
| File | Content |
|---|---|
KLADR.DBF |
Regions, districts, cities, settlements |
STREET.DBF |
Streets |
HOUSE.DBF |
Houses |
DOMA.DBF |
Additional house data |
KLADR codes strict structure: 13 digits for settlements, 17 — for streets. By code can uniquely restore address hierarchy.
Loading to Database
Convert DBF to PostgreSQL via Python:
import dbfread
import psycopg2
conn = psycopg2.connect("dbname=mydb user=myuser")
cur = conn.cursor()
table = dbfread.DBF('KLADR.DBF', encoding='cp866')
for record in table:
cur.execute(
"INSERT INTO kladr_objects (code, name, socr, index, gninmb, uno, ocatd, status) "
"VALUES (%s, %s, %s, %s, %s, %s, %s, %s)",
(
record['CODE'], record['NAME'], record['SOCR'],
record['INDEX'], record['GNINMB'], record['UNO'],
record['OCATD'], record['STATUS']
)
)
conn.commit()
DBF file encoding — CP866, without explicit specification get gibberish. Full base about 1–2 GB, loading takes 20–40 minutes.
Search in KLADR
After loading, table structure allows searching by NAME field with active record trimming (code shouldn't end with zeros after certain position — sign of obsolete record):
SELECT
k.name,
k.socr,
k.code,
k.index AS postcode
FROM kladr_objects k
WHERE
k.name ILIKE :query || '%'
AND k.code NOT LIKE '%00000'
ORDER BY k.name
LIMIT 10;
For streets, query similar, but from kladr_streets table with JOIN to kladr_objects by first 13 code digits.
When KLADR, Not FIAS
Several scenarios where KLADR code needed in principle:
- Banking API integration (many banks still accept only KLADR codes for legal address verification)
- Old-form FTS systems
- Some transport companies and logistics operators
In such cases, correct strategy — get address via modern interface (DaData with FIAS), in response take kladr_id field, which DaData returns for each address object.
{
"value": "г Москва, ул Тверская, д 1",
"data": {
"kladr_id": "7700000000000360004",
"fias_id": "5ee84ac0-eb57-4bff-b753-3e0f1ca1b95e",
"postal_code": "125009"
}
}
Thus, user enters address in modern interface, database saves both identifiers.
Timeline
If task — connect KLADR suggestions via own database, full cycle (loading, indexing, API, frontend) takes 1 working day. If KLADR codes needed only for compatibility with external systems, interface built on DaData — enough half day on field mapping setup.







