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

ActiveLibrary[API Development](/categories/api)

vecar/autotrader-api-client
===========================

Set API Calls to Autotrader

1.0.2(2y ago)07MITPHPPHP &gt;=7.4

Since Apr 25Pushed 2y agoCompare

[ Source](https://github.com/VeCar-Digital-Programming/Autotrader-Api-Client)[ Packagist](https://packagist.org/packages/vecar/autotrader-api-client)[ RSS](/packages/vecar-autotrader-api-client/feed)WikiDiscussions main Synced 1mo ago

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

AutoTrader PHP API Client
=========================

[](#autotrader-php-api-client)

[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)

This package provides a means easily of interacting with the AutoTrader API.

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

[](#installation)

Add the client to your project using composer.

```
composer require vecar/autotrader-api

```

Usage
-----

[](#usage)

AutoTrader require that you exchange your key &amp; secret for an access token, this is then used to access the API.

### Authentication

[](#authentication)

```
// Create an instance of the client to obtain an access token.
$api = new \Vecar\AutotraderApiClient\Client();
$accessToken = $api->authentication()->getAccessToken('YOUR_KEY', 'YOUR_SECRET');

// once you have your access token you can create client instances like:
$api = new \Vecar\AutotraderApiClient\Client(['access_token' => $accessToken]);
```

### Vehicles

[](#vehicles)

This endpoint is used to look up UK registered vehicles and returns core vehicle data.

#### Lookup base information

[](#lookup-base-information)

Retrieves the vehicles base information data for a valid UK registration (VRM).

```
$vehicle = $api->vehicles()->lookup('123456', 'HG17XXX');

/*
 * Will return something similar to the below.
 *
 * [
 *     "vehicle" => [
 *       "ownershipCondition" => "Used",
 *       "registration" => "HG17XXX",
 *       "vin" => "WMWWG320503CXXXXX",
 *       "make" => "MINI",
 *       "model" => "Convertible",
 *       "generation" => "Convertible (2015 - 2018)",
 *       "derivative" => "1.5 Cooper Convertible 2dr Petrol (s/s) (136 ps)",
 *       "derivativeId" => "5b746c3a24974b8fa1048b0141356a34",
 *       "vehicleType" => "Car",
 *       "trim" => "Cooper",
 *       "bodyType" => "Convertible",
 *       "fuelType" => "Petrol",
 *       "cabType" => null,
 *       "transmissionType" => "Manual",
 *       ...
 *       ],
 *     ],
 *   ]
 *
 * For the full response see:
 * https://developers.autotrader.co.uk/documentation#vehicle-base-information
 */
```

#### Extended lookups

[](#extended-lookups)

You can retrieve extra datasets for a VRM via the `lookup` method by supplying the one or all of the following flags:

**Note:** The `VehicleLookupFlags::VEHICLE_METRICS` &amp; `VehicleLookupFlags::VALUATIONS` flags also require the current mileage to be passed in as the last parameter as below.

- **VehicleLookupFlags::MOT\_TESTS**

    Provides most recent MOT test information for the specified vehicle.
- **VehicleLookupFlags::FEATURES**

    Provides an array of standard and possible optional features for the specified vehicle.
- **VehicleLookupFlags::BASIC\_VEHICLE\_CHECK**

    Provides a variety of vehicle specific provenance data.
- **VehicleLookupFlags::FULL\_VEHICLE\_CHECK**

    Provides a variety of vehicle specific provenance data.
- **VehicleLookupFlags::VALUATIONS**

    Provides a variety of Auto Trader valuations for the specified vehicle.
- **VehicleLookupFlags::VEHICLE\_METRICS**

    Provides a variety of Auto Trader valuations and vehicle metrics for the specified vehicle.
- **VehicleLookupFlags::COMPETITORS**

    Provides a pre-constructed URL, allowing users to explore market competition.

```
// For example, to retrieve the MOT & basic vehicle check datasets
// we can do the following:

use Vecar\AutotraderApiClient\Api\Builders\LookupRequestBuilder;

$request = LookupRequestBuilder::create()
    ->setRegistration('EO66XXX')
    ->setFlags([
        VehicleLookupFlags::BASIC_VEHICLE_CHECK,
        VehicleLookupFlags::VEHICLE_METRICS
    ]);

$vehicle = $api->vehicles()->lookup($request);

/*
 * Will return something similar to the below.
 *
 * [
 *     "vehicle" => [
 *       "ownershipCondition" => "Used",
 *       "registration" => "EO66XXX",
 *       "vin" => "WMWWG320503CXXXXX",
 *       "make" => "MINI",
 *       "model" => "Convertible",
 *       "generation" => "Convertible (2015 - 2018)",
 *       "derivative" => "1.5 Cooper Convertible 2dr Petrol (s/s) (136 ps)",
 *       "derivativeId" => "5b746c3a24974b8fa1048b0141356a34",
 *       "vehicleType" => "Car",
 *       "trim" => "Cooper",
 *       "bodyType" => "Convertible",
 *       "fuelType" => "Petrol",
 *       "cabType" => null,
 *       "transmissionType" => "Manual",
 *       ...
 *
 *       "check" => [
 *           "insuranceWriteoffCategory" => null,
 *           "scrapped" => false,
 *           "stolen" => false,
 *           "imported" => false,
 *           "exported" => false,
 *           "previousOwners" => 1,
 *           "keeperChanges" => [
 *               [
 *                 "dateOfLastKeeper" => "2020-07-14",
 *               ],
 *           ],
 *           "v5cs" => [
 *               [
 *                 "issuedDate" => "2017-06-30",
 *               ],
 *           ],
 *       ],
 *
 *      "motTests" => [
 *           [
 *               "completedDate" => "2020-06-26T10:05:59Z",
 *               "expiryDate" => "2021-06-25",
 *               "testResult" => "Passed",
 *               "odometerValue" => 16330,
 *               "odometerUnit" => "Miles",
 *               "motTestNumber" => "444811158817",
 *               "rfrAndComments" => [],
 *           ],
 *           ...
 *       ],
 *     ],
 *   ]
 *
 * For the full responses see:
 * https://developers.autotrader.co.uk/documentation#vehicle-base-information
 */
```

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~0 days

Total

3

Last Release

745d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/a50e96fdb0bf2abd91b7946a2335373c5074ac9c256dd860f39a044582723ddf?d=identicon)[Abowe1978](/maintainers/Abowe1978)

---

Top Contributors

[![Abowe1978](https://avatars.githubusercontent.com/u/148785074?v=4)](https://github.com/Abowe1978 "Abowe1978 (4 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/vecar-autotrader-api-client/health.svg)

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

###  Alternatives

[sylius/sylius

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

8.4k5.6M650](/packages/sylius-sylius)[theodo-group/llphant

LLPhant is a library to help you build Generative AI applications.

1.5k311.5k5](/packages/theodo-group-llphant)[wheelpros/fitment-platform-api

Magento 2 (Open Source)

12.1k1.2k](/packages/wheelpros-fitment-platform-api)[alexacrm/dynamics-webapi-toolkit

Web API toolkit for Microsoft Dynamics 365 and Dynamics CRM

81324.1k1](/packages/alexacrm-dynamics-webapi-toolkit)[commercetools/commercetools-sdk

The official PHP SDK for the commercetools Composable Commerce APIs

19281.5k](/packages/commercetools-commercetools-sdk)[keboola/storage-api-client

Keboola Storage API PHP Client

10387.5k25](/packages/keboola-storage-api-client)

PHPackages © 2026

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