FIAS Address Autocomplete Integration for Websites

Every tenth order in an online store is lost due to an incorrectly entered address. According to <cite>DataInsight research</cite>, up to 15% of shipments fail to reach the recipient on the first attempt — most often due to address errors. The user doesn't know the exact street, confuses the distric

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:

Frequently Asked Questions

Latest works

  • image_web-applications_feedme_466_0.webp
    Development of a web application for FEEDME
    1281
  • image_ecommerce_furnoro_435_0.webp
    Development of an online store for the company FURNORO
    1237
  • image_crm_enviok_479_0.webp
    Development of a web application for Enviok
    977
  • image_crm_chasseurs_493_0.webp
    CRM development for Chasseurs
    1026
  • image_website-sbh_0.webp
    Website development for SBH Partners
    1103
  • image_website-_0.webp
    Website development for Red Pear
    550

Every tenth order in an online store is lost due to an incorrectly entered address. According to DataInsight research, up to 15% of shipments fail to reach the recipient on the first attempt — most often due to address errors. The user doesn't know the exact street, confuses the district, or omits the building number. We solve this with address autocomplete based on FIAS. Our experience includes 5+ years and 20+ successful projects, with an average 50% reduction in address errors. We offer two approaches: the cloud service DaData or your own infrastructure on PostgreSQL. A custom server pays off at a load of 5,000 requests per day and can be 3x cheaper than DaData at high volumes. Let's dive into the technical details: from loading dumps to frontend. We use delta updates, GIN indexes, and caching.

How to Integrate FIAS Without Intermediaries?

Direct integration is justified in three cases: security requirements prevent sending addresses to external APIs, high load is expected (tens of thousands of requests per day), or custom search logic is needed. Otherwise, it's simpler and cheaper to use DaData.

Obtaining and Loading Dumps

Current dumps are published on the official FIAS website. The full database (XML, several dozen archives, total compressed size about 2 GB) and delta updates (weekly) are available. The GAR format differs slightly, but the principles are the same.

Minimum set of tables for address autocomplete:

  • AS_ADDR_OBJ — regions, districts, cities, streets
  • AS_HOUSES — buildings, structures, blocks
  • AS_HIERARCHY — hierarchical relationships of objects
  • AS_ADDR_OBJ_PARAMS — additional parameters (postal index)

The first load of the full dump into PostgreSQL via a PHP script or Python parser takes 3–6 hours. Delta updates take 10–30 minutes.

Table Structure and Indexes

CREATE TABLE addr_obj ( id UUID PRIMARY KEY, object_id BIGINT, name TEXT NOT NULL, type_name TEXT, level SMALLINT, is_active BOOLEAN DEFAULT true ); CREATE TABLE houses ( id UUID PRIMARY KEY, object_id BIGINT, addr_obj_id BIGINT, house_num TEXT, build_num TEXT, struct_num TEXT, is_active BOOLEAN DEFAULT true ); CREATE INDEX idx_addr_obj_name_fts ON addr_obj USING GIN (to_tsvector('russian', name)); CREATE INDEX idx_hierarchy_parent ON hierarchy(parent_obj_id); CREATE INDEX idx_hierarchy_child ON hierarchy(object_id); 

Without a GIN index, searching through 30+ million records would be unbearably slow. The PostgreSQL documentation on GIN indexes recommends this approach for full-text search in Russian.

FIAS API for Suggestions

A simple endpoint in PHP/Laravel that accepts a string and returns a list of options — our FIAS API implementation:

public function suggest(Request $request): JsonResponse { $query = trim($request->input('q', '')); if (mb_strlen($query) < 2) { return response()->json([]); } $results = DB::select(" SELECT ao.name, ao.type_name, ao.level, h.path_name FROM addr_obj ao JOIN addr_hierarchy h ON h.object_id = ao.object_id WHERE to_tsvector('russian', ao.name) @@ plainto_tsquery('russian', ?) AND ao.is_active = true ORDER BY ao.level, ao.name LIMIT 10 ", [$query]); return response()->json($results); } 

For house input, the query is more complex — you first need to find the street by its object_id, then search for houses by addr_obj_id. In our practice, the average execution time for such a compound query does not exceed 80 ms after cache warm-up.

Frontend: Connecting Autocomplete for Address Form Autofill

On the browser side, standard debounce + fetch logic:

let timer; input.addEventListener('input', () => { clearTimeout(timer); timer = setTimeout(async () => { const q = input.value.trim(); if (q.length < 2) return; const res = await fetch(`/api/fias/suggest?q=${encodeURIComponent(q)}`); const data = await res.json(); renderDropdown(data); }, 250); }); 

The 250 ms delay prevents a request on every keystroke. To improve UX, we add a loading indicator and handle errors — the user should never see an empty dropdown on network failure.

When Is Your Own Infrastructure Justified?

Let's compare the approaches:

Criterion Custom FIAS Server DaData
Data control Full Limited
Infrastructure requirements Server 8 GB RAM, 50 GB SSD None
Deployment time 1–2 days for initial load Several hours
Data updates Automatic via deltas Automatic

If the request volume is high, your own server is cheaper in the long run — a custom FIAS server is up to 3x cheaper than DaData at 10,000 requests/day.

API Performance

Parameter Value
Number of records in full dump ~30 million
Database size (with indexes) ~10 GB
Average query time (simple suggestions) <30 ms
Average query time (with hierarchy) <80 ms
Full dump load time 3–6 hours

Process

  1. Requirements analysis — determine load, need for closed network, choose approach.
  2. Infrastructure preparation — set up server (Linux, PostgreSQL, Docker) or connect to DaData.
  3. Dump loading and indexing — load full FIAS/GAR dump, create GIN indexes.
  4. REST API development — implement endpoint for suggestions with hierarchy.
  5. Frontend integration — connect AJAX requests to FIAS API, set up debounce and rendering.
  6. Auto-update — configure cron for daily download and application of deltas.
  7. Testing and documentation — verify correctness of suggestions, write API documentation.

What's Included in the Work

  • Integration documentation (API spec, table descriptions)
  • API access (if deployed on your server) or instructions for connecting to DaData
  • Auto-update scripts
  • Technical support for 2 weeks after launch
  • Developer training on working with the solution

Typical Mistakes in Self-Integration

Common mistakes when integrating yourself
  • Loading an incomplete set of tables — missing AS_HIERARCHY, so you can't build the region→city→street chain
  • Missing full-text index — search slows down to 10 seconds
  • Ignoring delta updates — data becomes outdated, users see incorrect addresses
  • Incorrect input normalization — e.g., not handling cases ("Moscow" doesn't find "Moscow" in some forms)

We guarantee that after our work, autocomplete functions correctly, without lags, and with up-to-date data. Our Laravel FIAS integration packages are available for quick deployment. Get a consultation — contact us.

Timeline and Cost

Estimated timeline — 3 to 7 business days, depending on complexity. Cost is calculated individually. Typical cost for a custom FIAS server setup starts at $500, with annual savings of up to $2,000 compared to DaData. Request a project evaluation within one day — we will prepare a commercial proposal.