Skip to main content

AutoTrader Parser API Reference

Complete API documentation with detailed endpoints, parameters, response formats, and code examples for extracting UK automotive data.

What You'll Get
  • Complete endpoint documentation with all parameters and options
  • Multiple code examples in JavaScript, Python, and cURL
  • Error handling guides with common issues and solutions
  • Rate limiting information for all subscription plans
  • Real-world examples for common use cases

AutoTrader API

🔐 Authentication

All API requests require authentication using your API key in the Authorization header.

:::

API Reference

info API Key Format

Your API key will look like this: autotrader_parser_sk_1234567890abcdef1234567890abcdef

  • Prefix: autotrader_parser_sk_
  • Length: 64 characters
  • Format: Hexadecimal string
  • Scope: AutoTrader parser access only :::
Authorization: Bearer autotrader_parser_sk_1234567890abcdef1234567890abcdef

📡 Base URL

https://api.carapis.com/v1/parsers/autotrader

🚀 Core Endpoints

Search Vehicle Listings

Search and filter vehicle listings from AutoTrader across UK markets.

Endpoint: POST /search

Key Features
  • UK market coverage across all regions and cities
  • Advanced filtering by make, model, price, location
  • Flexible pagination with customizable limits
  • Comprehensive data fields including pricing and specifications
  • Real-time extraction with 99.9% success rate

Request Parameters

{
"query": "string",
"year_from": "number",
"year_to": "number",
"price_min": "number",
"price_max": "number",
"fuel_type": "string",
"transmission": "string",
"body_type": "string",
"location": "string",
"mileage_max": "number",
"limit": "number",
"page": "number"
}

Search Parameters

Search Options
ParameterTypeDescriptionExample
querystringSearch query (make, model, keywords)"BMW X5", "Mercedes C-Class"
year_fromnumberMinimum year2018
year_tonumberMaximum year2023
price_minnumberMinimum price (GBP)30000
price_maxnumberMaximum price (GBP)80000
fuel_typestringFuel type"diesel", "petrol", "hybrid", "electric"
transmissionstringTransmission type"automatic", "manual"
body_typestringBody type"suv", "saloon", "hatchback", "estate"
locationstringCity or region"London", "Manchester", "Birmingham"
mileage_maxnumberMaximum mileage (miles)50000
limitnumberResults per page (1-100)50
pagenumberPage number1

Response Format

{
"success": true,
"data": {
"listings": [
{
"id": "string",
"title": "string",
"price": {
"amount": "number",
"currency": "string",
"formatted": "string"
},
"specifications": {
"year": "number",
"mileage": "number",
"fuel_type": "string",
"transmission": "string",
"engine_size": "string",
"power": "string"
},
"location": {
"city": "string",
"region": "string",
"country": "string",
"coordinates": {
"lat": "number",
"lng": "number"
}
},
"seller": {
"name": "string",
"rating": "number",
"certified": "boolean"
},
"features": ["string"],
"images": ["string"],
"url": "string",
"extracted_at": "string"
}
],
"total_count": "number",
"search_metadata": {
"query": "string",
"filters_applied": "object"
}
}
}

Example Request

curl -X POST "https://api.carapis.com/v1/parsers/autotrader/search" \
-H "Authorization: Bearer autotrader_parser_sk_1234567890abcdef1234567890abcdef" \
-H "Content-Type: application/json" \
-d '{
"query": "BMW X5 2020",
"max_price": 50000,
"fuel_type": "diesel",
"location": "London"
}'

Extract Vehicle Details

Get detailed information for a specific vehicle listing.

Endpoint: GET /extract/\{vehicle_id\}

Detailed Extraction
  • Complete vehicle specifications with all available data
  • High-resolution images and media content
  • Dealer information with contact details
  • Price history and market analysis
  • Vehicle history and condition reports

Request Parameters

ParameterTypeDescription
vehicle_idstringAutoTrader vehicle ID

Response Format

{
"success": true,
"data": {
"vehicle": {
"id": "string",
"title": "string",
"description": "string",
"price": {
"amount": "number",
"currency": "string",
"formatted": "string",
"negotiable": "boolean",
"price_history": [
{
"date": "string",
"amount": "number"
}
]
},
"specifications": {
"make": "string",
"model": "string",
"year": "number",
"trim": "string",
"engine": "string",
"transmission": "string",
"mileage": "number",
"fuel_type": "string",
"body_type": "string",
"color": "string",
"power": "string",
"torque": "string",
"consumption": "string"
},
"features": ["string"],
"images": [
{
"url": "string",
"alt": "string",
"type": "string"
}
],
"seller": {
"name": "string",
"rating": "number",
"reviews": "number",
"certified": "boolean",
"phone": "string",
"email": "string",
"address": "string",
"website": "string"
},
"location": {
"city": "string",
"region": "string",
"country": "string",
"coordinates": {
"lat": "number",
"lng": "number"
}
},
"history": {
"accident_free": "boolean",
"owners": "number",
"service_history": "boolean",
"warranty": "string"
},
"url": "string",
"extracted_at": "string"
}
}
}

