# Pcarmarket Used Cars & Vehicle Listings Scraper (`entrepreneurial_lens_ehi/pcarmarket-com`) Actor

Extract used car listings and vehicle specifications from pcarmarket.com as clean structured JSON including Title, Price, Url. Automatic pagination, deduplicated output and easy JSON/CSV/Excel export. Ideal for Automotive research, monitoring and enrichment pipelines.

- **URL**: https://apify.com/entrepreneurial_lens_ehi/pcarmarket-com.md
- **Developed by:** [T T](https://apify.com/entrepreneurial_lens_ehi) (community)
- **Categories:** E-commerce
- **Stats:** 2 total users, 1 monthly users, 50.0% runs succeeded, 1 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.25 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## 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.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Pcarmarket Used Cars & Vehicle Listings Scraper

Extracts used car listings and vehicle specifications from [pcarmarket.com](https://www.pcarmarket.com/auctions/) and writes them to the dataset as structured JSON.

### Use cases

- Used car price analytics and vehicle specs tracking
- Dealership inventory aggregation and valuation models
- Automotive marketplace monitoring and arbitrage

### What it does

The actor downloads each page, parses the vehicles, and stores one record per vehicle. Each record contains **title**, **price**, **url**, **image**, **description**.

- Extraction runs over plain HTTP, so runs are fast
- JSON-LD and embedded page-state data are used when present; otherwise the actor falls back to DOM parsing
- Duplicate records are removed before the dataset is written
- Pagination is followed automatically up to the configured page limit

### Why choose this scraper

| Advantage | This Scraper | Traditional / Generic Scrapers |
|---|---|---|
| **Speed & Efficiency** | Fast, lightweight extraction engine | Heavy browser overhead & slow execution |
| **Anti-Blocking** | Intelligent request impersonation & header rotation | Frequent 403 blocks & Captcha failures |
| **Pay-Per-Result** | Pay only for valid returned records | Charged for full run time even on empty results |
| **Data Cleanliness** | Verified, typed fields with deduplication | Messy HTML artifacts & missing null checks |
| **Maintenance** | Monitored and auto-healed continuously | Broken when target site updates layout |

### Output

#### Sample output

Three example records from a real run:

```json
[
  {
    "title": "1974 Porsche 914 2.0",
    "price": "$11,750",
    "url": "https://www.pcarmarket.com/auction/1973-porsche-914-1791910680228500454",
    "image": "https://assets.basta.app/accounts/005fe31d-e133-4f0b-ac58-2c2cd5f3301c/images/2f5a2cdf-897b-4764-b597-1521f750d245?width=500&quality=75&format=webp",
    "description": "Costa Mesa, California"
  },
  {
    "title": "1965 Mercedes-Benz 230SL 4-Speed",
    "url": "https://www.pcarmarket.com/auction/1965-mercedes-benz-230sl-4-speed",
    "image": "https://assets.basta.app/accounts/005fe31d-e133-4f0b-ac58-2c2cd5f3301c/images/9f320b8c-2369-42af-95a5-c2d010766d04?width=500&quality=75&format=webp",
    "description": "Bellmore, NY"
  },
  {
    "title": "1999 Porsche 996 Carrera Cabriolet 6-Speed",
    "price": "$4,500",
    "url": "https://www.pcarmarket.com/auction/1999-porsche-911-1791467236926967045",
    "image": "https://assets.basta.app/accounts/005fe31d-e133-4f0b-ac58-2c2cd5f3301c/images/591e3ad4-5238-4c85-940a-803f86940c47?width=500&quality=75&format=webp",
    "description": "Buffalo Grove, IL, United States"
  }
]
```

Export the dataset as JSON, CSV or Excel from the **Dataset** tab after the run.

#### Output schema

```json
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "type": "object",
  "properties": {
    "title": {
      "type": "string"
    },
    "price": {
      "type": "string"
    },
    "url": {
      "type": "string"
    },
    "image": {
      "type": "string"
    },
    "description": {
      "type": "string"
    }
  }
}
```

### Input

| Field | Type | Description |
|---|---|---|
| `startUrls` | array | Pages to scrape (defaults to https://www.pcarmarket.com/auctions/). The first URL is also the base for relative link resolution. (default: `["https://www.pcarmarket.com/auctions/"]`) |
| `searchKeyword` | string | Optional keyword or query to filter listings. |
| `maxPages` | integer | Maximum number of pages to crawl before stopping. (default: `10`) |
| `maxItems` | integer | Maximum number of records to return. Leave empty for no limit. |

### Pricing

- **Pay-per-result:** $20 per 1,000 results

- **Billed per result** — you only pay for the records that land in your dataset.

- **Volume discounts** apply automatically as monthly usage climbs; the "from" price on the store page is the discounted rate.

- **Run start:** $0.00005 per GB of memory (a 1 GB run starts for a fraction of a cent); results are billed separately.

- There is no subscription or minimum spend. A run is charged only for the records that land in your dataset.

### Integrations

The actor runs on the Apify platform: call it from the API or the Python and Node.js SDKs, trigger it on a schedule, send results to webhooks, and pipe the dataset into Zapier, Make, Slack or Google Sheets. The dataset is also LLM-ready -- point any tool that reads JSON at it.

### How to use via API

#### Python SDK

```python
from apify_client import ApifyClient

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

## Set actor input
run_input = {
    "startUrls": ["https://www.pcarmarket.com/auctions/"],
    "maxItems": 100,
}

## Run the actor and wait for it to complete
run = client.actor("entrepreneurial_lens_ehi/pcarmarket-com").call(run_input=run_input)

## Fetch results from the default dataset
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)
```

#### JavaScript / Node.js SDK

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

const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

const input = {
    startUrls: ['https://www.pcarmarket.com/auctions/'],
    maxItems: 100,
};

const run = await client.actor('entrepreneurial_lens_ehi/pcarmarket-com').call(input);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

### FAQ

**How much does a run cost?**
Pay-per-result only. You are charged for the records that land in your dataset ($20 per 1,000 results), with no subscription or minimum. Volume discounts apply automatically on higher monthly usage.

**What fields do I get?**
Each record contains **title**, **price**, **url**, **image**, **description**. Fields the source page does not display are omitted -- nothing is fabricated.

**How fresh is the data?**
Extraction reads the live pages at run time. Schedule recurring runs from the platform to keep a monitoring dataset current.

**Can I scrape pages other than the default URL?**
Yes. Pass any URL that matches the site's page structure in `startUrls`; the actor crawls and extracts from it the same way.

**How many records can one run return?**
Control it with `maxPages` (crawling depth) and `maxItems` (a hard cap on returned records).

**Is it legal to scrape this data?**
The actor collects publicly available data only. Check the site's Terms of Service and applicable law (for example GDPR) before bulk collection, and review the platform's own data-collection policy.

**How do I export the results?**
JSON, CSV or Excel from the Dataset tab after the run, or pull the dataset programmatically via the API/SDKs.

**What happens if a run fails?**
The run reports per-record errors instead of failing silently. Retry the run, and open an issue on the Issues tab if a target site keeps blocking extraction.

### Limitations

- The actor extracts what the public pages expose. Fields the site does not display are omitted; nothing is fabricated.
- Some sites render content client-side. Extraction follows the live markup, so results can change if the site is redesigned.
- The actor collects publicly available data only. Check the site's Terms of Service and applicable law (for example GDPR) before bulk collection.

Found a problem or want a field added? Open an issue on the **Issues** tab -- the maintainer responds.

# Actor input Schema

## `startUrls` (type: `array`):

Pages to scrape (defaults to https://www.pcarmarket.com/auctions/). The first URL is also the base for relative link resolution.

## `searchKeyword` (type: `string`):

Optional keyword or query to filter listings.

## `maxPages` (type: `integer`):

Maximum number of pages to crawl before stopping.

## `maxItems` (type: `integer`):

Maximum number of records to return. Leave empty for no limit.

## Actor input object example

```json
{
  "startUrls": [
    "https://www.pcarmarket.com/auctions/"
  ],
  "maxPages": 10
}
```

# Actor output Schema

## `results` (type: `string`):

Dataset items produced by the Actor.

# 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 = {
    "startUrls": [
        "https://www.pcarmarket.com/auctions/"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("entrepreneurial_lens_ehi/pcarmarket-com").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 = { "startUrls": ["https://www.pcarmarket.com/auctions/"] }

# Run the Actor and wait for it to finish
run = client.actor("entrepreneurial_lens_ehi/pcarmarket-com").call(run_input=run_input)

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

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

```

## CLI example

```bash
echo '{
  "startUrls": [
    "https://www.pcarmarket.com/auctions/"
  ]
}' |
apify call entrepreneurial_lens_ehi/pcarmarket-com --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,entrepreneurial_lens_ehi/pcarmarket-com"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

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