AutoScout24 Parser Quick Start
Get started with AutoScout24 parser in 5 minutes. Extract European automotive data with your first API call.
What You'll Learn
- Set up your API key and authentication
- Make your first API call to extract vehicle data
- Handle responses and error cases
- Scale your integration for production use
🚀 Prerequisites
Before you begin, ensure you have:
System Requirements
Requirement | Minimum | Recommended |
---|---|---|
API Key | Valid Carapis key | AutoScout24 parser access |
Programming | Any language | JavaScript, Python, cURL |
Network | Stable internet | High-speed connection |
Knowledge | Basic API concepts | European automotive market |
🔑 Step 1: Get Your API Key
Sign Up for Carapis
- Visit Carapis Dashboard
- Create account with your email and password
- Verify email to activate your account
- Access dashboard to manage your API keys
Generate AutoScout24 API Key
- Navigate to API Keys section in dashboard
- Click "Create New API Key"
- Select "AutoScout24 Parser" from dropdown
- Copy your API key (format:
autoscout24_parser_sk_...
)
API Key Security
Keep your API key secure and never share it publicly. Store it in environment variables or secure configuration files.
🔧 Step 2: Choose Your Integration Method
Option A: JavaScript/Node.js
const axios = require('axios');
const API_KEY = 'autoscout24_parser_sk_1234567890abcdef1234567890abcdef';
const BASE_URL = 'https://api.carapis.com/v1/parsers/autoscout24';
async function searchVehicles() {
try {
const response = await axios.post(
`${BASE_URL}/search`,
{
query: 'BMW X5 2020',
country: 'DE',
max_price: 50000,
fuel_type: 'diesel',
location: 'Munich',
},
{
headers: {
Authorization: `Bearer ${API_KEY}`,
'Content-Type': 'application/json',
},
},
);
console.log(`Found ${response.data.data.listings.length} vehicles`);
return response.data;
} catch (error) {
console.error('Error:', error.response?.data || error.message);
throw error;
}
}
// Usage
searchVehicles().then((data) => {
console.log('First vehicle:', data.data.listings[0]);
});
Option B: Python
import requests
import json
API_KEY = 'autoscout24_parser_sk_1234567890abcdef1234567890abcdef'
BASE_URL = 'https://api.carapis.com/v1/parsers/autoscout24'
def search_vehicles():
headers = {
'Authorization': f'Bearer {API_KEY}',
'Content-Type': 'application/json'
}
data = {
'query': 'BMW X5 2020',
'country': 'DE',
'max_price': 50000,
'fuel_type': 'diesel',
'location': 'Munich'
}
try:
response = requests.post(f'{BASE_URL}/search', json=data, headers=headers)
response.raise_for_status()
result = response.json()
print(f"Found {len(result['data']['listings'])} vehicles")
return result
except requests.exceptions.RequestException as e:
print(f'Error: {e}')
return None
# Usage
result = search_vehicles()
if result:
print('First vehicle:', result['data']['listings'][0])
Option C: cURL
curl -X POST "https://api.carapis.com/v1/parsers/autoscout24/search" \
-H "Authorization: Bearer autoscout24_parser_sk_1234567890abcdef1234567890abcdef" \
-H "Content-Type: application/json" \
-d '{
"query": "BMW X5 2020",
"country": "DE",
"max_price": 50000,
"fuel_type": "diesel",
"location": "Munich"
}'
📊 Step 3: Understand the Response
Sample Response Structure
{
"success": true,
"data": {
"listings": [
{
"id": "123456789",
"title": "BMW X5 xDrive30d",
"price": {
"amount": 45000,
"currency": "EUR",
"formatted": "€45,000"
},
"specifications": {
"year": 2020,
"mileage": 45000,
"fuel_type": "Diesel",
"transmission": "Automatic",
"engine_size": "3.0L",
"power": "286 hp"
},
"location": {
"city": "Munich",
"country": "Germany",
"coordinates": {
"lat": 48.1351,
"lng": 11.582
}
},
"dealer": {
"name": "BMW Premium Selection",
"rating": 4.7,
"certified": true
},
"features": ["Navigation", "Leather Seats", "Panoramic Roof"],
"images": ["url1", "url2"],
"url": "https://www.autoscout24.com/...",
"extracted_at": "2024-01-15T10:30:00Z"
}
],
"total_count": 1250,
"search_metadata": {
"query": "BMW X5 2020",
"country": "DE",
"filters_applied": {
"max_price": 50000,
"fuel_type": "diesel"
}
}
}
}
Response Fields Explained
Response Structure
Field | Description | Example |
---|---|---|
success | Request success status | true |
listings | Array of vehicle listings | Vehicle objects |
total_count | Total matching vehicles | 1250 |
search_metadata | Search query and filters | Query details |
🎯 Step 4: Advanced Usage Examples
Search with Multiple Filters
// Advanced search with multiple filters
const advancedSearch = {
query: 'Mercedes C-Class',
country: 'DE',
year_from: 2018,
year_to: 2022,
price_min: 30000,
price_max: 60000,
fuel_type: 'hybrid',
transmission: 'automatic',
body_type: 'sedan',
location: 'Berlin',
limit: 50,
};
const response = await axios.post(`${BASE_URL}/search`, advancedSearch, {
headers: { Authorization: `Bearer ${API_KEY}` },
});
Extract Detailed Vehicle Information
# Get detailed information for a specific vehicle
def get_vehicle_details(vehicle_id):
url = f'{BASE_URL}/extract/{vehicle_id}'
headers = {
'Authorization': f'Bearer {API_KEY}',
'Content-Type': 'application/json'
}
response = requests.get(url, headers=headers)
return response.json()
# Usage
vehicle_details = get_vehicle_details('123456789')
print('Vehicle details:', vehicle_details)
Batch Processing
// Process multiple searches efficiently
async function batchSearch(queries) {
const promises = queries.map((query) =>
axios.post(`${BASE_URL}/search`, query, {
headers: { Authorization: `Bearer ${API_KEY}` },
}),
);
const results = await Promise.all(promises);
return results.map((r) => r.data);
}
// Usage
const queries = [
{ query: 'BMW X5', country: 'DE' },
{ query: 'Audi Q7', country: 'DE' },
{ query: 'Mercedes GLE', country: 'DE' },
];
const batchResults = await batchSearch(queries);
⚡ Step 5: Error Handling
Common Error Scenarios
Common Issues
Error | Cause | Solution |
---|---|---|
401 Unauthorized | Invalid API key | Check key format and validity |
429 Too Many Requests | Rate limit exceeded | Reduce request frequency |
400 Bad Request | Invalid parameters | Check request format |
500 Internal Error | Server issue | Retry or contact support |
Error Handling Example
async function safeSearch(searchParams) {
try {
const response = await axios.post(`${BASE_URL}/search`, searchParams, {
headers: { Authorization: `Bearer ${API_KEY}` },
});
return { success: true, data: response.data };
} catch (error) {
if (error.response?.status === 429) {
// Rate limit exceeded - wait and retry
await new Promise((resolve) => setTimeout(resolve, 60000));
return safeSearch(searchParams);
}
return {
success: false,
error: error.response?.data || error.message,
};
}
}
import time
def safe_search(search_params):
try:
response = requests.post(f'{BASE_URL}/search', json=search_params, headers=headers)
response.raise_for_status()
return {'success': True, 'data': response.json()}
except requests.exceptions.HTTPError as e:
if e.response.status_code == 429:
# Rate limit exceeded - wait and retry
time.sleep(60)
return safe_search(search_params)
return {'success': False, 'error': str(e)}
except Exception as e:
return {'success': False, 'error': str(e)}
📈 Step 6: Production Best Practices
Rate Limiting
Rate Limits
Plan | Requests/Minute | Requests/Hour | Best Practice |
---|---|---|---|
Free | 10 | 100 | Development and testing |
Basic | 60 | 1,000 | Small applications |
Pro | 300 | 10,000 | Production applications |
Enterprise | Custom | Custom | High-volume applications |
Environment Configuration
// Environment-based configuration
const config = {
apiKey: process.env.AUTOSCOUT24_API_KEY,
baseUrl: process.env.API_BASE_URL || 'https://api.carapis.com/v1/parsers/autoscout24',
timeout: parseInt(process.env.API_TIMEOUT) || 30000,
retries: parseInt(process.env.API_RETRIES) || 3,
};
# Environment-based configuration
import os
config = {
'api_key': os.getenv('AUTOSCOUT24_API_KEY'),
'base_url': os.getenv('API_BASE_URL', 'https://api.carapis.com/v1/parsers/autoscout24'),
'timeout': int(os.getenv('API_TIMEOUT', 30)),
'retries': int(os.getenv('API_RETRIES', 3))
}
Logging and Monitoring
// Add logging for production monitoring
const logger = require('winston');
async function monitoredSearch(searchParams) {
const startTime = Date.now();
try {
const result = await safeSearch(searchParams);
const duration = Date.now() - startTime;
logger.info('Search completed', {
duration,
resultCount: result.data?.data?.listings?.length || 0,
query: searchParams.query,
});
return result;
} catch (error) {
logger.error('Search failed', {
error: error.message,
query: searchParams.query,
});
throw error;
}
}
🚀 Next Steps
Ready to Scale?
- API Reference - Complete endpoint documentation
- Market Analysis - European market insights
- FAQ - Common questions and solutions
- Examples - Advanced code examples
Need Help?
- Documentation - Complete API documentation
- Support - Technical assistance
- Community - Connect with other developers
- Status - Service status and uptime
You're all set! Start extracting European automotive data with AutoScout24 parser and build powerful automotive applications.