# Pakwheels Scraper (`shahidirfan/pakwheels-scraper`) Actor

Instantly extract vehicle listings from Pakistan's #1 automotive portal! Scrape cars, bikes, and parts from Pakwheels with blazing speed. This actor is optimized for raw performance, delivering detailed market data and pricing insights in seconds without any complex setup.

- **URL**: https://apify.com/shahidirfan/pakwheels-scraper.md
- **Developed by:** [Shahid Irfan](https://apify.com/shahidirfan) (community)
- **Categories:** Automation, Developer tools, E-commerce
- **Stats:** 11 total users, 0 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-usage

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## PakWheels Used Cars Scraper

Extract used car listings from PakWheels with pricing, mileage, transmission, seller location, and full gallery image URLs from search results. Build clean datasets for market tracking, inventory research, lead generation, and automotive analytics without manually opening listings one by one.

### Features

- **Search Result Extraction** — Collect used car listings directly from PakWheels search pages
- **Full Gallery URLs** — Capture the complete list of vehicle image URLs available on each listing card
- **Structured Vehicle Data** — Get price, year, mileage, fuel type, engine capacity, transmission, make, and city
- **Duplicate-Safe Output** — Keep records unique with PakWheels listing IDs
- **Flexible Filtering** — Narrow results by city, make, model, price range, and year range
- **Controlled Collection Size** — Limit result count and number of result pages for faster runs

### Use Cases

#### Market Research

Track used car pricing trends across cities, brands, and model years. Compare listing volumes and image-rich inventory across segments.

#### Dealer Monitoring

Watch competing inventory, featured stock, and refreshed listings. Build snapshots of changing market supply over time.

#### Automotive Data Products

Use clean listing datasets to power dashboards, comparison tools, valuation workflows, or lead qualification systems.

#### Image Collection Workflows

Collect listing gallery URLs from search results for cataloging, moderation, or downstream visual analysis pipelines.

***

### Input Parameters

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| `startUrl` | String | No | — | Direct PakWheels search URL. When set, it overrides the filter-based URL builder. |
| `city` | String | No | — | Filter by city such as Lahore, Karachi, Islamabad, or Rawalpindi. |
| `make` | String | No | — | Filter by vehicle make such as Toyota, Honda, Suzuki, Hyundai, or KIA. |
| `model` | String | No | — | Filter by a specific model such as Corolla, Civic, City, or Cultus. |
| `minPrice` | Integer | No | — | Minimum listing price in PKR. |
| `maxPrice` | Integer | No | — | Maximum listing price in PKR. |
| `minYear` | Integer | No | — | Minimum vehicle model year. |
| `maxYear` | Integer | No | — | Maximum vehicle model year. |
| `results_wanted` | Integer | No | `20` | Maximum number of unique listings to save. |
| `max_pages` | Integer | No | `10` | Maximum number of result pages to process. |
| `proxyConfiguration` | Object | No | — | Optional Apify proxy configuration for more reliable collection at scale. |

***

### Output Data

Each item in the dataset contains:

| Field | Type | Description |
|-------|------|-------------|
| `listing_id` | Integer | Unique PakWheels listing ID. |
| `title` | String | Listing title shown on PakWheels. |
| `description` | String | Short vehicle description from structured listing data. |
| `url` | String | Direct URL to the listing page. |
| `price` | Integer | Listing price in PKR. |
| `currency` | String | Currency code, typically `PKR`. |
| `year` | Integer | Vehicle model year. |
| `mileage` | String | Odometer reading shown in the listing. |
| `fuel_type` | String | Fuel type such as Petrol, Diesel, Hybrid, or Electric. |
| `engine_capacity` | String | Engine size such as `1300 cc` or `1800 cc`. |
| `transmission` | String | Transmission type such as Automatic or Manual. |
| `make` | String | Vehicle brand or manufacturer. |
| `location` | String | City where the listing is posted. |
| `image_url` | String | Primary vehicle image URL. |
| `image_count` | Integer | Number of images available in the listing gallery. |
| `image_urls` | Array | Full list of gallery image URLs found on the search results page. |
| `is_featured` | Boolean | Whether the listing is marked as featured. |
| `is_managed_by_pakwheels` | Boolean | Whether the listing is managed directly by PakWheels. |
| `updated_at` | String | Listing freshness text from the source page. |
| `scraped_at` | String | ISO timestamp when the record was collected. |

***

### Usage Examples

#### Basic City Extraction

Collect recent used car listings from one city:

```json
{
    "city": "lahore",
    "results_wanted": 20
}
```

#### Make and Model Search

Focus on a specific make and model:

```json
{
    "make": "Toyota",
    "model": "Corolla",
    "results_wanted": 30,
    "max_pages": 5
}
```

#### Price and Year Filtering

Collect cars within a tighter market segment:

```json
{
    "city": "karachi",
    "minPrice": 2500000,
    "maxPrice": 4500000,
    "minYear": 2019,
    "maxYear": 2024,
    "results_wanted": 25
}
```

***

### Sample Output

```json
{
    "listing_id": 11610024,
    "title": "Toyota Corolla 2016 for sale in Karachi",
    "description": "Toyota Corolla 2016 for sale in Karachi",
    "url": "https://www.pakwheels.com/used-cars/toyota-corolla-2016-for-sale-in-karachi-11610024",
    "price": 3550000,
    "currency": "PKR",
    "year": 2016,
    "mileage": "105,117 km",
    "fuel_type": "Petrol",
    "engine_capacity": "1300 cc",
    "transmission": "Automatic",
    "make": "Toyota",
    "location": "Karachi",
    "image_url": "https://cache4.pakwheels.com/ad_pictures/1454/toyota-corolla-gli-vvti-automatic-2016-145498630.jpg",
    "image_count": 14,
    "image_urls": [
        "https://cache4.pakwheels.com/ad_pictures/1454/toyota-corolla-gli-vvti-automatic-2016-145498630.webp",
        "https://cache3.pakwheels.com/ad_pictures/1454/toyota-corolla-gli-vvti-automatic-2016-145498631.webp"
    ],
    "is_featured": true,
    "is_managed_by_pakwheels": true,
    "updated_at": "Updated 1 minute ago",
    "scraped_at": "2026-06-18T06:02:13.744Z"
}
```

***

### Tips for Best Results

#### Use Precise Filters

- Combine `city`, `make`, and `model` when you want a focused dataset.
- Add year and price limits to reduce noise and collect faster.

#### Control Run Size

- Start with `results_wanted: 20` for quick validation.
- Increase `max_pages` only when you need broader coverage.

#### Work With Search URLs

- Use `startUrl` when you already have a working PakWheels filtered search page.
- This is useful for advanced filters that are easier to build on the website first.

#### Use Proxies for Scale

- For repeated or larger collections, configure Apify proxies to reduce blocking risk.

***

### Integrations

Connect your data with:

- **Google Sheets** — Export listings for quick analysis and reporting
- **Airtable** — Build searchable automotive inventory tables
- **Webhooks** — Send new listing data into your own systems
- **Make** — Create automated workflows around fresh listings
- **Zapier** — Trigger alerts, notifications, and follow-up actions

#### Export Formats

- **JSON** — For APIs, scripts, and custom applications
- **CSV** — For spreadsheets and bulk analysis
- **Excel** — For reporting and business reviews
- **XML** — For legacy system integrations

***

### Frequently Asked Questions

#### Does it collect gallery images without opening the listing page?

Yes. The actor collects gallery image URLs directly from the search results page when they are available there.

#### Can I collect only one city or one model?

Yes. You can use the filter inputs or provide a direct `startUrl` from a PakWheels search page.

#### Are duplicate listings removed?

Yes. The actor keeps output unique using the PakWheels `listing_id`.

#### What happens if some listing fields are missing?

The actor skips empty values instead of saving null-heavy records, so output stays cleaner.

#### How many listings can I collect?

You can collect as many as PakWheels makes available for your query, limited by `results_wanted` and `max_pages`.

#### Does it include seller phone numbers?

No. Public seller contact endpoints were not available anonymously during testing.

***

### Support

For issues or feature requests, contact support through the Apify Console.

#### Resources

- [Apify Documentation](https://docs.apify.com/)
- [API Reference](https://docs.apify.com/api/v2)
- [Scheduling Runs](https://docs.apify.com/platform/schedules)

***

### Legal Notice

This actor is intended for legitimate data collection use cases. Users are responsible for complying with the source website terms, applicable laws, and responsible usage practices.

# Actor input Schema

## `startUrl` (type: `string`):

Direct Pakwheels search URL. Overrides all other filters if provided.

## `city` (type: `string`):

Filter by city (e.g., Lahore, Karachi, Islamabad, Rawalpindi, Peshawar, Faisalabad, Multan).

## `make` (type: `string`):

Filter by car manufacturer (e.g., Toyota, Honda, Suzuki, Hyundai, KIA).

## `model` (type: `string`):

Filter by specific model (e.g., Corolla, Civic, City, Cultus). Works best when Make is also specified.

## `minPrice` (type: `integer`):

Minimum price filter in Pakistani Rupees.

## `maxPrice` (type: `integer`):

Maximum price filter in Pakistani Rupees.

## `minYear` (type: `integer`):

Minimum model year filter.

## `maxYear` (type: `integer`):

Maximum model year filter.

## `results_wanted` (type: `integer`):

Maximum number of car listings to collect.

## `max_pages` (type: `integer`):

Maximum number of search result pages to scrape.

## `proxyConfiguration` (type: `object`):

Proxy settings for Apify platform.

## Actor input object example

```json
{
  "city": "lahore",
  "results_wanted": 20,
  "max_pages": 3,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `overview` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "city": "lahore",
    "results_wanted": 20,
    "max_pages": 3
};

// Run the Actor and wait for it to finish
const run = await client.actor("shahidirfan/pakwheels-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "city": "lahore",
    "results_wanted": 20,
    "max_pages": 3,
}

# Run the Actor and wait for it to finish
run = client.actor("shahidirfan/pakwheels-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "city": "lahore",
  "results_wanted": 20,
  "max_pages": 3
}' |
apify call shahidirfan/pakwheels-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=shahidirfan/pakwheels-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/CVPtFyKoG6yoPgbXd/builds/sCpiCaaOiy1KisVes/openapi.json