Get Market Statistics

Retrieve market statistics and insights for specific criteria.

Endpoint: POST /statistics

Market Insights
  • Price distribution analysis across different segments
  • Market share data for brands and models
  • Trend analysis for pricing and demand patterns
  • Regional market analysis for UK regions
  • Seasonal patterns and market fluctuations

Request Parameters

{
"make": "string",
"model": "string",
"year_from": "number",
"year_to": "number",
"metrics": ["string"]
}

Available Metrics

  • price_distribution - Price range distribution
  • market_share - Brand/model market share
  • trends - Price and demand trends
  • regional_analysis - Regional market analysis
  • seasonal_patterns - Seasonal market patterns

Response Format

{
"success": true,
"data": {
"statistics": {
"total_listings": "number",
"average_price": "number",
"price_range": {
"min": "number",
"max": "number",
"median": "number"
},
"market_share": [
{
"brand": "string",
"percentage": "number",
"count": "number"
}
],
"trends": {
"price_trend": "string",
"demand_trend": "string",
"inventory_trend": "string"
}
},
"metadata": {
"generated_at": "string",
"data_freshness": "string"
}
}
}

Search Dealers

Search for dealer information and inventory.

Endpoint: POST /dealers/search

Dealer Data
  • Comprehensive dealer profiles with ratings and verification
  • Inventory counts and specialization information
  • Contact details and website information
  • Geographic filtering by city and region
  • Brand specialization data

Request Parameters

{
"city": "string",
"region": "string",
"brand": "string",
"rating_min": "number",
"limit": "number"
}

Response Format

{
"success": true,
"data": {
"dealers": [
{
"id": "string",
"name": "string",
"city": "string",
"region": "string",
"rating": "number",
"reviews": "number",
"certified": "boolean",
"phone": "string",
"website": "string",
"inventory_count": "number",
"specialties": ["string"]
}
],
"pagination": {
"total": "number",
"page": "number",
"per_page": "number"
}
}
}

🔧 Advanced Endpoints

Search for multiple criteria in a single request.

Endpoint: POST /batch-search

Batch Processing Benefits
  • Efficient processing of multiple searches
  • Reduced API calls for complex workflows
  • Concurrent execution with configurable limits
  • Cost optimization for large-scale operations

Request Parameters

{
"searches": [
{
"query": "string",
"filters": "object"
}
],
"batch_options": {
"concurrent": "number",
"delay": "number"
}
}

Real-time Monitoring

Set up real-time monitoring for specific criteria.

Endpoint: POST /monitor

Monitoring Requirements
  • Webhook URL must be publicly accessible
  • HTTPS required for security
  • Rate limiting applies to webhook calls
  • Monitoring limits based on subscription plan

Request Parameters

{
"query": "string",
"webhook_url": "string",
"conditions": {
"price_change": "number",
"new_listings": "boolean",
"inventory_change": "number"
}
}

📊 Response Codes

HTTP Status Codes
CodeDescriptionAction Required
200SuccessNone - data returned successfully
400Bad Request - Invalid parametersCheck request format and parameters
401Unauthorized - Invalid API keyVerify API key and permissions
403Forbidden - Insufficient permissionsUpgrade subscription or contact support
429Too Many Requests - Rate limit exceededWait or implement exponential backoff
500Internal Server ErrorRetry or contact support
503Service UnavailableCheck service status and retry

⚡ Rate Limits

Subscription Limits
PlanRequests per MinuteRequests per HourConcurrent Requests
Free101002
Basic601,0005
Pro30010,00020
EnterpriseCustomCustomCustom

🔍 Error Handling

Error Response Format

{
"success": false,
"error": {
"code": "string",
"message": "string",
"details": "object"
}
}

Common Error Codes

Common Issues
CodeDescriptionSolution
INVALID_API_KEYAPI key is invalid or expiredCheck key format and validity
RATE_LIMIT_EXCEEDEDRate limit exceededWait or upgrade subscription plan
INVALID_PARAMETERSInvalid request parametersCheck parameter syntax and values
EXTRACTION_FAILEDData extraction failedRetry or contact technical support
UK_MARKET_ONLYUK market access onlyUse UK-specific parameters

📝 Code Examples

JavaScript

const axios = require('axios');

