Skip to main content

OLX Autos API Reference

Complete API documentation for extracting real-time automotive data from the world's leading global marketplace.

Quick Navigation

Authentication

API Key Setup

All requests to the OLX Autos API require authentication using an API key.

API Key Format
olx_parser_sk_1234567890abcdef1234567890abcdef

Include your API key in the Authorization header:

Authorization: Bearer YOUR_API_KEY

Request Headers

Authorization: Bearer YOUR_API_KEY
Content-Type: application/json
User-Agent: YourApp/1.0

Base URL

https://api.carapis.com/v1/olx

Search Endpoints

Search Vehicles

Search for vehicles with various filters and criteria across global markets.

Endpoint: GET /search

Request Parameters
ParameterTypeRequiredDescription
makestringNoVehicle make (e.g., "Toyota", "Honda")
modelstringNoVehicle model (e.g., "Camry", "City")
year_minintegerNoMinimum year (e.g., 2020)
year_maxintegerNoMaximum year (e.g., 2023)
price_minintegerNoMinimum price in local currency
price_maxintegerNoMaximum price in local currency
countrystringNoCountry code (e.g., "IN", "ID", "BR")
citystringNoCity name (e.g., "Mumbai", "Jakarta", "São Paulo")
vehicle_typestringNoVehicle type (sedan, suv, truck, etc.)
transmissionstringNoTransmission type (automatic, manual)
fuel_typestringNoFuel type (petrol, diesel, hybrid, electric)
conditionstringNoVehicle condition (new, used, certified)
mileage_minintegerNoMinimum mileage
mileage_maxintegerNoMaximum mileage
featuresarrayNoArray of features (e.g., ["leather_seats", "sunroof"])
languagestringNoLanguage code (e.g., "en", "hi", "id", "pt")
currencystringNoCurrency code (e.g., "INR", "IDR", "BRL")
limitintegerNoNumber of results (default: 10, max: 100)
pageintegerNoPage number (default: 1)
sort_bystringNoSort field (price_asc, price_desc, year_desc, mileage_asc)

Example Request:

curl -X GET "https://api.carapis.com/v1/olx/search" \
-H "Authorization: Bearer YOUR_API_KEY" \
-G \
-d "make=Toyota" \
-d "model=Innova" \
-d "country=IN" \
-d "year_min=2020" \
-d "price_max=2000000" \
-d "limit=20"

Example Response:

{
"results": [
{
"id": "olx_12345",
"title": "2022 Toyota Innova Crysta GX",
"make": "Toyota",
"model": "Innova",
"year": 2022,
"trim": "Crysta GX",
"price": 1800000,
"currency": "INR",
"mileage": 15000,
"location": {
"country": "IN",
"city": "Mumbai",
"area": "Bandra West"
},
"specifications": {
"engine": "2.4L Diesel",
"transmission": "Manual",
"fuel_type": "Diesel",
"color": "Pearl White"
},
"features": ["Leather Seats", "Navigation", "Bluetooth"],
"images": ["https://example.com/image1.jpg"],
"seller": {
"name": "Mumbai Auto Gallery",
"type": "dealer",
"rating": 4.8
},
"url": "https://olx.in/vehicle/12345",
"language": "en",
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T10:30:00Z"
}
],
"total": 150,
"page": 1,
"limit": 20,
"has_more": true
}

Perform complex searches with multiple criteria across global markets.

Endpoint: POST /search/advanced

Request Body
{
"filters": {
"make": ["Toyota", "Honda"],
"model": ["Innova", "City"],
"year_range": { "min": 2020, "max": 2023 },
"price_range": { "min": 1000000, "max": 3000000 },
"location": {
"countries": ["IN", "ID", "BR"],
"cities": ["Mumbai", "Jakarta", "São Paulo"]
},
"features": ["leather_seats", "sunroof", "navigation"],
"condition": "used",
"language": "en"
},
"sorting": {
"field": "price",
"order": "asc"
},
"pagination": {
"page": 1,
"limit": 50
}
}

