{"id":28648923,"url":"https://github.com/movemoveapp/laravel-dadata2","last_synced_at":"2025-06-13T04:09:26.869Z","repository":{"id":276589375,"uuid":"929708902","full_name":"movemoveapp/laravel-dadata2","owner":"movemoveapp","description":"PHP SDK Laravel пакет работы с сервисом DaData.ru, для исправления синтаксических ошибок в информации контактных данных клиентов сайта и вывода подсказок поля форм.","archived":false,"fork":false,"pushed_at":"2025-05-27T19:13:42.000Z","size":89,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-27T19:52:36.508Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/movemoveapp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-02-09T07:34:30.000Z","updated_at":"2025-05-27T19:11:57.000Z","dependencies_parsed_at":null,"dependency_job_id":"2e151192-53a8-437a-8bd6-70de9c5772ed","html_url":"https://github.com/movemoveapp/laravel-dadata2","commit_stats":null,"previous_names":["botgun/laravel-dadata","movemoveapp/laravel-dadata2"],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/movemoveapp/laravel-dadata2","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/movemoveapp%2Flaravel-dadata2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/movemoveapp%2Flaravel-dadata2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/movemoveapp%2Flaravel-dadata2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/movemoveapp%2Flaravel-dadata2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/movemoveapp","download_url":"https://codeload.github.com/movemoveapp/laravel-dadata2/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/movemoveapp%2Flaravel-dadata2/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259578274,"owners_count":22879221,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-06-13T04:09:24.281Z","updated_at":"2025-06-13T04:09:26.863Z","avatar_url":"https://github.com/movemoveapp.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# \u003ca href=\"https://MoveMoveApp.ru/\" target=\"_blank\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/121749444?s=400\u0026u=682a6bac6ba993a2a90ec220cfa205540d9d684b\u0026v=4\" width=\"20\"\u003e\u003c/a\u003e DaData Laravel SDK Package\n[![Latest Stable Version](http://poser.pugx.org/movemoveapp/laravel-dadata2/v)](https://packagist.org/packages/movemoveapp/laravel-dadata2)\n[![Total Downloads](http://poser.pugx.org/movemoveapp/laravel-dadata2/downloads)](https://packagist.org/packages/movemoveapp/laravel-dadata2)\n[![Latest Unstable Version](http://poser.pugx.org/movemoveapp/laravel-dadata2/v/unstable)](https://packagist.org/packages/movemoveapp/laravel-dadata2)\n[![License](http://poser.pugx.org/movemoveapp/laravel-dadata2/license)](https://packagist.org/packages/movemoveapp/laravel-dadata2)\n[![PHP Version Require](http://poser.pugx.org/movemoveapp/laravel-dadata2/require/php)](https://packagist.org/packages/movemoveapp/laravel-dadata2)\n\nDaData 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](https://github.com/movemoveapp/laravel-dadata) package, built with a new and improved approach.\n\nThis 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.\n\n\u003e **Note**  \n\u003e The original [movemoveapp/laravel-dadata](https://github.com/movemoveapp/laravel-dadata) package is no longer maintained and should not be used in new projects.\n\n\n- [Features](#features)\n- [Installation](#installation)\n  - [Register the Service Provider](#register-the-service-provider)\n  - [Publish the Configuration](#publish-the-configuration)\n- [Configuration](#configuration) \n- [API](#api)\n  - [Organization](#organization)\n    - [Organization Suggestion](#organization-suggestion)\n    - [Find Russian Organization](#find-russian-organization)\n  - [Cleaner Methods](#cleaner-methods)\n    - [Address Standardization](#address-standardization)\n    - [Name Standardization](#name-standardization)\n    - [Phone Standardization](#phone-standardization)\n    - [Passport Standardization](#passport-standardization)\n    - [Email Standardization](#email-standardization)\n    - [Vehicle Standardization](#vehicle-standardization)\n  - [Suggestion Methods](#suggestion-methods)\n    - [Name Suggestion](#name-suggestion)\n    - [Passport Unit Suggestion](#passport-unit-suggestion)\n    - [Email Suggestion](#email-suggestion)\n    - [Car Brand Suggestion](#car-brand-suggestion)\n    - [Bank Suggestion](#bank-suggestion)\n    - [Bank Lookup by ID](#bank-lookup-by-id)\n  \n\n# Features\n\n - Easy integration with the DaData API.\n - Support for handling addresses and company data across Russia, Belarus, and Kazakhstan.\n - Compatible with Laravel 10 and 11, PHP version 8.\n\n# Installation\n\nInstall the package via Composer:\n\n```shell\ncomposer require movemoveapp/laravel-dadata2\n```\n\n## Register the Service Provider\nAfter installing the package, you need to register the DaData service provider.\n\nUp to and including Laravel 10, add the following line to the providers array in your `config/app.php` file:\n\n```php\n...\n'providers' =\u003e [\n    ...\n    MoveMoveApp\\DaData\\DaDataServiceProvider::class,\n    \n    ...\n]\n```\n\nFrom Laravel versions 11 and above, you may edit `bootstrap/providers.php` file:\n\n```php\n\u003c?php\n\nreturn [\n    ...\n    MoveMoveApp\\DaData\\DaDataServiceProvider::class,\n];\n\n```\n\n## Publish the Configuration\n\nAfter installation, publish the configuration file to set up the package with Laravel:\n\n```shell\nphp artisan vendor:publish --provider='MoveMoveApp\\DaData\\DaDataServiceProvider'\n```\n\n# Configuration\n\nOnce 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:\n\n```php\n...\n\nDADATA_KEY=your_dadata_api_key_here\nDADATA_SECRET_KEY=your_dadata_secret_key_here\n```\n\nThese keys will allow your application to authenticate requests to the [DaData API](https://dadata.ru/profile/#info).\n\n# API\n\n## Organization\n\nThis 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).\n\nIt helps to:\n\n- Autocomplete company names, INNs, or addresses while typing;\n- Narrow results by region, status, type, or industry (OKVED);\n- Speed up user input and reduce errors in forms or business logic;\n- Get full company details (registration data, address, management, etc.).\n- Perfect for autofill scenarios, client onboarding forms, or integration with enterprise directories.\n\n### Organization Suggestion\n\nUse this facade to search and autocomplete legal entities and individual entrepreneurs by name, INN, OGRN, address, or director name.\n\n#### Basic Usage\n\n```php\nuse MoveMoveApp\\DaData\\Facades\\DaDataOrganization;\n\nDaDataOrganization::suggestOrganization([\n    'query' =\u003e 'мувмув'\n]);\n\n```\n\n#### Supported Parameters\n\n| Parameter         | Type    | Description                                                               |\n| ----------------- | ------- | ------------------------------------------------------------------------- |\n| `query`           | string  | Search string (required). Could be a name, INN, OGRN, address, etc.       |\n| `count`           | integer | Max number of results to return (default: 10, max: 20).                   |\n| `type`            | string  | Organization type: `LEGAL` (legal entity) or `INDIVIDUAL` (entrepreneur). |\n| `status`          | array   | Filter by status: `ACTIVE`, `LIQUIDATING`, `LIQUIDATED`, `BANKRUPT`, etc. |\n| `okved`           | string  | Filter by OKVED code (business activity code).                            |\n| `locations`       | array   | Filter results by location (e.g. region, city).                           |\n| `locations_boost` | array   | Prioritize results in certain locations.                                  |\n\n\n#### Example with Advanced Filters\n\n````php\nDaDataOrganization::suggestOrganization([\n    'query'             =\u003e 'авто',\n    'count'             =\u003e 5,\n    'type'              =\u003e 'LEGAL',\n    'status'            =\u003e ['ACTIVE'],\n    'okved'             =\u003e '45.11',\n    'locations'         =\u003e [['region' =\u003e 'Москва']],\n    'locations_boost'   =\u003e [['region' =\u003e 'Москва']]\n]);\n\n````\n\n#### Docs\n\n- [Official DaData documentation on organization suggestions](https://dadata.ru/api/suggest/party/)\n\n### Find Russian Organization\n\nUse 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.\n\n```php\nuse MoveMoveApp\\DaData\\Facades\\DaDataOrganization;\n\nDaDataOrganization::findRussianOrganization([\n    'query'         =\u003e (string) $innOrOgrn,\n    'count'         =\u003e (int) $limit,               // optional, default 1\n    'kpp'           =\u003e (string) $kpp,              // optional\n    'branch_type'   =\u003e 'MAIN'|'BRANCH',            // optional\n    'type'          =\u003e 'LEGAL'|'INDIVIDUAL',       // optional\n    'status'        =\u003e ['ACTIVE', 'LIQUIDATED'],   // optional\n]);\n\n```\n\n#### Supported Parameters\n\n| Parameter     | Type      | Description                                                                |\n| ------------- | --------- | -------------------------------------------------------------------------- |\n| `query`       | `string`  | **Required.** INN, OGRN, or full name of the legal entity or sole trader.  |\n| `count`       | `integer` | Number of results to return (default: 1, max: 20).                         |\n| `kpp`         | `string`  | KPP code — helps narrow down the branch when searching by INN.             |\n| `branch_type` | `string`  | Branch type: `MAIN` (head office), `BRANCH` (subsidiary/branch).           |\n| `type`        | `string`  | Organization type: `LEGAL` (legal entity), `INDIVIDUAL` (sole proprietor). |\n| `status`      | `array`   | Filter by organization status: `ACTIVE`, `LIQUIDATED`, `LIQUIDATING`, etc. |\n\n#### Docs\n\n- [DaData: Find by ID](https://dadata.ru/api/find-party/)\n\n## Cleaner Methods\n\nThe following data types can be standardized (cleaned):\n\n### Address Standardization\n\n```php\nuse MoveMoveApp\\DaData\\Facades\\DaDataCleaner;\n\nDaDataCleaner::address('Красная площадь, дом 1');\n```\n\n#### Features:\n\n- Parses full address into structured fields (region, city, street, house, flat)\n- Provides postal code using Russian Post data\n- Identifies coordinates (geocoding)\n- Detects district, metro station, apartment price and area\n- Returns KLADR, FIAS (GAR), OKATO, OKTMO, and tax office codes\n- Identifies cadastral number (Russia only)\n\n#### Docs\n\n- [Geocoding](https://dadata.ru/api/geocode/)\n- [Cadastral number](https://dadata.ru/api/cadastre-clean/)\n- [Address standardization](https://dadata.ru/api/clean/address/)\n\n### Name Standardization\n\n```php\nuse MoveMoveApp\\DaData\\Facades\\DaDataCleaner;\n\nDaDataCleaner::name('иванов иван');\n```\n\n#### Features:\n\n- Fixes typos and transliteration\n- Detects gender\n- Provides grammatical inflection\n\n#### Docs\n- [Name clean documentation](https://dadata.ru/api/clean/name/)\n\n### Phone Standardization\n\n```php\nuse MoveMoveApp\\DaData\\Facades\\DaDataCleaner;\n\nDaDataCleaner::phone('+7 (999) 123-45-67');\n```\n\n#### Features:\n\n- Validates phone number\n- Corrects city code (DEF-code)\n- Determines mobile operator (with MNP support)\n- Detects country, region, city, timezone\n\n#### Docs\n\n- [Phone clean documentation](https://dadata.ru/api/clean/phone/)\n\n### Passport Standardization\n\n⚠️ Note: Due to issues with the МВД database, data is current as of June 21, 2023.\n\n```php\nuse MoveMoveApp\\DaData\\Facades\\DaDataCleaner;\n\nDaDataCleaner::passport('1234 567890');\n```\n\n#### Features:\n\n- Validates format\n- Checks against invalid passports registry\n\n#### Docs\n\n- [Passport clean documentation](https://dadata.ru/api/clean/passport/)\n\n### Email Standardization\n\n```php\nuse MoveMoveApp\\DaData\\Facades\\DaDataCleaner;\n\nDaDataCleaner::email('ivan@yande.ru');\n```\n\n#### Features:\n\n- Validates email format\n- Fixes common typos\n- Detects disposable emails\n- Classifies as personal, corporate, or role-based\n\n#### Docs \n\n- [Email clean documentation](https://dadata.ru/api/clean/email/)\n\n### Vehicle Standardization\n\n```php\nuse MoveMoveApp\\DaData\\Facades\\DaDataCleaner;\n\nDaDataCleaner::vehicle('Форд Фокус');\n```\n\n#### Features:\n\n- Recognizes car make and model\n\n#### Docs\n- [Vehicle clean documentation](https://dadata.ru/api/clean/vehicle/)\n\n## Suggestion Methods\n\nUse this facade to implement autocomplete features in forms or UIs. All methods require a query key in the input array.\n\n### Name Suggestion\n\n```php\nuse MoveMoveApp\\DaData\\Facades\\DaDataSuggestions;\n\nDaDataSuggestions::name(['query' =\u003e 'иван']);\n```\n\n#### Features:\n\n- Helps users quickly enter full names in forms\n- Suggests surname, first name, and patronymic combinations\n- Detects gender\n\n#### Docs\n- [Name suggestion documentation](https://dadata.ru/api/suggest/name/)\n\n### Passport Unit Suggestion\n\n```php\nuse MoveMoveApp\\DaData\\Facades\\DaDataSuggestions;\n\nDaDataSuggestions::passport(['query' =\u003e '770-']);\n```\n\n#### Features:\n\n- Suggests issuing authorities for Russian passports\n- Supports autocomplete for FMS unit codes\n\n#### Docs\n- [Passport unit suggestion](https://dadata.ru/api/suggest/fms_unit/)\n\n### Email Suggestion\n\n```php\nuse MoveMoveApp\\DaData\\Facades\\DaDataSuggestions;\n\nDaDataSuggestions::email(['query' =\u003e 'ivan@yand']);\n```\n\n#### Features:\n\n- Autocompletes email addresses based on popular domains\n- Useful for form inputs with typo correction\n\n#### Docs\n- [Email suggestion documentation](https://dadata.ru/api/suggest/email/)\n\n### Car Brand Suggestion\n\n```php\nuse MoveMoveApp\\DaData\\Facades\\DaDataSuggestions;\n\nDaDataSuggestions::carBrand(['query' =\u003e 'фо']);\n```\n\n#### Features:\n\n- Suggests car makes and models\n- Useful for auto-selection interfaces\n\n#### Docs\n- [Car brand suggestion](https://dadata.ru/api/suggest/car_brand/)\n\n### Bank Suggestion\n\n```php\nuse MoveMoveApp\\DaData\\Facades\\DaDataSuggestions;\n\nDaDataSuggestions::bank(['query' =\u003e 'сбербанк']);\n```\n\n#### Features:\n\n- Suggests banks by name, BIK, SWIFT, INN, or correspondent account\n- Returns complete bank info (address, status, license)\n\n#### Docs\n- [Bank suggestion documentation](https://dadata.ru/api/suggest/bank/)\n\n### Bank Lookup by ID\n\n```php\nuse MoveMoveApp\\DaData\\Facades\\DaDataSuggestions;\n\nDaDataSuggestions::bankById(['query' =\u003e '044525225']);\n```\n\n#### Features:\n\n- Searches bank by exact BIK, SWIFT, INN, or correspondent account\n- Use when you already have the identifier, not for autocomplete\n\n#### Docs\n- [Bank find by ID documentation](https://dadata.ru/api/find-bank/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmovemoveapp%2Flaravel-dadata2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmovemoveapp%2Flaravel-dadata2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmovemoveapp%2Flaravel-dadata2/lists"}