API Reference
Complete API documentation for Cardekho.com parser with detailed endpoints, parameters, and response formats.
🔐 Authentication
All API requests require authentication using your API key in the Authorization header.
Authorization: Bearer cardekho_parser_sk_1234567890abcdef1234567890abcdef
API Key Format
- Prefix:
cardekho_parser_sk_
- Length: 64 characters
- Format: Hexadecimal string
- Scope: Cardekho.com parser access only
📡 Base URL
https://api.carapis.com/v1/parsers/cardekho.com
🚀 Core Endpoints
Extract Vehicle Listings
Extract vehicle data from Cardekho.com based on specified filters and options.
Endpoint: POST /extract
Request Parameters
{
"filters": {
"make": "string",
"model": "string",
"yearFrom": "number",
"yearTo": "number",
"priceMin": "number",
"priceMax": "number",
"bodyType": "string",
"fuelType": "string",
"transmission": "string",
"city": "string",
"state": "string",
"sellerType": "string",
"mileageMax": "number"
},
"options": {
"region": "string",
"limit": "number",
"page": "number",
"dataFields": ["string"],
"sortBy": "string",
"sortOrder": "string"
}
}
Filter Parameters
Parameter | Type | Description | Example |
---|---|---|---|
make | string | Vehicle make/brand | "Maruti Suzuki", "Hyundai" |
model | string | Vehicle model | "Swift", "i20" |
yearFrom | number | Minimum year | 2019 |
yearTo | number | Maximum year | 2023 |
priceMin | number | Minimum price (INR) | 500000 |
priceMax | number | Maximum price (INR) | 2000000 |
bodyType | string | Body type | "SUV", "Sedan", "Hatchback" |
fuelType | string | Fuel type | "Petrol", "Diesel", "Electric" |
transmission | string | Transmission type | "Manual", "Automatic" |
city | string | City name | "Mumbai", "Delhi" |
state | string | State name | "Maharashtra", "Delhi" |
sellerType | string | Seller type | "dealer", "private" |
mileageMax | number | Maximum mileage (km) | 50000 |
Option Parameters
Parameter | Type | Description | Default |
---|---|---|---|
region | string | Target region | "mumbai" |
limit | number | Results per page (1-100) | 50 |
page | number | Page number | 1 |
dataFields | array | Fields to extract | All fields |
sortBy | string | Sort field | "date" |
sortOrder | string | Sort order | "desc" |
Available Data Fields
price
- Pricing informationspecifications
- Vehicle specificationslocation
- Geographic dataseller_info
- Seller detailsmarket_data
- Market insightsfinancing
- EMI and financing optionsimages
- Vehicle imagesdescription
- Listing description
Response Format
{
"success": true,
"data": {
"vehicles": [
{
"id": "string",
"title": "string",
"url": "string",
"price": {
"current": "number",
"currency": "string",
"negotiable": "boolean",
"emi": "number",
"down_payment": "number"
},
"specifications": {
"make": "string",
"model": "string",
"year": "number",
"engine": "string",
"transmission": "string",
"mileage": "number",
"fuel_type": "string",
"body_type": "string",
"color": "string"
},
"location": {
"city": "string",
"state": "string",
"coordinates": ["number", "number"]
},
"seller": {
"type": "string",
"name": "string",
"rating": "number",
"verified": "boolean",
"phone": "string"
},
"market_data": {
"days_listed": "number",
"views": "number",
"price_trend": "string",
"market_position": "string"
}
}
],
"pagination": {
"total": "number",
"page": "number",
"per_page": "number",
"total_pages": "number"
},
"metadata": {
"extraction_time": "string",
"region": "string",
"filters_applied": "object"
}
}
}
Example Request
curl -X POST "https://api.carapis.com/v1/parsers/cardekho.com/extract" \
-H "Authorization: Bearer cardekho_parser_sk_1234567890abcdef1234567890abcdef" \
-H "Content-Type: application/json" \
-d '{
"filters": {
"make": "Maruti Suzuki",
"yearFrom": 2020,
"priceMax": 1000000,
"city": "mumbai"
},
"options": {
"region": "mumbai",
"limit": 10,
"dataFields": ["price", "specifications", "location"]
}
}'
Get Market Statistics
Retrieve market statistics and insights for specific criteria.
Endpoint: POST /statistics
Request Parameters
{
"filters": {
"make": "string",
"city": "string",
"timeRange": "string"
},
"metrics": ["string"]
}
Available Metrics
price_distribution
- Price range distributionmarket_share
- Brand/model market sharetrends
- Price and demand trendsregional_analysis
- Regional market analysisseasonal_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
Request Parameters
{
"filters": {
"city": "string",
"brand": "string",
"rating": "number"
},
"options": {
"limit": "number",
"include_inventory": "boolean"
}
}
Response Format
{
"success": true,
"data": {
"dealers": [
{
"id": "string",
"name": "string",
"city": "string",
"state": "string",
"rating": "number",
"verified": "boolean",
"phone": "string",
"website": "string",
"inventory_count": "number",
"specialties": ["string"]
}
],
"pagination": {
"total": "number",
"page": "number",
"per_page": "number"
}
}
}
🔧 Advanced Endpoints
Batch Extraction
Extract data for multiple criteria in a single request.
Endpoint: POST /batch-extract
Request Parameters
{
"requests": [
{
"filters": "object",
"options": "object"
}
],
"batch_options": {
"concurrent": "number",
"delay": "number"
}
}
Real-time Monitoring
Set up real-time monitoring for specific criteria.
Endpoint: POST /monitor
Request Parameters
{
"filters": "object",
"webhook_url": "string",
"conditions": {
"price_change": "number",
"new_listings": "boolean",
"inventory_change": "number"
}
}
📊 Response Codes
Code | Description |
---|---|
200 | Success |
400 | Bad Request - Invalid parameters |
401 | Unauthorized - Invalid API key |
403 | Forbidden - Insufficient permissions |
429 | Too Many Requests - Rate limit exceeded |
500 | Internal Server Error |
503 | Service Unavailable |
⚡ Rate Limits
Plan | Requests per Minute | Requests per Hour | Concurrent Requests |
---|---|---|---|
Free | 10 | 100 | 2 |
Basic | 60 | 1,000 | 5 |
Pro | 300 | 10,000 | 20 |
Enterprise | Custom | Custom | Custom |
🔍 Error Handling
Error Response Format
{
"success": false,
"error": {
"code": "string",
"message": "string",
"details": "object"
}
}
Common Error Codes
Code | Description | Solution |
---|---|---|
INVALID_API_KEY | API key is invalid or expired | Check your API key |
RATE_LIMIT_EXCEEDED | Rate limit exceeded | Wait or upgrade plan |
INVALID_FILTERS | Invalid filter parameters | Check filter syntax |
EXTRACTION_FAILED | Data extraction failed | Retry or contact support |
REGION_NOT_SUPPORTED | Region not supported | Use supported region |
📝 Code Examples
JavaScript
const axios = require('axios');
const apiKey = 'cardekho_parser_sk_1234567890abcdef1234567890abcdef';
const baseURL = 'https://api.carapis.com/v1/parsers/cardekho.com';
// Extract vehicles
async function extractVehicles() {
try {
const response = await axios.post(
`$\{baseURL\}/extract`,
{
filters: {
make: 'Maruti Suzuki',
yearFrom: 2020,
priceMax: 1000000,
city: 'mumbai',
},
options: {
region: 'mumbai',
limit: 10,
},
},
{
headers: {
Authorization: `Bearer $\{apiKey\}`,
'Content-Type': 'application/json',
},
},
);
return response.data;
} catch (error) {
console.error('Error:', error.response?.data || error.message);
}
}
Python
import requests
api_key = 'cardekho_parser_sk_1234567890abcdef1234567890abcdef'
base_url = 'https://api.carapis.com/v1/parsers/cardekho.com'
def extract_vehicles():
headers = {
'Authorization': f'Bearer \{api_key\}',
'Content-Type': 'application/json'
}
data = {
'filters': {
'make': 'Hyundai',
'body_type': 'SUV',
'price_min': 500000,
'city': 'delhi'
},
'options': {
'region': 'delhi',
'limit': 10
}
}
try:
response = requests.post(f'\{base_url\}/extract',
json=data, headers=headers)
response.raise_for_status()
return response.json()
except requests.exceptions.RequestException as e:
print(f'Error: \{e\}')
return None
PHP
<?php
$apiKey = 'cardekho_parser_sk_1234567890abcdef1234567890abcdef';
$baseURL = 'https://api.carapis.com/v1/parsers/cardekho.com';
function extractVehicles() {
global $apiKey, $baseURL;
$data = [
'filters' => [
'make' => 'Honda',
'yearFrom' => 2019,
'priceMax' => 1500000,
'city' => 'bangalore'
],
'options' => [
'region' => 'bangalore',
'limit' => 10
]
];
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $baseURL . '/extract');
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Authorization: Bearer ' . $apiKey,
'Content-Type: application/json'
]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
if ($httpCode === 200) {
return json_decode($response, true);
} else {
echo "Error: HTTP $httpCode\n";
return null;
}
}
?>
🔗 SDKs and Libraries
Official SDKs
- JavaScript/Node.js:
@carapis/cardekho-parser
- Python:
carapis-cardekho-parser
- PHP:
carapis/cardekho-parser
- Java:
com.carapis:cardekho-parser
- C#:
Carapis.CardekhoParser
Community Libraries
- Ruby:
carapis-cardekho-parser
- Go:
github.com/carapis/cardekho-parser
- Rust:
carapis-cardekho-parser
📞 Support
- Documentation: API Docs
- Support: Contact Support
- Status: API Status
- Community: Discord
Start extracting Indian automotive data with our comprehensive Cardekho.com parser API.