PHPackages                             voyanara/avito-laravel-client - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [HTTP &amp; Networking](/categories/http)
4. /
5. voyanara/avito-laravel-client

ActiveLibrary[HTTP &amp; Networking](/categories/http)

voyanara/avito-laravel-client
=============================

A Laravel package for integrating with the Avito API, allowing seamless interaction with Avito features and data from your Laravel application.

1.2.0(3w ago)6203MITPHPPHP ^8.3

Since Sep 16Pushed 3w ago1 watchersCompare

[ Source](https://github.com/Voyanara/avito-laravel-client)[ Packagist](https://packagist.org/packages/voyanara/avito-laravel-client)[ RSS](/packages/voyanara-avito-laravel-client/feed)WikiDiscussions main Synced 3d ago

READMEChangelog (10)Dependencies (17)Versions (14)Used By (0)

 [![](https://private-user-images.githubusercontent.com/2788293/367600685-b794813c-0dd0-4569-9b42-322980ea0968.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3ODMwMTA1MjgsIm5iZiI6MTc4MzAxMDIyOCwicGF0aCI6Ii8yNzg4MjkzLzM2NzYwMDY4NS1iNzk0ODEzYy0wZGQwLTQ1NjktOWI0Mi0zMjI5ODBlYTA5NjgucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI2MDcwMiUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNjA3MDJUMTYzNzA4WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9MzkwOTNkMjUwMTE4ZWQ0YTk1Njk0Y2E0OGVkZWE4ZGNmNzBhYjY5YjY5ZmYyOTdlMTNlODFlMTFiZWIyZTVhYyZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmcmVzcG9uc2UtY29udGVudC10eXBlPWltYWdlJTJGcG5nIn0.McVF9dKS8ISSV8WMewQ4buPPLw-pbXE_i_e0vkplIP8)](https://private-user-images.githubusercontent.com/2788293/367600685-b794813c-0dd0-4569-9b42-322980ea0968.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3ODMwMTA1MjgsIm5iZiI6MTc4MzAxMDIyOCwicGF0aCI6Ii8yNzg4MjkzLzM2NzYwMDY4NS1iNzk0ODEzYy0wZGQwLTQ1NjktOWI0Mi0zMjI5ODBlYTA5NjgucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI2MDcwMiUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNjA3MDJUMTYzNzA4WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9MzkwOTNkMjUwMTE4ZWQ0YTk1Njk0Y2E0OGVkZWE4ZGNmNzBhYjY5YjY5ZmYyOTdlMTNlODFlMTFiZWIyZTVhYyZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmcmVzcG9uc2UtY29udGVudC10eXBlPWltYWdlJTJGcG5nIn0.McVF9dKS8ISSV8WMewQ4buPPLw-pbXE_i_e0vkplIP8)

Avito Laravel API PHP Client
----------------------------

[](#avito-laravel-api-php-client)

> This package is a client for the Avito API designed to simplify integration with the Avito platform from your Laravel applications. It provides a set of tools to work with the Avito API, allowing you to automate and streamline tasks related to managing listings, updating information, and obtaining statistics.

Why Use the API
---------------

[](#why-use-the-api)

The Avito API significantly simplifies working on the platform by allowing you to:

- Automate operations and actions you perform on Avito.
- Integrate Avito with your CRM system, ERP system for content management, messaging system for customer communication, or analytics system.
- Run your business more efficiently by enabling automatic data updates and obtaining statistics.

Features of the Avito API
-------------------------

[](#features-of-the-avito-api)

With this client, you can:

- **Communicate with Customers**: Use ready-made integrations or create your own with the systems you need.
- **Receive Autoload Information**: Get data on autoload success and errors.
- **Update Prices and Availability**: Quickly update price and availability information on Avito from your system.
- **Obtain Statistics**: Analyze the effectiveness of your listings and get detailed statistics.

Specific methods for each category (e.g., Avito Real Estate or Avito Jobs) are available in the [Avito API documentation](https://developers.avito.ru/).

Requirements
------------

[](#requirements)

- **PHP**: ^8.3 (8.3 / 8.4 / 8.5)
- **Laravel Framework**: ^11.0 | ^12.0 | ^13.0
- **Spatie Laravel Data**: ^4.11

Ensure that your environment meets these requirements before proceeding with the installation.

Installation
------------

[](#installation)

Laravel Avito API Client can be installed via Composer:

```
composer require voyanara/avito-laravel-client
```

The package will automatically register a service provider.

This package comes with a migration and a configuration file. You can publish them using the following Artisan command:

```
php artisan vendor:publish --provider="Voyanara\LaravelApiClient\Infrastructure\Providers\AvitoModuleServiceProvider --tag="config"
```

```
php artisan vendor:publish --provider="Voyanara\LaravelApiClient\Infrastructure\Providers\AvitoModuleServiceProvider --tag="migrations"
```

This is the default content of the config file that will be published as config/avito.php

### Usage

[](#usage)

You have several options for using the Avito API client in your Laravel application:

#### Using the Facade

[](#using-the-facade)

To use the Avito API client via a facade, you can call methods directly on the AvitoClient facade.

Example:

```
public function action(AvitoClient $client)
{
    $client::messenger()->getChats();
    //or
    AvitoClient::user()->self();
}
```

If Laravel does not recognize the facade and you have defined it in composer.json under extra &gt; laravel &gt; aliases, make sure to import it in your file:

```
use Voyanara\LaravelApiClient\Application\Facades\AvitoClientFacade as AvitoClient;
```

#### Using dependency injection

[](#using-dependency-injection)

Alternatively, you can use dependency injection to access the Avito API client. This approach is recommended if you prefer to inject dependencies into your methods or constructors.

```
use Voyanara\LaravelApiClient\Application\Facades\Client;

public function action(Client $client)
{
    $client->messenger()->getChats();
    //or
    $client->user()->getBalance();
    $client->user()->getOperationsHistory();
}
```

Messenger
---------

[](#messenger)

Full coverage of the [Avito Messenger API](https://developers.avito.ru/api-catalog/messenger/documentation) — all 13 methods are available via `$client->messenger()`:

MethodDescriptionScope`getChats(int $userId, int $limit = 10, ?bool $unreadOnly = null, array $itemIds = [], array $chatTypes = [], int $offset = 0)`Get a list of chats`messenger:read``chatInfo(int $userId, string $chatId)`Get chat info with the last message`messenger:read``messagesListFromChat(int $userId, string $chatId, int $limit = 10, int $offset = 0)`Get messages from a chat (does not mark it as read)`messenger:read``sendMessage(int $userId, string $chatId, string $message, string $type = 'text')`Send a text message`messenger:write``uploadImage(int $userId, string $filePath)`Upload an image (JPEG, HEIC, GIF, BMP, PNG; max 24 MB)`messenger:write``sendMessageWithImage(int $userId, string $chatId, string $imageId)`Send a message with a previously uploaded image`messenger:write``deleteMessage(int $userId, string $chatId, string $messageId)`Delete a message (within one hour of sending; its type changes to `deleted`)`messenger:write``readChat(int $userId, string $chatId)`Mark a chat as read`messenger:read``getVoiceFiles(int $userId, array $voiceIds)`Get download links for voice messages (links are valid for one hour)`messenger:read``addUserToBlacklist(int $userId, int $blockedUserId, ?int $itemId = null, ?int $reasonId = null)`Add a user to the blacklist (reasons: 1 — spam, 2 — fraud, 3 — insult, 4 — other)`messenger:write``subscribeWebhook(string $url)`Enable webhook notifications (V3)`messenger:read``unsubscribeWebhook(string $url)`Disable webhook notifications`messenger:read``getSubscriptions()`Get the list of webhook subscriptions`messenger:read`### Examples

[](#examples)

Reply to the first unread chat and mark it as read:

```
use Voyanara\LaravelApiClient\Application\Facades\Client;

public function action(Client $client)
{
    $userId = $client->user()->self()->id;

    $chats = $client->messenger()->getChats($userId, unreadOnly: true);
    $chat = $chats->chats->first();

    $client->messenger()->sendMessage($userId, $chat->id, 'Hello! Thanks for reaching out.');
    $client->messenger()->readChat($userId, $chat->id);
}
```

Send a photo to a chat:

```
$upload = $client->messenger()->uploadImage($userId, storage_path('app/photo.jpg'));
$client->messenger()->sendMessageWithImage($userId, $chatId, $upload->id);
```

Manage webhook notifications:

```
$client->messenger()->subscribeWebhook('https://example.com/avito/webhook');

$subscriptions = $client->messenger()->getSubscriptions();
foreach ($subscriptions->subscriptions as $subscription) {
    echo $subscription->url.' (v'.$subscription->version.')'.PHP_EOL;
}

$client->messenger()->unsubscribeWebhook('https://example.com/avito/webhook');
```

> **Note:** since November 2025 Avito requires a paid messenger subscription for reading and sending chat messages — without it the API responds with error `402` ("Перейдите на подписку с API мессенджера"). Chat lists, chat info and webhook management remain available without a subscription.

###  Health Score

48

—

FairBetter than 93% of packages

Maintenance95

Actively maintained with recent releases

Popularity14

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 96.8% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~57 days

Recently: every ~147 days

Total

12

Last Release

24d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/61da605574759a2aa249e7c92ebea098e986ccfa488c70e30ced485eed9cda94?d=identicon)[voyanara](/maintainers/voyanara)

---

Top Contributors

[![Voyanara](https://avatars.githubusercontent.com/u/2788293?v=4)](https://github.com/Voyanara "Voyanara (30 commits)")[![ArNic](https://avatars.githubusercontent.com/u/8310517?v=4)](https://github.com/ArNic "ArNic (1 commits)")

---

Tags

phpapiclientlaravelhttp clientavito

###  Code Quality

TestsPest

Static AnalysisPHPStan, Rector

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/voyanara-avito-laravel-client/health.svg)

```
[![Health](https://phpackages.com/badges/voyanara-avito-laravel-client/health.svg)](https://phpackages.com/packages/voyanara-avito-laravel-client)
```

###  Alternatives

[openai-php/laravel

OpenAI PHP for Laravel is a supercharged PHP API client that allows you to interact with the Open AI API

3.7k9.5M89](/packages/openai-php-laravel)[binaryk/laravel-restify

Laravel REST API helpers

677415.0k](/packages/binaryk-laravel-restify)[api-platform/laravel

API Platform support for Laravel

58171.8k14](/packages/api-platform-laravel)[lomkit/laravel-rest-api

A package to build quick and robust rest api for the Laravel framework.

59463.6k](/packages/lomkit-laravel-rest-api)[mozex/anthropic-laravel

Laravel integration for the Anthropic API: facade, config publishing, install command, testing fakes, messages, streaming, tool use, thinking, and batches.

74331.3k1](/packages/mozex-anthropic-laravel)[ismaeltoe/osms

PHP library wrapper of the Orange SMS API.

4640.8k](/packages/ismaeltoe-osms)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
