# 🚗 Kelley Blue Book Scraper (`skootle/kbb-scraper`) Actor

Scrape Kelley Blue Book used-car listings by make, model, year, ZIP, radius, and price. Get VIN-validated records, KBB Price Advisor band, decoded WMI, dealer geo, ISO timestamps, and AI-ready markdown. Export, run via API, schedule, or integrate with other tools.

- **URL**: https://apify.com/skootle/kbb-scraper.md
- **Developed by:** [Skootle](https://apify.com/skootle) (community)
- **Categories:** E-commerce, AI, Lead generation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.50 / 1,000 kbb listing records

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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use 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

![Kelley Blue Book Scraper hero](https://raw.githubusercontent.com/kesjam/skootle-actors-assets/main/heroes/kbb.png)

### TL;DR

Pull live used-car listings from Kelley Blue Book by make, model, year range, ZIP, and search radius. Every record carries the **KBB Price Advisor grade** (`GREAT` / `GOOD` / `FAIR` / `HIGH`), KBB's own deal-quality flag, so you can filter for underpriced inventory in one query. Built for used-car flippers hunting margin in their metro, dealer competitive-intel desks, fleet sourcing, insurance and warranty underwriters, and AI shopping agents that need clean validated VINs and dealer geo. Sub-minute runs, ~$0.36 per 100 listings on the GOLD plan.

---

<!-- skootle:review-cta -->
> Try it on a small dataset, then let us know what you think in a [review](https://apify.com/skootle/kbb-scraper/reviews).

---

### What does Kelley Blue Book Scraper do?

Today, a used-car flipper hunting margin in Atlanta opens kbb.com 50 times per day, types in different make / model / year / ZIP combinations, eyeballs every listing for "is this priced below KBB's Fair Purchase band?", and copies the few candidates into a spreadsheet to call dealers about. A dealer competitive-intel analyst at a 12-store group does the same thing weekly across every neighbor dealership. An insurance underwriter pulls valuations one VIN at a time off the public KBB site to feed actuarial models. An AI shopping agent that wants to answer "find me a 2022 Tacoma in TX under $30K" has nowhere to get structured KBB data.

This actor turns all of that into one API call. A daily monitor on a make + model + ZIP combo finishes in under a minute, costs well under $1, and lands in your warehouse with dealer geo, days-on-site, and the KBB deal grade already joined per listing.

The killer field is `kbbPriceAdvisor.kbbGrade`. KBB itself rates every listing it tracks as `GREAT`, `GOOD`, `FAIR`, or `HIGH` deal, that's the same grade you see as a green / yellow / red badge on the consumer site. Filter your dataset on `kbbGrade == 'GREAT'` and you have your shortlist of underpriced inventory in the metro you searched. None of the existing free KBB scrapers surface this field.

For AI agents and LLM pipelines, every record also carries a 300-500 character `agentMarkdown` summary card you can paste straight into a Claude or ChatGPT context, plus a `fieldCompletenessScore` so agents can self-filter sparse rows.

### Why scrape Kelley Blue Book?

KBB is the dominant US used-car valuation reference. Dealers price against KBB's Fair Purchase band, consumers shop against the same numbers, lenders and insurers reference the same bands for their models. KBB's killer field is the deal grade, `GREAT` / `GOOD` / `FAIR` / `HIGH`, that lets a buyer filter underpriced inventory in a single query. Nobody else publishes that signal at this depth.

Manual workflow killed: opening kbb.com 50 times a day, retyping make + model + ZIP, eyeballing every listing for "is this below the Fair Purchase band?". A used-car flipper finds roughly one $2K-margin underpriced car per 200 listings scanned, so the per-record cost pays back on the first flip. Insurance underwriters, dealer competitive-intel desks, and AI shopping agents all need the same VIN-validated, geocoded feed, and the free KBB scrapers on the Store do not surface the deal grade at all.

### Who needs this?

- **Used-car flippers and wholesalers** sweeping a 100-mile radius daily for `kbbGrade: 'GREAT'` listings to flip in the same week
- **Dealer competitive-intelligence desks** monitoring their five nearest competitors' inventory and pricing daily across make / model
- **Insurance and warranty underwriters** pulling VIN-validated valuations to train and update actuarial models
- **Fleet ops and corporate procurement** sourcing the best-priced examples of a fleet vehicle across a wide radius
- **Auto-finance and lending platforms** building real-time valuation models with VIN-decoded vehicle squibs and live KBB Fair Purchase bands
- **Used-car market analysts and journalists** sizing local supply, pricing distributions, and inventory turnover by metro
- **AI shopping agents and natural-language car search** that need a clean, validated, agent-ready stream of KBB listings as a tool result

### How to use Kelley Blue Book Scraper

1. Open the **Input** tab on the actor page
2. Type your `make` (e.g., `BMW`) and optionally a `model` (e.g., `3 Series`)
3. Set `zip` to the 5-digit US ZIP at the center of your search and choose a `searchRadius` in miles
4. Optionally narrow with `yearMin`, `yearMax`, `priceMax`, and `mileageMax`
5. Pick `condition`: `USED` (default), `NEW`, or `CERTIFIED`
6. Set `maxItems` (default 10, conservative for the daily auto-test; raise for production runs)
7. Click **Start** or call via the Apify REST API or CLI

You can run on demand from the Console, schedule daily monitoring with Apify's cron scheduler, integrate with Make, Zapier, n8n, Slack, Google Sheets, or pipe directly into a Claude or ChatGPT custom agent.

### How much will scraping Kelley Blue Book cost?

This actor is priced per event:

- **Actor Start**: $0.005 once per run
- **KBB listing record**: tiered, charged per record written

| Apify plan | $/1000 records |
|---|---|
| FREE | $5.00 |
| BRONZE | $4.50 |
| SILVER | $4.00 |
| GOLD | $3.50 |
| PLATINUM | $3.00 |
| DIAMOND | $3.00 |

A typical 100-listing search on the GOLD plan is roughly $0.36 plus a few cents of Apify residential proxy bandwidth. Daily monitoring of one make / model / ZIP combination is well under $1 per day. The $5/month Apify free credit covers around 1,000 trial listings on the FREE plan.

Frame it as ROI. A flipper finds one $2,000-margin underpriced car per ~200 KBB listings scanned. At GOLD pricing that's about $0.70 in actor cost per $2,000 of margin found, pays for itself on the first flip of the month.

You only pay for records actually saved.

### Is it legal to scrape Kelley Blue Book?

Yes for public listing data. KBB's listing pages are served without authentication and indexed by every major search engine. This actor uses standard HTTP requests through Apify residential proxies with realistic browser headers, never bypasses login or paywalls, and never harvests personal data outside the dealer business contact information already published on the listing page.

For commercial redistribution of scraped KBB data (reselling raw inventory feeds), consult your own legal counsel: dealer inventory and KBB's price-advisor data may be subject to KBB's terms of service and your jurisdiction's database-rights regime.

### Examples

#### Example 1: Flipper hunting underpriced 2020-2024 BMW 3 Series within 50 mi of Beverly Hills

```json
{
  "make": "BMW",
  "model": "3 Series",
  "yearMin": 2020,
  "yearMax": 2024,
  "zip": "90210",
  "searchRadius": 50,
  "maxItems": 50
}
````

Filter the resulting dataset on `kbbPriceAdvisor.kbbGrade == 'GREAT'` to get the shortlist.

#### Example 2: Dealer monitoring competitor Toyota Camry pricing under $25K, 100 mi of Dallas

```json
{
  "make": "Toyota",
  "model": "Camry",
  "yearMin": 2019,
  "priceMax": 25000,
  "zip": "75201",
  "searchRadius": 100,
  "maxItems": 100
}
```

#### Example 3: Certified pre-owned Lexus RX in the New York metro

```json
{
  "make": "Lexus",
  "model": "RX",
  "condition": "CERTIFIED",
  "zip": "10001",
  "searchRadius": 75,
  "maxItems": 50
}
```

#### Example 4: Low-mileage Tesla Model 3 anywhere in California, fleet sourcing

```json
{
  "make": "Tesla",
  "model": "Model 3",
  "mileageMax": 30000,
  "zip": "94103",
  "searchRadius": 200,
  "maxItems": 100
}
```

#### Example 5: Ford F-150 trucks all years near Houston, wholesale buyer sweep

```json
{
  "make": "Ford",
  "model": "F-150",
  "zip": "77001",
  "searchRadius": 100,
  "maxItems": 200
}
```

#### Example 6: All Honda models within 25 miles of Chicago, broad-make market scan

```json
{
  "make": "Honda",
  "zip": "60601",
  "searchRadius": 25,
  "maxItems": 100
}
```

#### Example 7: Insurance underwriter, 2018-2022 Subaru Outback in Denver metro

```json
{
  "make": "Subaru",
  "model": "Outback",
  "yearMin": 2018,
  "yearMax": 2022,
  "zip": "80202",
  "searchRadius": 75,
  "maxItems": 100
}
```

### Input parameters

| Field | Type | Default | Description |
|---|---|---|---|
| `make` | string | required | Vehicle make (e.g., `BMW`, `Toyota`, `Ford`). |
| `model` | string | (any) | Vehicle model. Empty = all models of the make. |
| `yearMin` | int | (none) | Earliest model year. |
| `yearMax` | int | (none) | Latest model year. |
| `priceMax` | int | (none) | Cap by asking price (USD). |
| `mileageMax` | int | (none) | Cap by odometer reading (miles). |
| `zip` | string | required | 5-digit US ZIP at the center of the radius. |
| `searchRadius` | int | `50` | Miles. 10-500. |
| `condition` | enum | `USED` | `USED`, `NEW`, or `CERTIFIED`. |
| `maxItems` | int | `10` | Hard cap on saved listings. Raise for production. |
| `proxyConfiguration` | object | US residential | Apify proxy settings; US residential is required for KBB. |

### Kelley Blue Book output format

#### `kbb_listing`

| Field | Type | Description (and how a buyer uses it) |
|---|---|---|
| `outputSchemaVersion` | string | Date-stamped schema version (`'2026-05-09'`), pin downstream pipelines safely |
| `recordType` | literal | `'kbb_listing'` |
| `recordId` | string | `kbb:vin:<VIN>` if VIN is structurally valid, else `kbb:listing:<id>`, drop straight into `INSERT ... ON CONFLICT DO UPDATE` |
| `listingId` | string | KBB's internal listing ID, stable across runs |
| `listingUrl` | string | Direct URL to the vehicle detail page on kbb.com |
| `vin` | string | 17-character raw VIN |
| `vinValid` | bool | True when the VIN is structurally valid, filter on `vinValid: true` to drop garbage rows from your dataset |
| `vinDecoded` | object | `{ year, manufacturer, country }` decoded inline, no NHTSA round-trip |
| `year`, `make`, `model`, `trim`, `bodyStyle` | string/int | Identity fields |
| `exteriorColor`, `interiorColor` | string | Cabin |
| `drivetrain`, `fuelType`, `engine`, `doors` | string/int | Mechanical |
| `price`, `priceUsd` | string + numeric | `"$31,995"` and `31995`, use the numeric for sorting and filtering |
| `kbbPriceAdvisor` | object | **The moat field.** `{ fairPurchaseMin, fairPurchaseMax, kbbGrade }`. `kbbGrade` is `GREAT \| GOOD \| FAIR \| HIGH`, KBB's own deal-quality grade. Filter for `GREAT` to surface underpriced inventory. |
| `mileage`, `mileageMiles` | string + numeric | Mileage with units stripped for direct math |
| `listingType` | string | `USED`, `NEW`, `CERTIFIED` |
| `daysOnSite` | int | KBB's days-since-listing, older = more negotiable |
| `listedAt`, `scrapedAt` | ISO 8601 | Real timestamps, not "5 days ago" strings |
| `dealer` | object | `{ ownerId, name, phone, address, city, state, zip, lat, lon, distanceMi }`, dealer geo joined per listing, no re-geocoding needed |
| `images` | string\[] | Listing photos |
| `description` | string | Listing description blurb |
| `isCertified`, `isNewlyListed`, `isReducedPrice`, `isHot` | bool | Listing flags |
| `fieldCompletenessScore` | int 0-100 | Self-filtering signal for downstream pipelines and AI agents |
| `agentMarkdown` | string | 300-500 char ready-to-paste LLM summary card per record |

#### KBB scraper output example

```json
{
  "outputSchemaVersion": "2026-05-09",
  "recordType": "kbb_listing",
  "recordId": "kbb:vin:3MW39FF05R8E31429",
  "listingId": "778876035",
  "listingUrl": "https://www.kbb.com/cars-for-sale/vehicle/778876035?...",
  "vin": "3MW39FF05R8E31429",
  "vinValid": true,
  "vinDecoded": { "year": 2024, "manufacturer": "BMW", "country": "Mexico" },
  "year": 2024, "make": "BMW", "model": "330i", "trim": "Sedan",
  "bodyStyle": "Sedan",
  "exteriorColor": "Black", "interiorColor": "Black",
  "drivetrain": "RWD", "fuelType": "Gasoline", "engine": "4-Cylinder Turbo",
  "price": "$41,995", "priceUsd": 41995,
  "kbbPriceAdvisor": {
    "fairPurchaseMin": 39800, "fairPurchaseMax": 43200, "kbbGrade": "GOOD"
  },
  "mileage": "12,450", "mileageMiles": 12450,
  "daysOnSite": 18, "listedAt": "2026-04-21",
  "scrapedAt": "2026-05-09T20:00:00.000Z",
  "dealer": {
    "ownerId": 79873, "name": "Pacific BMW",
    "phone": "18889871935", "address": "800 South Brand Boulevard",
    "city": "Glendale", "state": "CA", "zip": "91204",
    "lat": 34.13714, "lon": -118.25501, "distanceMi": 9.34
  },
  "images": ["https://..."],
  "fieldCompletenessScore": 96,
  "agentMarkdown": "🚗 **2024 BMW 330i Sedan**\n💰 $41,995 (KBB: GOOD, fair $39,800-$43,200)\n📏 12,450 mi\n📍 Glendale, CA (9.3 mi away)\n🔢 VIN 3MW39FF05R8E31429\n🔗 https://www.kbb.com/..."
}
```

### During the Actor run

Each run pulls KBB inventory for your make/model/ZIP/radius, normalizes every record, and writes the dataset. Sub-minute typical runtimes.

Two artifacts land in the run's key-value store: **`OUTPUT`** (compact run summary with VIN-valid count, KBB Price Advisor count, and error counts) and **`AGENT_BRIEFING`** (markdown digest with median price, mileage stats, and the top KBB-`GREAT` listings ranked by margin). The default dataset is accessible via the Apify dataset API or CSV / JSON / Excel export.

### FAQ

#### How is this different from the free KBB scrapers on the Apify Store?

The two free KBB actors on the Store have single-digit lifetime runs and zero reviews. They leak `$` and `,` straight into the price field, never validate the VIN, drop the dealer's lat / lon, and never surface the KBB Price Advisor grade, the field that actually tells you whether a listing is a deal. This actor parses the canonical KBB inventory payload directly, validates every VIN, returns numeric mirrors of price and mileage, joins dealer geo per listing, and surfaces the KBB grade as a top-level filterable field.

#### Why does this cost more than the free actors?

If you're feeding the data into a pricing model, dealer-monitoring pipeline, or AI agent, the per-record cost pays back in saved engineering hours within the first week. Free actors break monthly when KBB tweaks a class name, you don't get notified, and your downstream pipeline silently goes empty until you notice. This actor is on a versioned schema with idempotent IDs and continuous maintenance.

#### Will this break when KBB changes their site?

KBB's underlying inventory payload is far more stable than the rendered HTML, so cosmetic UI changes don't break this actor. When KBB does change the underlying contract, the actor adapts within 24-48 hours and we ship a build update.

#### How reliable is this for daily production use?

Built for it. Sub-minute runtimes, monitored daily, and maintenance updates ship within 24-48 hours when KBB changes anything that matters.

#### Can I get the KBB Fair Purchase Price for each listing?

Yes, every record carries a `kbbPriceAdvisor` object with `fairPurchaseMin`, `fairPurchaseMax`, and `kbbGrade` (`GREAT`, `GOOD`, `FAIR`, `HIGH`). KBB embeds this in the search-results payload for every listing where it has a band; the field is `null` when KBB does not.

#### Why not just use cars.com instead?

Cars.com has more total inventory volume and we ship a [companion Cars.com actor](https://apify.com/skootle/cars-com-scraper) you should run alongside this one. KBB is the better source when you need the **price-advisor grade** (cars.com doesn't have it) and the deepest dealer geo. Most flippers and dealer-intel buyers run both: KBB for the deal-quality signal, Cars.com for the volume and trim breadth.

#### Can I monitor only listings new since the previous run?

Not in v0.1 as a built-in feature. The `listingId` and `recordId` are stable across runs, so you can compute the diff downstream by joining against your previous dataset (`INSERT ... ON CONFLICT DO UPDATE`). A built-in watchlist mode is on the roadmap for v0.2.

#### Why is my VIN reported as `vinValid: false`?

Every VIN we return is checked for structural validity. If a dealer or KBB itself transcribed the VIN wrong (a missing or wrong character), the validity check fails and you can drop the row. The raw VIN is still returned in the `vin` field; you can re-process it downstream if you want.

#### Can I integrate with Make / Zapier / n8n / Slack?

Yes. From the actor page, click **Integrations** and pick your destination. Apify provides native connectors for all of them.

#### Can I use this with Python?

Yes. Use the [Apify Python client](https://docs.apify.com/api/client/python): `client.actor("skootle/kbb-scraper").call(run_input={...})` and read the dataset.

#### What's the cheapest way to use this?

The $5/month Apify free credit covers around 1,000 listings on the FREE plan, enough to validate the schema against your pipeline. For production volume, GOLD at $3.50 per 1,000 records is the sweet spot; PLATINUM and DIAMOND drop to $3.00.

#### Your feedback

Hit a bug or want a feature? Open an issue on the [Issues tab](https://apify.com/skootle/kbb-scraper/issues/open) rather than the reviews page, and we'll fix it fast (typically within 48 hours).

### Why choose Kelley Blue Book Scraper

- **Flag underpriced inventory in one query**, KBB Price Advisor `GREAT` / `GOOD` / `FAIR` / `HIGH` deal grade as a top-level filterable field. This is the wedge
- **Returns dealer geo so you can radius-filter without re-geocoding**, name, phone, address, lat / lon, distance from your search ZIP, joined per listing
- **Sub-minute runtimes at low compute cost**, daily pipeline finishes fast and stays green
- **Every VIN is real. No junk rows polluting your dataset**, structurally validated on every record
- **VIN decoded inline**, model year + manufacturer + country, no NHTSA round-trip, no extra API call
- **Sort and filter without parsing strings**, numeric mirrors of every money and mileage field
- **Hand-tuned for KBB. Fixes ship the same week the source changes**, continuous maintenance
- **Agent-ready**, `agentMarkdown` per record + `AGENT_BRIEFING.md` per run, drop into Claude / ChatGPT / Slack as cards
- **Schema doesn't break your pipeline**, `outputSchemaVersion` literal on every record
- **Safe to dedupe across re-runs**, `kbb:vin:<VIN>` when valid, `kbb:listing:<id>` otherwise

### Other Skootle actors you might want to check

- **[Cars.com Scraper](https://apify.com/skootle/cars-com-scraper)**, companion used-car actor with the same record schema. Run both to combine KBB's deal-quality grade with Cars.com's volume and trim breadth.
- **[eBay Sold Comps](https://apify.com/skootle/ebay-sold-comps)**, sold-listing comps with variant-aware grouping for resellers and pricing engines
- **[SAM.gov + USAspending Federal Contracts](https://apify.com/skootle/sam-gov-federal-contracts)**, federal contract opportunities with historical award context

Export, run via API, schedule, or integrate with other tools.

### Support and contact

File issues on this actor's page (Issues tab), replies within 48 hours. For feature requests, drop them in the same tracker tagged `enhancement`.

# Actor input Schema

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

Vehicle make, e.g. BMW, Toyota, Ford, Honda. Required.

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

Vehicle model, e.g. '3 Series', 'Camry', 'F-150'. Leave blank for all models of the make.

## `yearMin` (type: `integer`):

Earliest model year (inclusive). Optional.

## `yearMax` (type: `integer`):

Latest model year (inclusive). Optional.

## `priceMax` (type: `integer`):

Cap listings at this asking price. Optional.

## `mileageMax` (type: `integer`):

Cap listings at this odometer reading. Optional.

## `zip` (type: `string`):

5-digit US ZIP code at the center of the search radius. Required.

## `searchRadius` (type: `integer`):

Distance from ZIP to include. Common values: 25, 50, 100, 200.

## `condition` (type: `string`):

Filter by listing condition. USED is the broadest and includes certified.

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

Hard cap on total listings saved. Conservative default for the 5-minute auto-test. Raise for production runs.

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

Apify proxy. US residential is required for KBB.

## Actor input object example

```json
{
  "make": "BMW",
  "model": "3 Series",
  "yearMin": 2020,
  "yearMax": 2024,
  "zip": "90210",
  "searchRadius": 50,
  "condition": "USED",
  "maxItems": 10,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "US"
  }
}
```

# Actor output Schema

## `datasetItems` (type: `string`):

All KBB listings from this run.

## `agentBriefing` (type: `string`):

Markdown digest with price/mileage stats and top picks by KBB grade.

## `runSummary` (type: `string`):

Compact OUTPUT object with row counts and per-stage error counts.

# 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 = {
    "make": "BMW",
    "model": "3 Series",
    "yearMin": 2020,
    "yearMax": 2024,
    "zip": "90210",
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ],
        "apifyProxyCountry": "US"
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("skootle/kbb-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 = {
    "make": "BMW",
    "model": "3 Series",
    "yearMin": 2020,
    "yearMax": 2024,
    "zip": "90210",
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
        "apifyProxyCountry": "US",
    },
}

# Run the Actor and wait for it to finish
run = client.actor("skootle/kbb-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 '{
  "make": "BMW",
  "model": "3 Series",
  "yearMin": 2020,
  "yearMax": 2024,
  "zip": "90210",
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "US"
  }
}' |
apify call skootle/kbb-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "🚗 Kelley Blue Book Scraper",
        "description": "Scrape Kelley Blue Book used-car listings by make, model, year, ZIP, radius, and price. Get VIN-validated records, KBB Price Advisor band, decoded WMI, dealer geo, ISO timestamps, and AI-ready markdown. Export, run via API, schedule, or integrate with other tools.",
        "version": "0.1",
        "x-build-id": "RaRDog4Rd7Pz4MTTi"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/skootle~kbb-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-skootle-kbb-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/skootle~kbb-scraper/runs": {
            "post": {
                "operationId": "runs-sync-skootle-kbb-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/skootle~kbb-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-skootle-kbb-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "make",
                    "zip"
                ],
                "properties": {
                    "make": {
                        "title": "Make",
                        "type": "string",
                        "description": "Vehicle make, e.g. BMW, Toyota, Ford, Honda. Required."
                    },
                    "model": {
                        "title": "Model (optional)",
                        "type": "string",
                        "description": "Vehicle model, e.g. '3 Series', 'Camry', 'F-150'. Leave blank for all models of the make."
                    },
                    "yearMin": {
                        "title": "Minimum year",
                        "minimum": 1980,
                        "maximum": 2030,
                        "type": "integer",
                        "description": "Earliest model year (inclusive). Optional."
                    },
                    "yearMax": {
                        "title": "Maximum year",
                        "minimum": 1980,
                        "maximum": 2030,
                        "type": "integer",
                        "description": "Latest model year (inclusive). Optional."
                    },
                    "priceMax": {
                        "title": "Maximum price (USD)",
                        "minimum": 0,
                        "maximum": 10000000,
                        "type": "integer",
                        "description": "Cap listings at this asking price. Optional."
                    },
                    "mileageMax": {
                        "title": "Maximum mileage (miles)",
                        "minimum": 0,
                        "maximum": 1000000,
                        "type": "integer",
                        "description": "Cap listings at this odometer reading. Optional."
                    },
                    "zip": {
                        "title": "Search ZIP code (US)",
                        "type": "string",
                        "description": "5-digit US ZIP code at the center of the search radius. Required."
                    },
                    "searchRadius": {
                        "title": "Search radius (miles)",
                        "minimum": 10,
                        "maximum": 500,
                        "type": "integer",
                        "description": "Distance from ZIP to include. Common values: 25, 50, 100, 200.",
                        "default": 50
                    },
                    "condition": {
                        "title": "Listing condition",
                        "enum": [
                            "USED",
                            "NEW",
                            "CERTIFIED"
                        ],
                        "type": "string",
                        "description": "Filter by listing condition. USED is the broadest and includes certified.",
                        "default": "USED"
                    },
                    "maxItems": {
                        "title": "Max total listings",
                        "minimum": 1,
                        "maximum": 5000,
                        "type": "integer",
                        "description": "Hard cap on total listings saved. Conservative default for the 5-minute auto-test. Raise for production runs.",
                        "default": 10
                    },
                    "proxyConfiguration": {
                        "title": "Proxy configuration",
                        "type": "object",
                        "description": "Apify proxy. US residential is required for KBB.",
                        "default": {
                            "useApifyProxy": true,
                            "apifyProxyGroups": [
                                "RESIDENTIAL"
                            ],
                            "apifyProxyCountry": "US"
                        }
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