const apiKey = 'autotrader_parser_sk_1234567890abcdef1234567890abcdef';
const baseURL = 'https://api.carapis.com/v1/parsers/autotrader';

// Search vehicles with error handling
async function searchVehicles() {
try {
const response = await axios.post(
`$\{baseURL\}/search`,
{
query: 'BMW X5 2020',
max_price: 50000,
fuel_type: 'diesel',
},
{
headers: {
Authorization: `Bearer $\{apiKey\}`,
'Content-Type': 'application/json',
},
},
);

return response.data;
} catch (error) {
console.error('Error:', error.response?.data || error.message);
throw error;
}
}

// Get market statistics
async function getMarketStats() {
try {
const response = await axios.post(
`$\{baseURL\}/statistics`,
{
make: 'BMW',
metrics: ['price_distribution', 'market_share'],
},
{
headers: {
Authorization: `Bearer $\{apiKey\}`,
'Content-Type': 'application/json',
},
},
);

return response.data;
} catch (error) {
console.error('Error:', error.response?.data || error.message);
throw error;
}
}

Python

import requests
import time

api_key = 'autotrader_parser_sk_1234567890abcdef1234567890abcdef'
base_url = 'https://api.carapis.com/v1/parsers/autotrader'

def search_vehicles():
headers = {
'Authorization': f'Bearer \{api_key\}',
'Content-Type': 'application/json'
}

data = {
'query': 'BMW X5 2020',
'max_price': 50000,
'fuel_type': 'diesel'
}

try:
response = requests.post(f'\{base_url\}/search',
json=data, headers=headers)
response.raise_for_status()
return response.json()
except requests.exceptions.RequestException as e:
print(f'Error: \{e\}')
return None

def get_market_statistics():
headers = {
'Authorization': f'Bearer \{api_key\}',
'Content-Type': 'application/json'
}

data = {
'make': 'BMW',
'metrics': ['price_distribution', 'market_share']
}

try:
response = requests.post(f'\{base_url\}/statistics',
json=data, headers=headers)
response.raise_for_status()
return response.json()
except requests.exceptions.RequestException as e:
print(f'Error: \{e\}')
return None

# Rate limiting helper
def safe_request(func, max_retries=3):
for attempt in range(max_retries):
try:
return func()
except requests.exceptions.HTTPError as e:
if e.response.status_code == 429:
wait_time = 2 ** attempt
print(f'Rate limited, waiting \{wait_time\} seconds...')
time.sleep(wait_time)
else:
raise e
return None

cURL

#!/bin/bash

API_KEY="autotrader_parser_sk_1234567890abcdef1234567890abcdef"
BASE_URL="https://api.carapis.com/v1/parsers/autotrader"

# Search vehicles
search_vehicles() {
curl -X POST "$\{BASE_URL\}/search" \
-H "Authorization: Bearer $\{API_KEY\}" \
-H "Content-Type: application/json" \
-d '{
"query": "BMW X5 2020",
"max_price": 50000,
"fuel_type": "diesel"
}'
}

# Get market statistics
get_statistics() {
curl -X POST "$\{BASE_URL\}/statistics" \
-H "Authorization: Bearer $\{API_KEY\}" \
-H "Content-Type: application/json" \
-d '{
"make": "BMW",
"metrics": ["price_distribution", "market_share"]
}'
}

# Extract vehicle details
get_vehicle_details() {
local vehicle_id=$1
curl -X GET "$\{BASE_URL\}/extract/$\{vehicle_id\}" \
-H "Authorization: Bearer $\{API_KEY\}"
}

🔗 SDKs and Libraries

Official SDKs
  • JavaScript/Node.js: @carapis/autotrader-parser
  • Python: carapis-autotrader-parser
  • PHP: carapis/autotrader-parser
  • Java: com.carapis:autotrader-parser
  • C#: Carapis.AutoTraderParser
Community Libraries
  • Ruby: carapis-autotrader-parser
  • Go: github.com/carapis/autotrader-parser
  • Rust: carapis-autotrader-parser

📞 Support & Resources

Get Help
  • Documentation - Complete API documentation
  • Support - Technical assistance and troubleshooting
  • Status - Real-time API status and uptime
  • Community - Connect with other developers
  • Examples - Code examples and tutorials

🚀 Next Steps

Ready to Start?
  1. Get Your API Key - Sign up and get started
  2. Quick Start Guide - First API call in minutes
  3. Market Analysis - Understand UK market
  4. FAQ - Common questions and solutions

Start extracting UK automotive data with our comprehensive AutoTrader parser API. Get real-time access to vehicle listings, market statistics, and dealer information across the UK.

Get Started Now →