Skip to main content

Quick Start Guide for Guazi.com Parser

Get real-time access to China's largest C2C automotive marketplace in under 5 minutes.

What You'll Get
  • Instant API access to Guazi.com vehicle listings
  • Real-time data from China's top C2C marketplace
  • Multiple integration options - Python, JavaScript, cURL
  • Comprehensive vehicle details - specs, pricing, seller info
  • Anti-detection technology - reliable data extraction

Guazi.com Quick Start

Prerequisites

:::

Quick Start

info Requirements

  • Carapis API Key - Get yours at dashboard.carapis.com
  • Basic programming knowledge - Any language works
  • Internet connection - For API communication :::

Step 1: Get Your API Key

  1. Sign up at Carapis Dashboard
  2. Subscribe to the Guazi.com parser
  3. Copy your API key from the dashboard
API Key Format

Your Guazi.com parser API key will look like: guazi_parser_sk_1234567890abcdef1234567890abcdef

Step 2: Make Your First API Call

Python Integration

import requests
import json

# Your API configuration
API_KEY = "guazi_parser_sk_1234567890abcdef1234567890abcdef"
BASE_URL = "https://api.carapis.com/v1/parsers/guazi"

# Search for vehicles
def search_vehicles(keyword="BMW", limit=10):
headers = {
"Authorization": f"Bearer {API_KEY}",
"Content-Type": "application/json"
}

params = {
"keyword": keyword,
"limit": limit
}

response = requests.get(f"{BASE_URL}/search", headers=headers, params=params)

if response.status_code == 200:
return response.json()
else:
print(f"Error: {response.status_code}")
return None

# Get vehicle details
def get_vehicle_details(vehicle_id):
headers = {
"Authorization": f"Bearer {API_KEY}",
"Content-Type": "application/json"
}

response = requests.get(f"{BASE_URL}/vehicle/{vehicle_id}", headers=headers)

if response.status_code == 200:
return response.json()
else:
print(f"Error: {response.status_code}")
return None

# Example usage
if __name__ == "__main__":
# Search for BMW vehicles
vehicles = search_vehicles("BMW", 5)
if vehicles:
print(f"Found {len(vehicles['data'])} vehicles")

# Get details for first vehicle
if vehicles['data']:
first_vehicle = vehicles['data'][0]
details = get_vehicle_details(first_vehicle['id'])
if details:
print(f"Vehicle: {details['data']['title']}")
print(f"Price: ¥{details['data']['price']}")
print(f"Year: {details['data']['year']}")

JavaScript/Node.js Integration

const axios = require('axios');

// Your API configuration
const API_KEY = 'guazi_parser_sk_1234567890abcdef1234567890abcdef';
const BASE_URL = 'https://api.carapis.com/v1/parsers/guazi';

// Configure axios with default headers
const api = axios.create({
baseURL: BASE_URL,
headers: {
Authorization: `Bearer ${API_KEY}`,
'Content-Type': 'application/json',
},
});

// Search for vehicles
async function searchVehicles(keyword = 'BMW', limit = 10) {
try {
const response = await api.get('/search', {
params: {
keyword: keyword,
limit: limit,
},
});

return response.data;
} catch (error) {
console.error('Error searching vehicles:', error.response?.data || error.message);
return null;
}
}

// Get vehicle details
async function getVehicleDetails(vehicleId) {
try {
const response = await api.get(`/vehicle/${vehicleId}`);
return response.data;
} catch (error) {
console.error('Error getting vehicle details:', error.response?.data || error.message);
return null;
}
}

// Example usage
async function main() {
// Search for BMW vehicles
const vehicles = await searchVehicles('BMW', 5);

if (vehicles && vehicles.data) {
console.log(`Found ${vehicles.data.length} vehicles`);

// Get details for first vehicle
if (vehicles.data.length > 0) {
const firstVehicle = vehicles.data[0];
const details = await getVehicleDetails(firstVehicle.id);

if (details && details.data) {
console.log(`Vehicle: ${details.data.title}`);
console.log(`Price: ¥${details.data.price}`);
console.log(`Year: ${details.data.year}`);
}
}
}
}

