PHPackages                             matasarei/olx-api-client-v2 - 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. [API Development](/categories/api)
4. /
5. matasarei/olx-api-client-v2

ActiveLibrary[API Development](/categories/api)

matasarei/olx-api-client-v2
===========================

OLX API Client v2

1.1.2(7mo ago)745.8k↓47.5%2MITPHPPHP &gt;=7.4CI passing

Since Jul 12Pushed 7mo ago1 watchersCompare

[ Source](https://github.com/matasarei/olx-api-client-v2)[ Packagist](https://packagist.org/packages/matasarei/olx-api-client-v2)[ RSS](/packages/matasarei-olx-api-client-v2/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (4)Dependencies (3)Versions (6)Used By (0)

OLX API Client v2
=================

[](#olx-api-client-v2)

[![CI workflow](https://github.com/matasarei/olx-api-client-v2/actions/workflows/tests.yml/badge.svg)](https://github.com/matasarei/olx-api-client-v2/actions/workflows/tests.yml/badge.svg)

This package implements PHP client for OLX Partner API.

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

[](#installation)

To install the package to your project via [Composer](http://getcomposer.org/) simply run:

```
composer require matasarei/olx-api-client-v2
```

Documentation
-------------

[](#documentation)

Official OLX API documentation and developers portal:

- [Bulgaria](https://developer.olx.bg/api/doc)
- [Kazakhstan](https://developer.olx.kz/api/doc)
- [Poland](https://developer.olx.pl/api/doc)
- [Portugal](https://developer.olx.pt/api/doc)
- [Romania](https://developer.olx.ro/api/doc)
- [Ukraine](https://developer.olx.ua/api/doc)

Check the troubleshooting section if you have any issues.

Usage
-----

[](#usage)

### Basic Example

[](#basic-example)

```
use Gentor\Olx\Api\Client;
use Gentor\Olx\Api\Credentials;

$credentials = new Credentials('your_client_id', 'your_client_secret');
$client = new Client($credentials, Client::OLX_UA);

// Create an advert
$response = $client->adverts()->create([
    'title' => 'My Product',
    'description' => 'Product description...',
    'category_id' => 123,
    // ... other required fields
]);

// Access the created advert data
$advertData = $response['data'];
echo "Created advert ID: " . $advertData['id'];
echo "Status: " . $advertData['status'];
```

### Important: API Response Format

[](#important-api-response-format)

All OLX API responses wrap the actual data in a `data` key according to the official API specification:

```
// What you get from the API:
[
  'data' => [
    'id' => 905890605,
    'status' => 'active',
    // ... other advert fields
  ]
]

// Access the actual data:
$response = $client->adverts()->create($request);
$advertData = $response['data'];
```

This response format applies to advert-related endpoints, for example:

- `GET /adverts` returns `['data' => [array of adverts]]`
- `POST /adverts` returns `['data' => {advert object}]`
- `GET /adverts/{id}` returns `['data' => {advert object}]`
- `PUT /adverts/{id}` returns `['data' => {advert object}]`

Other endpoints may have different response structures. Please refer to the official OLX API documentation for details on the response format of each endpoint.

Testing and development
-----------------------

[](#testing-and-development)

1. Install vendors

```
docker run --rm -v $(pwd):/app -w /app composer:lts composer install
```

2. Run tests

```
docker run --rm -v $(pwd):/app -w /app composer:lts vendor/bin/phpunit
```

###  Health Score

42

—

FairBetter than 88% of packages

Maintenance62

Regular maintenance activity

Popularity37

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity44

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 75% 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 ~161 days

Total

4

Last Release

238d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/44632227efd38dd8598ceb71812e223865e994f1f35f027b423469133fb29d6b?d=identicon)[matasarei](/maintainers/matasarei)

---

Top Contributors

[![matasarei](https://avatars.githubusercontent.com/u/6638367?v=4)](https://github.com/matasarei "matasarei (12 commits)")[![gentor](https://avatars.githubusercontent.com/u/2902504?v=4)](https://github.com/gentor "gentor (2 commits)")[![google-labs-jules[bot]](https://avatars.githubusercontent.com/in/842251?v=4)](https://github.com/google-labs-jules[bot] "google-labs-jules[bot] (1 commits)")[![serhiymaystro](https://avatars.githubusercontent.com/u/13778243?v=4)](https://github.com/serhiymaystro "serhiymaystro (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/matasarei-olx-api-client-v2/health.svg)

```
[![Health](https://phpackages.com/badges/matasarei-olx-api-client-v2/health.svg)](https://phpackages.com/packages/matasarei-olx-api-client-v2)
```

###  Alternatives

[aws/aws-sdk-php

AWS SDK for PHP - Use Amazon Web Services in your PHP project

6.3k543.5M2.6k](/packages/aws-aws-sdk-php)[eslazarev/wildberries-sdk

Wildberries OpenAPI clients (generated).

273.0k](/packages/eslazarev-wildberries-sdk)[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.5k5.9M739](/packages/sylius-sylius)[drupal/core

Drupal is an open source content management platform powering millions of websites and applications.

21866.0M1.7k](/packages/drupal-core)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3741.3M46](/packages/tencentcloud-tencentcloud-sdk-php)[drupal/core-recommended

Locked core dependencies; require this project INSTEAD OF drupal/core.

6942.5M421](/packages/drupal-core-recommended)

PHPackages © 2026

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