Search across multiple countries simultaneously.

Endpoint: GET /search/global

Request Parameters
ParameterTypeRequiredDescription
countriesarrayYesArray of country codes
makestringNoVehicle make
modelstringNoVehicle model
price_minintegerNoMinimum price
price_maxintegerNoMaximum price
limit_per_countryintegerNoResults per country (default: 10)

Example Request:

curl -X GET "https://api.carapis.com/v1/olx/search/global" \
-H "Authorization: Bearer YOUR_API_KEY" \
-G \
-d "countries=IN,ID,BR" \
-d "make=Honda" \
-d "model=City" \
-d "limit_per_country=20"

Vehicle Details

Get Vehicle Details

Retrieve detailed information for a specific vehicle.

Endpoint: GET /vehicle/\{vehicle_id\}

Example Request:

curl -X GET "https://api.carapis.com/v1/olx/vehicle/olx_12345" \
-H "Authorization: Bearer YOUR_API_KEY"

Example Response:

{
"id": "olx_12345",
"title": "2022 Toyota Innova Crysta GX",
"make": "Toyota",
"model": "Innova",
"year": 2022,
"trim": "Crysta GX",
"vin": "1HGBH41JXMN109186",
"price": 1800000,
"currency": "INR",
"original_price": 2000000,
"price_history": [
{ "date": "2024-01-01", "price": 2000000 },
{ "date": "2024-01-15", "price": 1800000 }
],
"mileage": 15000,
"mileage_unit": "km",
"location": {
"country": "IN",
"city": "Mumbai",
"area": "Bandra West",
"coordinates": { "lat": 19.076, "lng": 72.8777 }
},
"specifications": {
"engine": {
"size": "2.4L",
"cylinders": 4,
"type": "Diesel",
"power": "150 hp",
"torque": "343 Nm"
},
"transmission": {
"type": "Manual",
"speeds": 6
},
"fuel_type": "Diesel",
"fuel_economy": {
"city": "12.5 km/l",
"highway": "16.8 km/l"
},
"exterior": {
"color": "Pearl White",
"body_style": "MPV",
"doors": 5
},
"interior": {
"color": "Beige",
"seats": 7,
"upholstery": "Fabric"
}
},
"features": ["Leather Seats", "Navigation System", "Bluetooth Connectivity", "Sunroof", "Backup Camera", "Blind Spot Monitor", "Lane Departure Warning"],
"safety_features": ["ABS", "Traction Control", "Stability Control", "Airbags", "Child Safety Locks"],
"images": [
{
"url": "https://example.com/image1.jpg",
"type": "exterior",
"alt": "Front view"
},
{
"url": "https://example.com/image2.jpg",
"type": "interior",
"alt": "Dashboard"
}
],
"seller": {
"id": "seller_123",
"name": "Mumbai Auto Gallery",
"type": "dealer",
"rating": 4.8,
"reviews_count": 125,
"contact": {
"phone": "+91-22-1234-5678",
"email": "info@mumbaiautogallery.com"
},
"location": {
"address": "Bandra West, Mumbai",
"coordinates": { "lat": 19.076, "lng": 72.8777 }
}
},
"description": "Excellent condition 2022 Toyota Innova Crysta GX...",
"url": "https://olx.in/vehicle/12345",
"language": "en",
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T10:30:00Z"
}

Market Data

Retrieve market trends and analytics data for specific regions.

Endpoint: GET /market/trends

Request Parameters
ParameterTypeRequiredDescription
countrystringNoCountry code for regional trends
makestringNoVehicle make for brand-specific trends
modelstringNoVehicle model for model-specific trends
periodstringNoTime period (week, month, quarter, year)
metricstringNoMetric type (price, volume, demand)

Example Request:

curl -X GET "https://api.carapis.com/v1/olx/market/trends" \
-H "Authorization: Bearer YOUR_API_KEY" \
-G \
-d "country=IN" \
-d "make=Toyota" \
-d "period=month"

Example Response:

{
"country": "IN",
"make": "Toyota",
"period": "month",
"trends": {
"price_trends": [
{
"date": "2024-01-01",
"average_price": 1500000,
"median_price": 1450000,
"volume": 150
},
{
"date": "2024-01-15",
"average_price": 1550000,
"median_price": 1500000,
"volume": 165
}
],
"popular_models": [
{ "model": "Innova", "volume": 45, "avg_price": 1800000 },
{ "model": "Fortuner", "volume": 32, "avg_price": 3500000 },
{ "model": "Camry", "volume": 28, "avg_price": 4500000 }
],
"market_summary": {
"total_listings": 1250,
"average_price": 1550000,
"price_change": 3.3,
"volume_change": 10.0
}
}
}

Get the most popular vehicles in a region.

Endpoint: GET /market/popular

Example Request:

curl -X GET "https://api.carapis.com/v1/olx/market/popular" \
-H "Authorization: Bearer YOUR_API_KEY" \
-G \
-d "country=IN" \
-d "limit=10"

Example Response:

{
"country": "IN",
"period": "last_30_days",
"popular_vehicles": [
{
"make": "Toyota",
"model": "Innova",
"volume": 245,
"average_price": 1800000,
"trend": "increasing"
},
{
"make": "Honda",
"model": "City",
"volume": 189,
"average_price": 1200000,
"trend": "stable"
}
]
}

Utility Endpoints

Get Available Makes

Retrieve list of available vehicle makes by country.

Endpoint: GET /makes

Example Request:

curl -X GET "https://api.carapis.com/v1/olx/makes" \
-H "Authorization: Bearer YOUR_API_KEY" \
-G \
-d "country=IN"

Example Response:

{
"country": "IN",
"makes": [
{
"name": "Toyota",
"count": 1250,
"popular_models": ["Innova", "Fortuner", "Camry"]
},
{
"name": "Honda",
"count": 890,
"popular_models": ["City", "Amaze", "CR-V"]
}
]
}

Get Available Models

Retrieve models for a specific make and country.

Endpoint: GET /makes/\{make\}/models

Example Request:

curl -X GET "https://api.carapis.com/v1/olx/makes/Toyota/models" \
-H "Authorization: Bearer YOUR_API_KEY" \
-G \
-d "country=IN"

Example Response:

{
"make": "Toyota",
"country": "IN",
"models": [
{
"name": "Innova",
"count": 245,
"years": [2018, 2019, 2020, 2021, 2022, 2023]
},
{
"name": "Fortuner",
"count": 156,
"years": [2019, 2020, 2021, 2022, 2023]
}
]
}

Get Supported Countries

Retrieve list of supported countries and cities.

Endpoint: GET /locations

Example Response:

{
"countries": [
{
"code": "IN",
"name": "India",
"cities": [
{ "name": "Mumbai", "count": 4500 },
{ "name": "Delhi", "count": 3800 },
{ "name": "Bangalore", "count": 3200 }
]
},
{
"code": "ID",
"name": "Indonesia",
"cities": [
{ "name": "Jakarta", "count": 3800 },
{ "name": "Surabaya", "count": 2900 },
{ "name": "Bandung", "count": 2100 }
]
}
]
}

Get Supported Languages

Retrieve list of supported languages and their codes.

Endpoint: GET /languages

Example Response:

{
"languages": [
{
"code": "en",
"name": "English",
"countries": ["IN", "ID", "BR", "PK", "PH"]
},
{
"code": "hi",
"name": "Hindi",
"countries": ["IN"]
},
{
"code": "id",
"name": "Indonesian",
"countries": ["ID"]
},
{
"code": "pt",
"name": "Portuguese",
"countries": ["BR"]
}
]
}

Error Handling

HTTP Status Codes

Status Codes
CodeDescription
200Success
400Bad Request - Invalid parameters
401Unauthorized - Invalid API key
403Forbidden - Insufficient permissions
404Not Found - Resource not found
429Too Many Requests - Rate limit exceeded
500Internal Server Error
503Service Unavailable

