OLX Autos API Reference
Complete API documentation for extracting real-time automotive data from the world's leading global marketplace.
- Authentication - API key setup and usage
- Search Endpoints - Vehicle search and filtering
- Vehicle Details - Individual vehicle information
- Market Data - Market trends and analytics
- Error Handling - Common errors and solutions
Authentication
API Key Setup
All requests to the OLX Autos API require authentication using an API key.
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
Parameter | Type | Required | Description |
---|---|---|---|
make | string | No | Vehicle make (e.g., "Toyota", "Honda") |
model | string | No | Vehicle model (e.g., "Camry", "City") |
year_min | integer | No | Minimum year (e.g., 2020) |
year_max | integer | No | Maximum year (e.g., 2023) |
price_min | integer | No | Minimum price in local currency |
price_max | integer | No | Maximum price in local currency |
country | string | No | Country code (e.g., "IN", "ID", "BR") |
city | string | No | City name (e.g., "Mumbai", "Jakarta", "São Paulo") |
vehicle_type | string | No | Vehicle type (sedan, suv, truck, etc.) |
transmission | string | No | Transmission type (automatic, manual) |
fuel_type | string | No | Fuel type (petrol, diesel, hybrid, electric) |
condition | string | No | Vehicle condition (new, used, certified) |
mileage_min | integer | No | Minimum mileage |
mileage_max | integer | No | Maximum mileage |
features | array | No | Array of features (e.g., ["leather_seats", "sunroof"]) |
language | string | No | Language code (e.g., "en", "hi", "id", "pt") |
currency | string | No | Currency code (e.g., "INR", "IDR", "BRL") |
limit | integer | No | Number of results (default: 10, max: 100) |
page | integer | No | Page number (default: 1) |
sort_by | string | No | Sort 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
}
Advanced Search
Perform complex searches with multiple criteria across global markets.
Endpoint: POST /search/advanced
{
"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
}
}
Multi-Country Search
Search across multiple countries simultaneously.
Endpoint: GET /search/global
Parameter | Type | Required | Description |
---|---|---|---|
countries | array | Yes | Array of country codes |
make | string | No | Vehicle make |
model | string | No | Vehicle model |
price_min | integer | No | Minimum price |
price_max | integer | No | Maximum price |
limit_per_country | integer | No | Results 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
Get Market Trends
Retrieve market trends and analytics data for specific regions.
Endpoint: GET /market/trends
Parameter | Type | Required | Description |
---|---|---|---|
country | string | No | Country code for regional trends |
make | string | No | Vehicle make for brand-specific trends |
model | string | No | Vehicle model for model-specific trends |
period | string | No | Time period (week, month, quarter, year) |
metric | string | No | Metric 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 Popular Vehicles
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
Code | Description |
---|---|
200 | Success |
400 | Bad Request - Invalid parameters |
401 | Unauthorized - Invalid API key |
403 | Forbidden - Insufficient permissions |
404 | Not Found - Resource not found |
429 | Too Many Requests - Rate limit exceeded |
500 | Internal Server Error |
503 | Service 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
Error Code | Description | Solution |
---|---|---|
INVALID_API_KEY | API key is invalid or expired | Check your API key |
RATE_LIMIT_EXCEEDED | Too many requests | Implement rate limiting |
INVALID_PARAMETERS | Request parameters are invalid | Check parameter values |
RESOURCE_NOT_FOUND | Requested resource doesn't exist | Verify resource ID |
SERVICE_UNAVAILABLE | Service temporarily unavailable | Retry later |
UNSUPPORTED_COUNTRY | Country not supported | Check supported countries |
LANGUAGE_NOT_SUPPORTED | Language not supported | Check supported languages |
Rate Limiting
Rate Limits by Plan
Plan | Requests/Second | Requests/Minute | Requests/Hour |
---|---|---|---|
Starter | 5 | 100 | 1,000 |
Professional | 10 | 500 | 5,000 |
Enterprise | 50 | 2,000 | 20,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
- Quick Start Guide - Get started in minutes
- Market Analysis - Global insights
- FAQ - Common questions and solutions
- Examples - More code examples
- Documentation - Complete API guide
- Support - Technical assistance
- Community - Connect with other users
- Status - Check service status
Ready to integrate the OLX Autos API into your application? Start building with our comprehensive API reference and code examples.