main();

cURL Integration

# Search for vehicles
curl -X GET "https://api.carapis.com/v1/parsers/guazi/search?keyword=BMW&limit=5" \
-H "Authorization: Bearer guazi_parser_sk_1234567890abcdef1234567890abcdef" \
-H "Content-Type: application/json"

# Get vehicle details
curl -X GET "https://api.carapis.com/v1/parsers/guazi/vehicle/VEHICLE_ID" \
-H "Authorization: Bearer guazi_parser_sk_1234567890abcdef1234567890abcdef" \
-H "Content-Type: application/json"

Step 3: Understand the Response

Search Response Structure

{
"success": true,
"data": [
{
"id": "guazi_123456789",
"title": "BMW 3 Series 320i 2019",
"price": "280000",
"currency": "CNY",
"year": "2019",
"mileage": "45000",
"location": "Beijing",
"seller_type": "private",
"url": "https://www.guazi.com/vehicle/123456789",
"image_url": "https://img.guazi.com/vehicle/123456789.jpg",
"created_at": "2024-01-15T10:30:00Z"
}
],
"pagination": {
"total": 1250,
"page": 1,
"limit": 10,
"pages": 125
}
}

Vehicle Details Response

{
"success": true,
"data": {
"id": "guazi_123456789",
"title": "BMW 3 Series 320i 2019",
"price": "280000",
"currency": "CNY",
"year": "2019",
"month": "6",
"mileage": "45000",
"mileage_unit": "km",
"fuel_type": "gasoline",
"transmission": "automatic",
"engine_size": "2.0",
"engine_power": "156",
"color": "white",
"location": "Beijing",
"seller": {
"name": "Private Seller",
"type": "private",
"rating": "4.8",
"response_time": "2 hours"
},
"description": "Well-maintained BMW 3 Series...",
"features": ["Leather Seats", "Navigation", "Bluetooth"],
"images": ["https://img.guazi.com/vehicle/123456789_1.jpg", "https://img.guazi.com/vehicle/123456789_2.jpg"],
"url": "https://www.guazi.com/vehicle/123456789",
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T10:30:00Z"
}
}

Step 4: Common Use Cases

Search by Brand and Model

# Search for specific brand and model
vehicles = search_vehicles("BMW 3 Series", 20)

Filter by Price Range

# Search with price filter
params = {
"keyword": "BMW",
"min_price": "200000",
"max_price": "300000",
"limit": 10
}

Get Recent Listings

# Get latest listings
params = {
"sort": "newest",
"limit": 50
}

Step 5: Error Handling

Common Issues
  • 401 Unauthorized - Check your API key
  • 429 Too Many Requests - Rate limit exceeded
  • 500 Internal Server Error - Contact support
def handle_api_response(response):
if response.status_code == 200:
return response.json()
elif response.status_code == 401:
print("Invalid API key. Please check your credentials.")
elif response.status_code == 429:
print("Rate limit exceeded. Please wait before retrying.")
elif response.status_code == 500:
print("Server error. Please contact support.")
else:
print(f"Unexpected error: {response.status_code}")

return None

Step 6: Best Practices

For Optimal Performance
  • Use pagination for large datasets
  • Implement caching for frequently accessed data
  • Handle rate limits with exponential backoff
  • Validate responses before processing
  • Use HTTPS for all API calls
For Production Use
  • Store API keys securely - Use environment variables
  • Implement logging for debugging
  • Add error monitoring for reliability
  • Use connection pooling for efficiency
  • Monitor API usage to stay within limits

Next Steps

Ready to Scale?
  1. View API Reference - Complete endpoint documentation
  2. Explore Features - See all available capabilities
  3. Market Analysis - Understand Chinese automotive trends
  4. Check FAQ - Common questions and solutions
Need Help?

Start accessing Guazi.com automotive data today and unlock the Chinese C2C marketplace for your business.

Get Your API Key →