Error Response Format

{
"error": {
"code": "RATE_LIMIT_EXCEEDED",
"message": "Rate limit exceeded. Please try again later.",
"details": {
"limit": 100,
"reset_time": "2024-01-15T11:00:00Z"
}
}
}

Common Error Codes

Common Errors
Error CodeDescriptionSolution
INVALID_API_KEYAPI key is invalid or expiredCheck your API key
RATE_LIMIT_EXCEEDEDToo many requestsImplement rate limiting
INVALID_PARAMETERSRequest parameters are invalidCheck parameter values
RESOURCE_NOT_FOUNDRequested resource doesn't existVerify resource ID
SERVICE_UNAVAILABLEService temporarily unavailableRetry later
UNSUPPORTED_COUNTRYCountry not supportedCheck supported countries
LANGUAGE_NOT_SUPPORTEDLanguage not supportedCheck supported languages

Rate Limiting

Rate Limits by Plan

Rate Limits
PlanRequests/SecondRequests/MinuteRequests/Hour
Starter51001,000
Professional105005,000
Enterprise502,00020,000

Rate Limit Headers

X-RateLimit-Limit: 100
X-RateLimit-Remaining: 95
X-RateLimit-Reset: 1642233600

Code Examples

Python SDK

import requests

class OLXAPI:
def __init__(self, api_key):
self.api_key = api_key
self.base_url = "https://api.carapis.com/v1/olx"
self.headers = {"Authorization": f"Bearer \{api_key\}"}

def search_vehicles(self, **params):
response = requests.get(f"{self.base_url}/search",
params=params, headers=self.headers)
return response.json()

def get_vehicle(self, vehicle_id):
response = requests.get(f"{self.base_url}/vehicle/\{vehicle_id\}",
headers=self.headers)
return response.json()

def get_market_trends(self, **params):
response = requests.get(f"{self.base_url}/market/trends",
params=params, headers=self.headers)
return response.json()

def search_global(self, countries, **params):
params['countries'] = countries
response = requests.get(f"{self.base_url}/search/global",
params=params, headers=self.headers)
return response.json()

# Usage
api = OLXAPI("YOUR_API_KEY")
vehicles = api.search_vehicles(make="Toyota", country="IN", limit=10)

JavaScript SDK

class OLXAPI {
constructor(apiKey) {
this.apiKey = apiKey;
this.baseUrl = 'https://api.carapis.com/v1/olx';
this.headers = {
Authorization: `Bearer $\{apiKey\}`,
'Content-Type': 'application/json',
};
}

async searchVehicles(params = {}) {
const queryString = new URLSearchParams(params).toString();
const response = await fetch(`${this.baseUrl}/search?$\{queryString\}`, {
headers: this.headers,
});
return response.json();
}

async getVehicle(vehicleId) {
const response = await fetch(`${this.baseUrl}/vehicle/$\{vehicleId\}`, {
headers: this.headers,
});
return response.json();
}

async getMarketTrends(params = {}) {
const queryString = new URLSearchParams(params).toString();
const response = await fetch(`${this.baseUrl}/market/trends?$\{queryString\}`, {
headers: this.headers,
});
return response.json();
}

async searchGlobal(countries, params = {}) {
params.countries = countries;
const queryString = new URLSearchParams(params).toString();
const response = await fetch(`${this.baseUrl}/search/global?$\{queryString\}`, {
headers: this.headers,
});
return response.json();
}
}

// Usage
const api = new OLXAPI('YOUR_API_KEY');
const vehicles = await api.searchVehicles({ make: 'Toyota', country: 'IN', limit: 10 });

Next Steps

Continue Learning
  1. Quick Start Guide - Get started in minutes
  2. Market Analysis - Global insights
  3. FAQ - Common questions and solutions
  4. Examples - More code examples
Need Help?

Ready to integrate the OLX Autos API into your application? Start building with our comprehensive API reference and code examples.

Get Started Now →