autoapi/client

PHP wrapper for the auto-api.com car listings API (encar, mobile.de, autoscout24 and more)

Maintainers

Package info

github.com/autoapicom/auto-api-php

Homepage

Documentation

pkg:composer/autoapi/client

Statistics

Installs: 11

Dependents: 0

Suggesters: 0

Stars: 0

v1.0.5 2026-02-16 21:36 UTC

This package is auto-updated.

Last update: 2026-03-16 21:45:54 UTC


README

Packagist Version PHP Version License

PHP wrapper for auto-api.com — unified access to car listings from encar, mobile.de, autoscout24, che168 and other marketplaces.

Covers 8 sources across Korea, Europe, China and UAE. Fetch offers, filter by brand/year/price, track listing changes over time. Requires PHP 8.1+ and Guzzle.

Installation

composer require autoapi/client

Usage

use AutoApi\Client;

$client = new Client('your-api-key', 'https://api1.auto-api.com');

Get filters

$filters = $client->getFilters('encar');

Search offers

$offers = $client->getOffers('mobilede', [
    'page' => 1,
    'brand' => 'BMW',
    'year_from' => 2020,
]);

// Pagination
$page = $offers['meta']['page'];
$nextPage = $offers['meta']['next_page'];

Get single offer

$offer = $client->getOffer('encar', '40427050');

Track changes

$changeId = $client->getChangeId('encar', '2025-01-15');
$changes = $client->getChanges('encar', $changeId);

// Next batch
$nextChangeId = $changes['meta']['next_change_id'];
$moreChanges = $client->getChanges('encar', $nextChangeId);

Get offer by URL

$info = $client->getOfferByUrl('https://encar.com/dc/dc_cardetailview.do?carid=40427050');

Error handling

use AutoApi\Exception\AuthException;
use AutoApi\Exception\ApiException;

try {
    $offers = $client->getOffers('encar', ['page' => 1]);
} catch (AuthException $e) {
    // 401/403 — invalid API key
} catch (ApiException $e) {
    echo $e->getStatusCode();
    echo $e->getMessage();
}

Supported sources

Source Platform Region
encar encar.com South Korea
mobilede mobile.de Germany
autoscout24 autoscout24.com Europe
che168 che168.com China
dongchedi dongchedi.com China
guazi guazi.com China
dubicars dubicars.com UAE
dubizzle dubizzle.com UAE

Other languages

Language Package
TypeScript @autoapicom/client
Python autoapicom-client
Go auto-api-go
C# AutoApi.Client
Java auto-api-client
Ruby auto-api-client
Rust auto-api-client

Documentation

auto-api.com