Skip to main content

Quick Start Guide

Quick Start

Get started with Cardekho.com parser in minutes. Extract Indian automotive data with just a few lines of code.

🚀 Prerequisites

Before you begin, ensure you have:

  • API Key: Get your API key from the Carapis Dashboard
  • Programming Language: Choose your preferred language (JavaScript, Python, PHP, etc.)
  • Internet Connection: Stable connection for API requests
  • Indian Market Knowledge: Basic understanding of Indian automotive market

📋 Step 1: Get Your API Key

  1. Sign up at Carapis Dashboard
  2. Navigate to the API Keys section
  3. Create a new API key for Cardekho.com parser
  4. Copy your API key (keep it secure!)
# Your API key will look like this:
cardekho_parser_sk_1234567890abcdef1234567890abcdef

🔧 Step 2: Install SDK (Optional)

JavaScript/Node.js

npm install @carapis/cardekho-parser
# or
yarn add @carapis/cardekho-parser

Python

pip install carapis-cardekho-parser

PHP

composer require carapis/cardekho-parser

📝 Step 3: Make Your First Request

JavaScript Example

// Using the SDK
const { CardekhoParser } = require('@carapis/cardekho-parser');

const parser = new CardekhoParser({
apiKey: 'cardekho_parser_sk_1234567890abcdef1234567890abcdef',
region: 'mumbai',
});

// Extract vehicle listings
async function getVehicles() {
try {
const vehicles = await parser.extractListings({
filters: {
make: 'Maruti Suzuki',
yearFrom: 2020,
priceMax: 800000,
},
limit: 10,
});

console.log(`Found ${vehicles.length} Maruti Suzuki vehicles from 2020+ under 8L INR`);
vehicles.forEach((vehicle) => {
console.log(`${vehicle.year} ${vehicle.make} ${vehicle.model} - ₹${vehicle.price.current.toLocaleString()}`);
});
} catch (error) {
console.error('Error:', error.message);
}
}

getVehicles();

Python Example

# Using the SDK
from carapis_cardekho_parser import CardekhoParser

parser = CardekhoParser(
api_key="cardekho_parser_sk_1234567890abcdef1234567890abcdef",
region="delhi"
)

# Extract market data
try:
vehicles = parser.extract_listings(
filters={
"make": "Hyundai",
"body_type": "SUV",
"price_min": 500000
},
limit=10
)

print(f"Found {len(vehicles)} Hyundai SUVs above 5L INR")
for vehicle in vehicles:
print(f"{vehicle['year']} {vehicle['make']} {vehicle['model']} - ₹{vehicle['price']['current']:,}")

except Exception as e:
print(f"Error: {e}")

Direct API Call (cURL)

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": "Honda",
"yearFrom": 2019,
"priceMax": 1200000
},
"options": {
"region": "bangalore",
"limit": 5,
"dataFields": ["price", "specifications", "seller_info"]
}
}'

📊 Step 4: Understand the Response

{
"success": true,
"data": {
"vehicles": [
{
"id": "cardekho_12345",
"title": "2021 Honda City VX",
"url": "https://www.cardekho.com/car-details/12345",
"price": {
"current": 950000,
"currency": "INR",
"negotiable": true,
"emi": 18500,
"down_payment": 200000
},
"specifications": {
"make": "Honda",
"model": "City",
"year": 2021,
"engine": "1.5L i-VTEC",
"transmission": "Manual",
"mileage": 30000,
"fuel_type": "Petrol",
"body_type": "Sedan",
"color": "White"
},
"location": {
"city": "Bangalore",
"state": "Karnataka",
"coordinates": [12.9716, 77.5946]
},
"seller": {
"type": "dealer",
"name": "Honda Cars Bangalore",
"rating": 4.6,
"verified": true,
"phone": "+91 80 XXXX XXXX"
},
"market_data": {
"days_listed": 5,
"views": 85,
"price_trend": "stable",
"market_position": "competitive"
}
}
],
"pagination": {
"total": 2800,
"page": 1,
"per_page": 5,
"total_pages": 560
},
"metadata": {
"extraction_time": "2024-01-15T10:30:00Z",
"region": "bangalore",
"filters_applied": {
"make": "Honda",
"yearFrom": 2019,
"priceMax": 1200000
}
}
}
}

🎯 Step 5: Common Use Cases

Extract Maruti Suzuki Vehicles in Mumbai

const vehicles = await parser.extractListings({
filters: {
make: 'Maruti Suzuki',
city: 'mumbai',
priceMax: 1000000,
},
options: {
limit: 100,
dataFields: ['price', 'specifications', 'location'],
},
});

Get SUV Market Analysis for Delhi

const vehicles = await parser.extractListings({
filters: {
bodyType: 'SUV',
yearFrom: 2019,
city: 'delhi',
},
options: {
limit: 50,
dataFields: ['price', 'market_data', 'specifications'],
},
});

// Calculate average SUV price in Delhi
const avgPrice = vehicles.reduce((sum, v) => sum + v.price.current, 0) / vehicles.length;
console.log(`Average SUV price in Delhi: ₹${avgPrice.toLocaleString()}`);

Monitor Dealer Inventory

const dealerVehicles = await parser.extractListings({
filters: {
sellerType: 'dealer',
city: 'chennai',
},
options: {
limit: 200,
dataFields: ['seller_info', 'price', 'specifications'],
},
});

// Group by dealer
const dealerInventory = {};
dealerVehicles.forEach((vehicle) => {
const dealer = vehicle.seller.name;
if (!dealerInventory[dealer]) {
dealerInventory[dealer] = [];
}
dealerInventory[dealer].push(vehicle);
});

⚙️ Configuration Options

Regional Settings

const parser = new CardekhoParser({
apiKey: 'your_api_key',
region: 'mumbai', // Indian city focus
language: 'en', // English language
currency: 'INR', // Indian Rupee
});

Data Field Selection

const vehicles = await parser.extractListings({
filters: { make: 'Hyundai' },
options: {
dataFields: [
'price', // Pricing information
'specifications', // Vehicle specs
'location', // Geographic data
'seller_info', // Seller details
'market_data', // Market insights
'financing', // EMI and financing options
],
},
});

Rate Limiting

const parser = new CardekhoParser({
apiKey: 'your_api_key',
rateLimit: {
requestsPerMinute: 60,
requestsPerHour: 1000,
},
});

🔍 Error Handling

try {
const vehicles = await parser.extractListings({
filters: { make: 'Maruti Suzuki' },
});
} catch (error) {
switch (error.code) {
case 'AUTHENTICATION_ERROR':
console.error('Invalid API key');
break;
case 'RATE_LIMIT_EXCEEDED':
console.error('Rate limit exceeded. Please wait.');
break;
case 'INVALID_FILTERS':
console.error('Invalid filter parameters');
break;
case 'EXTRACTION_FAILED':
console.error('Data extraction failed. Please try again.');
break;
case 'REGION_NOT_SUPPORTED':
console.error('Region not supported');
break;
default:
console.error('Unexpected error:', error.message);
}
}

📈 Next Steps

  1. Explore the API Reference for detailed endpoint documentation
  2. Check out Market Analysis for Indian automotive market insights
  3. Review the FAQ for common questions and troubleshooting
  4. Join our community for support and updates

🆘 Need Help?


Ready to extract Indian automotive data? Start building with Cardekho.com parser today!