DaData is an SDK designed to facilitate easy interaction with the DaData API, allowing seamless integration of DaData functionalities within your Laravel applications. This package supports address and company data management for Russia, Belarus, and Kazakhstan. movemoveapp/laravel-dadata2
is the second version of the original movemoveapp/laravel-dadata package, built with a new and improved approach.
This version addresses a wide range of bugs and issues discovered in the first release, offering a more stable and maintainable integration with the DaData API.
Note
The original movemoveapp/laravel-dadata package is no longer maintained and should not be used in new projects.
- Easy integration with the DaData API.
- Support for handling addresses and company data across Russia, Belarus, and Kazakhstan.
- Compatible with Laravel 10 and 11, PHP version 8.
Install the package via Composer:
composer require movemoveapp/laravel-dadata2
After installing the package, you need to register the DaData service provider.
Up to and including Laravel 10, add the following line to the providers array in your config/app.php
file:
...
'providers' => [
...
MoveMoveApp\DaData\DaDataServiceProvider::class,
...
]
From Laravel versions 11 and above, you may edit bootstrap/providers.php
file:
<?php
return [
...
MoveMoveApp\DaData\DaDataServiceProvider::class,
];
After installation, publish the configuration file to set up the package with Laravel:
php artisan vendor:publish --provider='MoveMoveApp\DaData\DaDataServiceProvider'
Once the configuration file is published, you can set up your DaData credentials in your .env
file. Obtain your API key and secret key from the DaData dashboard and set them as follows:
...
DADATA_KEY=your_dadata_api_key_here
DADATA_SECRET_KEY=your_dadata_secret_key_here
These keys will allow your application to authenticate requests to the DaData API.
This facade provides powerful tools to search, validate, and autocomplete Russian legal entities and individual entrepreneurs (IEs) based on data from the official Russian registries (EGRUL and EGRIP).
It helps to:
- Autocomplete company names, INNs, or addresses while typing;
- Narrow results by region, status, type, or industry (OKVED);
- Speed up user input and reduce errors in forms or business logic;
- Get full company details (registration data, address, management, etc.).
- Perfect for autofill scenarios, client onboarding forms, or integration with enterprise directories.
Use this facade to search and autocomplete legal entities and individual entrepreneurs by name, INN, OGRN, address, or director name.
use MoveMoveApp\DaData\Facades\DaDataOrganization;
DaDataOrganization::suggestOrganization([
'query' => 'мувмув'
]);
Parameter | Type | Description |
---|---|---|
query |
string | Search string (required). Could be a name, INN, OGRN, address, etc. |
count |
integer | Max number of results to return (default: 10, max: 20). |
type |
string | Organization type: LEGAL (legal entity) or INDIVIDUAL (entrepreneur). |
status |
array | Filter by status: ACTIVE , LIQUIDATING , LIQUIDATED , BANKRUPT , etc. |
okved |
string | Filter by OKVED code (business activity code). |
locations |
array | Filter results by location (e.g. region, city). |
locations_boost |
array | Prioritize results in certain locations. |
DaDataOrganization::suggestOrganization([
'query' => 'авто',
'count' => 5,
'type' => 'LEGAL',
'status' => ['ACTIVE'],
'okved' => '45.11',
'locations' => [['region' => 'Москва']],
'locations_boost' => [['region' => 'Москва']]
]);
Use this method to retrieve exact information about a Russian company or individual entrepreneur by INN, OGRN, or full name. Unlike the general suggestions, this method performs a precise match and returns full organization data — perfect for backend checks, form validation, or compliance workflows.
use MoveMoveApp\DaData\Facades\DaDataOrganization;
DaDataOrganization::findRussianOrganization([
'query' => (string) $innOrOgrn,
'count' => (int) $limit, // optional, default 1
'kpp' => (string) $kpp, // optional
'branch_type' => 'MAIN'|'BRANCH', // optional
'type' => 'LEGAL'|'INDIVIDUAL', // optional
'status' => ['ACTIVE', 'LIQUIDATED'], // optional
]);
Parameter | Type | Description |
---|---|---|
query |
string |
Required. INN, OGRN, or full name of the legal entity or sole trader. |
count |
integer |
Number of results to return (default: 1, max: 20). |
kpp |
string |
KPP code — helps narrow down the branch when searching by INN. |
branch_type |
string |
Branch type: MAIN (head office), BRANCH (subsidiary/branch). |
type |
string |
Organization type: LEGAL (legal entity), INDIVIDUAL (sole proprietor). |
status |
array |
Filter by organization status: ACTIVE , LIQUIDATED , LIQUIDATING , etc. |
The following data types can be standardized (cleaned):
use MoveMoveApp\DaData\Facades\DaDataCleaner;
DaDataCleaner::address('Красная площадь, дом 1');
- Parses full address into structured fields (region, city, street, house, flat)
- Provides postal code using Russian Post data
- Identifies coordinates (geocoding)
- Detects district, metro station, apartment price and area
- Returns KLADR, FIAS (GAR), OKATO, OKTMO, and tax office codes
- Identifies cadastral number (Russia only)
use MoveMoveApp\DaData\Facades\DaDataCleaner;
DaDataCleaner::name('иванов иван');
- Fixes typos and transliteration
- Detects gender
- Provides grammatical inflection
use MoveMoveApp\DaData\Facades\DaDataCleaner;
DaDataCleaner::phone('+7 (999) 123-45-67');
- Validates phone number
- Corrects city code (DEF-code)
- Determines mobile operator (with MNP support)
- Detects country, region, city, timezone
use MoveMoveApp\DaData\Facades\DaDataCleaner;
DaDataCleaner::passport('1234 567890');
- Validates format
- Checks against invalid passports registry
use MoveMoveApp\DaData\Facades\DaDataCleaner;
DaDataCleaner::email('ivan@yande.ru');
- Validates email format
- Fixes common typos
- Detects disposable emails
- Classifies as personal, corporate, or role-based
use MoveMoveApp\DaData\Facades\DaDataCleaner;
DaDataCleaner::vehicle('Форд Фокус');
- Recognizes car make and model
Use this facade to implement autocomplete features in forms or UIs. All methods require a query key in the input array.
use MoveMoveApp\DaData\Facades\DaDataSuggestions;
DaDataSuggestions::name(['query' => 'иван']);
- Helps users quickly enter full names in forms
- Suggests surname, first name, and patronymic combinations
- Detects gender
use MoveMoveApp\DaData\Facades\DaDataSuggestions;
DaDataSuggestions::passport(['query' => '770-']);
- Suggests issuing authorities for Russian passports
- Supports autocomplete for FMS unit codes
use MoveMoveApp\DaData\Facades\DaDataSuggestions;
DaDataSuggestions::email(['query' => 'ivan@yand']);
- Autocompletes email addresses based on popular domains
- Useful for form inputs with typo correction
use MoveMoveApp\DaData\Facades\DaDataSuggestions;
DaDataSuggestions::carBrand(['query' => 'фо']);
- Suggests car makes and models
- Useful for auto-selection interfaces
use MoveMoveApp\DaData\Facades\DaDataSuggestions;
DaDataSuggestions::bank(['query' => 'сбербанк']);
- Suggests banks by name, BIK, SWIFT, INN, or correspondent account
- Returns complete bank info (address, status, license)
use MoveMoveApp\DaData\Facades\DaDataSuggestions;
DaDataSuggestions::bankById(['query' => '044525225']);
- Searches bank by exact BIK, SWIFT, INN, or correspondent account
- Use when you already have the identifier, not for autocomplete