carwow-scraper-trial
Pricing
Pay per usage
carwow-scraper-trial
π Carwow UK Car Leasing Scraper

This Apify actor allows you to scrape car leasing deals and vehicle data from Carwow UK, one of the UK's leading car buying and leasing platforms. Extract detailed pricing, specifications, and contract information for personal and business car leasing deals.
π Key Features
- π Scrape car leasing deals from Carwow search results or individual deal pages
- π Filter by brand and model (e.g., Audi Q3, BMW X5)
- π Location-based search with UK postcode and distance filtering
- π° Extract comprehensive pricing data (monthly payments, initial payments, broker fees)
- π Deal scoring and rating information
- π§ Vehicle specifications (transmission, fuel type, engine size)
- π Contract details (term length, mileage, maintenance included)
- πΌοΈ Vehicle images extraction
- π Proxy support for stable, anonymous scraping
- βοΈ Flexible sorting options (best match, price, newest)
β Why Use This Actor
- β Automate car leasing deal collection from Carwow UK
- β Compare lease prices across multiple vehicles and configurations
- β Build datasets for automotive market analysis
- β Monitor deal scores and pricing trends over time
- β Integrate leasing data into price comparison platforms
- β Track availability and special offers for specific models
π₯ Who Is This Actor Suitable For?
- π Car leasing brokers and comparison websites
- π Automotive market researchers and analysts
- π§ Data scientists studying vehicle pricing trends
- π§° Developers building automotive platforms
- πΌ Fleet managers evaluating leasing options
- π Academic researchers studying the UK automotive market
π₯ Input Schema
The actor accepts two primary input methods:
Method 1: Direct URLs (Highest Priority)
Provide specific Carwow URLs to scrape directly:
{"startUrls": [{"url": "https://quotes.carwow.co.uk/stock_cars/deal-cards?brand_slug=audi&model_slug=q3-sportback&lease_type=personal"}],"maxItems": 100,"proxyConfiguration": {"useApifyProxy": false}}
Method 2: Search Parameters
Use structured filters to build search queries:
{"brandSlug": "audi","modelSlug": "q3-sportback","postcode": "M1 1AE","distance": 40,"dealTypeGroup": "leasing","leaseType": "personal","vehicleType": "car","availability": "all","vehicleStateGroup": "all","sort": "best_match","maxItems": 100,"proxyConfiguration": {"useApifyProxy": false}}
Input Parameters
| Parameter | Type | Description | Required | Default |
|---|---|---|---|---|
startUrls | array | Direct URLs to scrape. Takes priority over search parameters. | No | - |
brandSlug | string | Brand identifier (e.g., 'audi', 'bmw', 'mercedes-benz') | No* | 'audi' |
modelSlug | string | Model identifier (e.g., 'q3-sportback', 'x5'). Leave empty for all models. | No | 'q3-sportback' |
postcode | string | UK postcode for location-based search (e.g., 'M1 1AE', 'SW1A 1AA') | No | 'M1 1AE' |
distance | integer | Search radius in miles from postcode (1-500) | No | 40 |
dealTypeGroup | string | Type of deal: 'leasing', 'finance', or 'cash' | No | 'leasing' |
leaseType | string | Lease type: 'personal' or 'business' | No | 'personal' |
vehicleType | string | Vehicle type: 'car', 'van', 'pickup' | No | 'car' |
availability | string | Availability filter: 'all', 'in_stock', 'factory_order' | No | 'all' |
vehicleStateGroup | string | Vehicle condition: 'all', 'new', 'nearly_new', 'used' | No | 'all' |
sort | string | Sort order: 'best_match', 'price_asc', 'price_desc', 'newest' | No | 'best_match' |
maxItems | integer | Maximum number of deals to scrape. Set to 0 for unlimited. | No | 100 |
proxyConfiguration | object | Proxy settings for scraping | No | { "useApifyProxy": false } |
*Required if startUrls is not provided.
π€ Output Schema
The actor outputs detailed car leasing deal information in JSON format:
{"id": "12345678","url": "https://www.carwow.co.uk/deals/audi-q3-sportback-estate-35-tfsi-s-line-5dr","brand": "Audi","model": "Q3 Sportback","derivative": "35 TFSI S Line 5dr","transmission": "Automatic","fuelType": "Petrol","engineSize": "1.5L","badge": "In Stock","dealScore": {"score": 8.5,"label": "Great Deal"},"pricing": {"monthlyPayment": "Β£299 per month","monthlyPaymentRaw": 299},"contractDetails": {"termMonths": 36,"monthlyPayment": 299,"initialPayment": 2691,"brokerFee": 299,"annualMileage": 10000,"maintenanceIncluded": false,"metallicColourIncluded": true},"images": ["https://cdn.carwow.co.uk/images/...","https://cdn.carwow.co.uk/images/..."]}
Output Fields
Basic Information:
id: Unique car deal identifierurl: Direct link to the deal pagebrand: Vehicle manufacturermodel: Vehicle model namederivative: Specific trim/variant
Specifications:
transmission: Manual or AutomaticfuelType: Petrol, Diesel, Electric, Hybrid, etc.engineSize: Engine capacity (e.g., "1.5L")badge: Availability status badge
Deal Scoring:
dealScore.score: Numerical deal rating (0-10)dealScore.label: Deal quality label (e.g., "Great Deal")
Pricing:
pricing.monthlyPayment: Formatted monthly cost with currencypricing.monthlyPaymentRaw: Numeric monthly cost for calculations
Contract Details:
termMonths: Contract duration in monthsmonthlyPayment: Monthly payment amountinitialPayment: Upfront payment requiredbrokerFee: Broker arrangement feeannualMileage: Annual mileage allowancemaintenanceIncluded: Whether maintenance is includedmetallicColourIncluded: Whether metallic paint is included
Media:
images: Array of vehicle image URLs
π§ Technical Implementation
Architecture
The actor uses a two-phase scraping strategy:
-
List Phase: Extracts car IDs from search result pages
- Paginates through results until
maxItemsis reached - Identifies cars using Turbo Frame IDs
- Queues detail requests for each car
- Paginates through results until
-
Detail Phase: Fetches comprehensive data for each car
- Uses Turbo Frame headers for efficient loading
- Parses pricing, specifications, and contract details
- Extracts images and deal scoring information
Key Technologies
- Runtime: Node.js 20
- Framework: Crawlee 3.0 (CheerioCrawler)
- Platform: Apify SDK 3.2.5
- Language: TypeScript 5.5
- Parser: Cheerio (lightweight HTML parsing)
Source Code Structure
carwow/βββ src/β βββ main.ts # Entry point, crawler initializationβ βββ routes.ts # Request handlers (list & detail)β βββ utils.ts # Helper functions (URL construction, parsing)β βββ interfaces.ts # TypeScript type definitionsβββ .actor/β βββ actor.json # Actor metadataβ βββ input.json # Input schema definitionβ βββ output.json # Output view configurationsβββ Dockerfile # Multi-stage Docker buildβββ package.json # Dependencies and scriptsβββ tsconfig.json # TypeScript configuration
Special Features
Cookie-based Location Filtering:
// Postcode is injected via cookies for accurate distance filteringrequest.headers = {...request.headers,Cookie: `user_postcode=${formattedPostcode};`};
Turbo Frame Loading:
// Uses Turbo Frame headers for efficient detail page loadingrequest.headers = {...request.headers,'turbo-frame': `lazy_deal_card_${request.userData.carId}`};
Batch Processing:
// Requests are batched to avoid overwhelming the target serverawait crawler.addRequests(requests, {batchSize: 10,waitBetweenBatchesMillis: 2000});
π³ Docker Configuration
The actor uses a multi-stage Docker build for optimization:
Stage 1 (Builder):
- Base:
apify/actor-node-puppeteer-chrome:20 - Installs all dependencies (including dev dependencies)
- Compiles TypeScript to JavaScript
Stage 2 (Production):
- Copies only compiled JavaScript files
- Installs production dependencies only
- Significantly reduces final image size
Build & Run:
# Build the imagedocker build -t carwow-scraper .# Run locallydocker run -it carwow-scraper
π― Usage Examples
Example 1: Scrape Audi Q3 Personal Leasing Deals
{"brandSlug": "audi","modelSlug": "q3-sportback","leaseType": "personal","maxItems": 50}
Example 2: Business Lease Deals Near Manchester
{"brandSlug": "bmw","modelSlug": "x5","leaseType": "business","postcode": "M1 1AE","distance": 100,"maxItems": 100}
Example 3: All BMW Models, In Stock Only
{"brandSlug": "bmw","availability": "in_stock","sort": "price_asc","maxItems": 200}
Example 4: Direct URL Scraping
{"startUrls": [{"url": "https://quotes.carwow.co.uk/stock_cars/deal-cards?brand_slug=mercedes-benz&model_slug=c-class&lease_type=business&sort=price_asc"}]}
π Data Views
The actor provides three pre-configured data views in the Apify platform:
1. Overview
Displays essential deal information:
- Car ID, Brand, Model, Derivative
- Deal URL and Images
- Monthly Payment and Deal Score
- Transmission, Fuel Type, Engine Size
2. Pricing Details
Focuses on financial information:
- Monthly Payment (raw numbers for calculations)
- Contract Term, Initial Payment, Broker Fee
- Annual Mileage and Deal Score
3. Vehicle Specifications
Shows technical details:
- Transmission and Fuel Type
- Engine Size and Availability Badge
- Maintenance and Metallic Colour Inclusion
β οΈ Important Notes
- startUrls Priority: If
startUrlsis provided, all other search parameters are ignored. - Rate Limiting: The actor implements delays and batch processing to respect server resources.
- Postcode Format: UK postcodes should include the space (e.g., "M1 1AE" not "M11AE").
- Distance Filter: Only works when a valid postcode is provided.
- Model Slug: Leave empty to get all models for a specific brand.
- Proxy Recommended: For large scraping jobs, using Apify Proxy is recommended for stability.
π οΈ Development
Local Development
# Install dependenciesnpm install# Run in development modenpm run start:dev# Build TypeScriptnpm run build# Run production buildnpm run start:prod
Testing
# Run tests (to be implemented)npm test
π Looking to Scrape Automotive Websites?
Interested in similar scrapers for other automotive platforms? Contact us for custom automotive data extraction solutions:
- Car comparison websites
- Dealership inventory systems
- Vehicle specification databases
- Automotive marketplaces
π Contact & Support
Author: Yurii
License: ISC
Need help with customization or have questions?
- Create an issue on the Apify platform
- Request custom features or modifications
- Report bugs or unexpected behavior
π Related Resources
This actor is for educational and research purposes. Please review Carwow's terms of service and robots.txt before extensive scraping. Always respect rate limits and server resources.
