With the Competitor Stock Search capability on Auto Trader Connect, you can search for similar adverts to your chosen vehicle on Auto Trader.
Here's a full list of the functionality:
- Retrieve competitor search URL
- Vehicle lookup competitor stock search URL
- In-stock competitor stock search URL
- Perform competitor stock search
Retrieve competitor search URL
As part of this capability, you’ll be able to get a pre-filled competitor search URL from our Vehicles API and Stock API. This will show similar adverts on Auto Trader for your chosen vehicle.
Vehicle lookup competitor stock search URL
To get this for an out-of-stock vehicle, you’ll need to make a GET request to the Vehicles API with:
- The Auto Trader advertiser ID of the customer the request is for
- The VRM in the registration query parameter
- The query string parameter competitors=true
In-stock competitor stock search URL
To get this for in-stock vehicles, you’ll need to make a GET request to the Stock API with:
- The Auto Trader advertiser ID of the customer the request is for
- The relevant page and pageSize parameters to make sure you get all stock split into pages
- The query string parameter competitors=true
You can optionally add filters to this request. For example, you can use registration or stockId to get this only for a particular vehicle rather than all vehicles in stock with the retailer.
Check out examples of how to get the competitor stock search URL
Perform competitor stock search
Once you have the pre-filled URL from the Vehicles API or Stock API, you will then need to perform a GET request for that URL to fetch the competitor stock.
If successful, this will return a JSON array of adverts that are published on either Auto Trader or the retailer’s own website. It will also show a totalResults attribute telling you the total adverts returned by this call.
The maximum pageSize you can request is 20 results. You can request up to 10 pages of 20 results. Competitor stock search is limited to 200 results, and the API call will fail if you try to retrieve more than the first 200 results.
By default, the pre-filled URL will contain the parameters:
- searchType - This should always be set to competitor
- advertiserId - This should always be set to the advertiser ID you’re performing the search for. This will not filter the results to that advertiser ID.
- registration - with !YOURREG to filter out your registration
- standardMake, standardModel, and standardTrim
- min/max Plate range
- min/max EnginePowerBHP and min/max BadgeEngineSizeLitres
- standardTransmitionType, standardFuelType, standardBodyType, and standardDrivetrain
- doors
- valuations
If the number of similar vehicles is low, you can modify these parameters to widen the search.
For example, in the pre-filled URL the min and max plate range will both be set to the original vehicle’s plate. It will provide exact matches of the original vehicle’s plate.
You could have an option in your system that would show a plate either side, rather than requiring an exact plate match. This option would modify the API call parameters accordingly, and call the API again to get a new set of results based on the new parameters.
Check out an example of a competitor stock search
Error Handling
When using the APIs above, you may get error response codes that you need to handle. This makes sure you have a smooth service for both you, as a partner, and your end user.