Skip to main content

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

ParameterTypeDescriptionExample
makestringVehicle make/brand"Maruti Suzuki", "Hyundai"
modelstringVehicle model"Swift", "i20"
yearFromnumberMinimum year2019
yearTonumberMaximum year2023
priceMinnumberMinimum price (INR)500000
priceMaxnumberMaximum price (INR)2000000
bodyTypestringBody type"SUV", "Sedan", "Hatchback"
fuelTypestringFuel type"Petrol", "Diesel", "Electric"
transmissionstringTransmission type"Manual", "Automatic"
citystringCity name"Mumbai", "Delhi"
statestringState name"Maharashtra", "Delhi"
sellerTypestringSeller type"dealer", "private"
mileageMaxnumberMaximum mileage (km)50000

Option Parameters

ParameterTypeDescriptionDefault
regionstringTarget region"mumbai"
limitnumberResults per page (1-100)50
pagenumberPage number1
dataFieldsarrayFields to extractAll fields
sortBystringSort field"date"
sortOrderstringSort order"desc"

Available Data Fields

  • price - Pricing information
  • specifications - Vehicle specifications
  • location - Geographic data
  • seller_info - Seller details
  • market_data - Market insights
  • financing - EMI and financing options
  • images - Vehicle images
  • description - 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 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

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

CodeDescription
200Success
400Bad Request - Invalid parameters
401Unauthorized - Invalid API key
403Forbidden - Insufficient permissions
429Too Many Requests - Rate limit exceeded
500Internal Server Error
503Service Unavailable

⚡ Rate 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

CodeDescriptionSolution
INVALID_API_KEYAPI key is invalid or expiredCheck your API key
RATE_LIMIT_EXCEEDEDRate limit exceededWait or upgrade plan
INVALID_FILTERSInvalid filter parametersCheck filter syntax
EXTRACTION_FAILEDData extraction failedRetry or contact support
REGION_NOT_SUPPORTEDRegion not supportedUse 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


Start extracting Indian automotive data with our comprehensive Cardekho.com parser API.