KLADR Address Suggestions Integration

Our company is engaged in the development, support and maintenance of sites of any complexity. From simple one-page sites to large-scale cluster systems built on micro services. Experience of developers is confirmed by certificates from vendors.
Development and maintenance of all types of websites:
Informational websites or web applications
Business card websites, landing pages, corporate websites, online catalogs, quizzes, promo websites, blogs, news resources, informational portals, forums, aggregators
E-commerce websites or web applications
Online stores, B2B portals, marketplaces, online exchanges, cashback websites, exchanges, dropshipping platforms, product parsers
Business process management web applications
CRM systems, ERP systems, corporate portals, production management systems, information parsers
Electronic service websites or web applications
Classified ads platforms, online schools, online cinemas, website builders, portals for electronic services, video hosting platforms, thematic portals

These are just some of the technical types of websites we work with, and each of them can have its own specific features and functionality, as well as be customized to meet the specific needs and goals of the client.

Our competencies:
Development stages
Latest works
  • image_website-b2b-advance_0.png
    B2B ADVANCE company website development
    1212
  • image_web-applications_feedme_466_0.webp
    Development of a web application for FEEDME
    1161
  • image_websites_belfingroup_462_0.webp
    Website development for BELFINGROUP
    852
  • image_ecommerce_furnoro_435_0.webp
    Development of an online store for the company FURNORO
    1041
  • image_crm_enviok_479_0.webp
    Development of a web application for Enviok
    822
  • image_bitrix-bitrix-24-1c_fixper_448_0.png
    Website development for FIXPER company
    815

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.