# CarGurus Car Listings Scraper ($0.75/1K) (`carabain-digital/cargurus-listings`) Actor

Scrape used and new car listings from CarGurus (cargurus.com), the biggest US car marketplace: price, CarGurus deal rating and Instant Market Value, mileage, VIN, specs and dealer phone. Search by ZIP, make, model, year, price, mileage. Newest first. Add-ons: full details, price history.

- **URL**: https://apify.com/carabain-digital/cargurus-listings.md
- **Developed by:** [Carabain Digital](https://apify.com/carabain-digital) (community)
- **Categories:** E-commerce, Lead generation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.45 / 1,000 car listings

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

#### What is CarGurus Car Listings Scraper?

**CarGurus Car Listings Scraper** scrapes **used and new car listings from CarGurus ([cargurus.com](https://www.cargurus.com))**, the most visited car marketplace in the US, with millions of cars from franchise and independent dealers. Search by **ZIP code and radius, make, model, model year, price, mileage, fuel type, transmission and body style**, or paste a search URL from the site, and get clean, flat car data as JSON, CSV, Excel, XML or HTML: price, **CarGurus deal rating and Instant Market Value (IMV)**, how far under or over market the price is, days on market, mileage, VIN, trim, engine, MPG, dealer name, phone and location, newest first. Prefilled example: the 20 newest used cars around New York (ZIP 10001), ready in about two seconds. Costs **$0.75 per 1,000 listings**. Add-ons: **Full details** (dealer description, all photos, full equipment list, accident and owner count, dealer fees, dealer address and coordinates) and **Price history** (price drops over time), $1.00 per 1,000 listings each.

- 🔎 **Search like on the site**: ZIP code and radius (or all of the US), make, model, year range, price range, max mileage, fuel, transmission, body style, new or used, or paste a CarGurus search URL
- 🏷️ **CarGurus deal ratings included**: Great, Good, Fair, High price or Overpriced, the Instant Market Value and the dollar gap to market on every used car, at no extra cost
- ⚡ **Fast and light**: CarGurus' own JSON, 48 cars per request, no browser; 500 cars in about 20 seconds
- 🆕 **Newest first**: ideal for alerts on fresh listings and underpriced cars
- 📚 **Full details on demand**: description, all photos, equipment by category, vehicle history (accidents, owners), dealer fees, street address, website and rating
- 📈 **Track prices over time**: switch on **Price history** to compare every run with the last one
- 🔌 **Connect anywhere**: API, schedules, webhooks, Google Sheets, Make, Zapier, MCP / AI agents

#### Use it from AI agents

This Actor has an agent skill for Claude Code, Codex, Cursor and other agents that read `SKILL.md`: it tells the agent when to use the Actor, every input field and the output. Install it with:

```bash
npx skills add carabain-digital/apify-agent-skills --skill cargurus-listings
```

Or read the skill on GitHub: [carabain-digital/apify-agent-skills/skills/cargurus-listings](https://github.com/carabain-digital/apify-agent-skills/tree/main/skills/cargurus-listings).

#### What data can I extract from CarGurus?

<table>
<tr><td>🆔 Stable listing ID and listing URL</td><td>💵 Price in USD, total price and MSRP</td></tr>
<tr><td>🏷️ Deal rating, Instant Market Value, gap to market, deal score</td><td>📅 Listing date and days on market</td></tr>
<tr><td>🚗 Make, model, trim, model year, condition, CPO</td><td>🛣️ Mileage (miles)</td></tr>
<tr><td>⛽ Fuel type, MPG city / highway / combined</td><td>⚙️ Transmission, drivetrain, engine, hp, displacement</td></tr>
<tr><td>🎨 Exterior and interior colour, body style, doors</td><td>🔢 VIN and dealer stock number</td></tr>
<tr><td>🏢 Dealer name, phone, city, state, ZIP, distance</td><td>📷 Photo URLs</td></tr>
<tr><td>📝 Description and full equipment list (add-on)</td><td>🧾 Accidents, owners, dealer fees, dealer address, rating (add-on)</td></tr>
</table>

The search results carry everything except the **description, all photos, the equipment list, accident and owner count, dealer fees and price before fees, the dealer's street address, coordinates, website and rating**: those come from each listing's detail page and are only filled with the **Full details** add-on. New cars have no deal rating or market value on CarGurus, so those fields are `null` for them.

#### How do I scrape CarGurus car listings?

1. [Create a free Apify account](https://console.apify.com/sign-up) and open this Actor.
2. Enter a **ZIP code** (for example `10001`) and, if you like, a radius, make, model, year and price range. Or paste one or more **Search URLs** copied from cargurus.com.
3. Set **Max listings** (the newest come first).
4. Click **Start**, then download the cars from the **Output** tab as JSON, CSV, Excel, XML or HTML.

#### How much does it cost to scrape CarGurus?

You pay per car listing that ends up in your dataset: **$0.75 per 1,000 listings**, no subscription. The monthly credit of Apify's Free plan ($5) covers around 6,600 listings without add-ons. Paid plans get volume discounts.

- **Add-on: Full details, $1.00 per 1,000 listings** (off by default). Opens every listing and adds the dealer description, all photos, the full equipment list, accident and owner count, dealer fees and price before fees, the dealer's street address, coordinates, website and rating. Charged only for listings that were actually enriched.
- **Add-on: Price history, $1.00 per 1,000 listings** (off by default). Adds `first_seen_at`, `previous_price`, `price_change`, `price_change_pct` and `price_history`. Charged only for listings that already had history from an earlier run, so the first run is free. See the *Price history* section below.
- Failed runs and empty searches cost nothing; you can cap spending with **Maximum cost per run** in the run options.

See the **Pricing** tab for the current prices.

#### ⬇️ Input

| Field | Description |
|---|---|
| **ZIP code** (`location`) | US ZIP code to search around. Empty = all of the US |
| **Search radius** (`radius_km`) | In km (80 km = 50 miles, the default) |
| **Make / Model** (`make`, `model`) | e.g. `Toyota` / `Camry`, `Ford` / `F-150` |
| **New or used** (`condition`) | `used` (default), `new`, or `any` (used first, then new) |
| **Model year** (`min_year`, `max_year`) | e.g. 2018 to 2023 |
| **Price** (`min_price`, `max_price`) | In US dollars |
| **Maximum mileage** (`max_mileage`) | In miles |
| **Fuel / transmission / body** (`fuel_type`, `transmission`, `body_type`) | e.g. `electric`, `manual`, `suv` |
| **Seller type** (`seller_type`) | `dealer` or `private` (CarGurus is almost all dealers) |
| **Search URLs** (`start_urls`) | Search pages copied from cargurus.com; they replace the filters above |
| **Max listings** (`limit`) | Stop after this many listings |
| **Full details** (`includeDetails`) | Paid add-on: description, equipment, vehicle history, dealer address |
| **Price history** (`trackHistory`) | Paid add-on: compare with your previous runs |
| **History store name** (`historyStoreName`) | Where the history is kept (default `cars-history`) |
| **Proxy** (`proxyConfiguration`) | US residential proxy, preselected (Apify Residential, country US) |

```json
{
    "location": "10001",
    "limit": 20
}
```

A filtered search:

```json
{
    "location": "90210",
    "radius_km": 80,
    "make": "Toyota",
    "model": "Camry",
    "min_year": 2020,
    "max_year": 2023,
    "max_price": 25000,
    "max_mileage": 60000,
    "limit": 150
}
```

With **Search URLs** paste a page like `https://www.cargurus.com/Cars/l-Used-Ford-F-150-d337?zip=60601&distance=100` or `https://www.cargurus.com/search?zip=33101&distance=50&maxPrice=20000`; filters in the URL are kept, the page number and sort order are ignored and results always come newest first.

#### ⬆️ Output

Car listings are stored in the default dataset, newest first. View them as a table in the **Output** tab or export JSON, CSV, Excel, XML or HTML. Fields a listing does not have are `null`; every item has the same keys.

##### A used car with the Full details add-on

```json
{
    "id": "cargurus:464315574",
    "source": "cargurus",
    "url": "https://www.cargurus.com/details/464315574",
    "title": "2019 Honda CR-V LX AWD",
    "make": "Honda",
    "model": "CR-V",
    "variant": "LX AWD",
    "condition": "used",
    "price": 12494.0,
    "price_currency": "USD",
    "price_type": "fixed",
    "mileage": 156218,
    "mileage_unit": "mi",
    "year": 2019,
    "first_registration": null,
    "fuel_type": "petrol",
    "transmission": "automatic",
    "body_type": "suv",
    "power_kw": 137,
    "power_hp": 184,
    "engine_cc": 2400,
    "color": "Platinum White Pearl",
    "doors": 4,
    "seats": null,
    "vin": "2HKRW6H39KH232657",
    "seller_type": "dealer",
    "seller_name": "Carz4Us",
    "seller_phone": "(888) 535-7166",
    "seller_url": "https://www.carz4us.comused-cars/Honda/2HKRW6H39KH232657?utm_source=cargurus&utm_medium=aggregator&utm_campaign=cargurus_listings_1",
    "address": "368 Main Street, South Hackensack, NJ 07606",
    "city": "South Hackensack",
    "postcode": "07606",
    "region": "NJ",
    "country": "US",
    "lat": 40.8551,
    "lon": -74.0469,
    "listed_at": "2026-11-15",
    "image_urls": [
        "https://static.cargurus.com/images/forsale/2026/11/14/14/03/2019_honda_cr-v-pic-2108757346896715946-1024x768.jpeg",
        "https://static.cargurus.com/images/forsale/2026/11/14/14/03/2019_honda_cr-v-pic-6940416293918964266-1024x768.jpeg",
        "..."
    ],
    "description": "Fresh oil change, Detailed, AWD. Recent Arrival! Clean CARFAX. 25/31 City/Highway MPG  2019 Honda CR-V LX  AWD CVT 2.4L I4 DOHC 16V i-VTEC ...",
    "deal_rating": "great_price",
    "imv_price": 13537,
    "imv_difference": 1043,
    "deal_score": 0.97928095,
    "days_on_market": 0,
    "total_price": 13472.0,
    "msrp": 15799.0,
    "certified_pre_owned": false,
    "drivetrain": "All-Wheel Drive",
    "engine": "184 hp 2.4L I4",
    "transmission_text": "Continuously Variable Transmission",
    "fuel_type_text": "Gasoline",
    "interior_color": "White (Ivory)",
    "mpg_city": 25.0,
    "mpg_highway": 31.0,
    "mpg_combined": 27.7,
    "options": ["Alloy Wheels", "Backup Camera"],
    "stock_number": "232657",
    "distance_mi": 7.7,
    "store_transfer": false,
    "featured": true,
    "dealer_id": 403813,
    "franchise_dealer": null,
    "seller_rating": 4.4375,
    "seller_review_count": 16,
    "equipment": {
        "Safety": ["ABS Brakes", "Backup Camera", "Curtain Airbags", "..."],
        "Options": ["Alloy Wheels", "..."]
    },
    "accident_count": 0,
    "owner_count": 1,
    "dealer_fees": [{ "name": "Documentation Fee", "amount": 978.0 }],
    "base_price": 12494.0,
    "details_fetched": true,
    "scraped_at": "2026-11-15T16:49:35Z"
}
```

`imv_difference` is the Instant Market Value minus the price: positive means the car is listed **below** market value (here $1,043 under), negative means above.

##### Extra fields with the Price history add-on

```json
{
    "first_seen_at": "2026-11-08T07:00:12+00:00",
    "previous_price": 13994,
    "price_change": -1500,
    "price_change_pct": -10.72,
    "status_changed": false,
    "price_history": [
        { "at": "2026-11-08T07:00:12+00:00", "price": 13994, "status": null },
        { "at": "2026-11-15T07:00:09+00:00", "price": 12494, "status": null }
    ]
}
```

#### What can I do with CarGurus data?

- 💸 **Underpriced car finder for flippers and wholesalers**: sort by `imv_difference` or keep `great_price` deals to find cars listed thousands under market value near your ZIP
- 📉 **Used car price drop alerts**: add **Price history**, run it daily and push cars with a negative `price_change` to Slack or e-mail
- 📊 **Used car market value research by make and model**: compare asking prices, IMV, mileage and `days_on_market` per model, year and region for pricing or appraisal models
- 🏢 **Car dealer lead generation**: collect dealer names, phones, cities, ratings and inventory size per state for dealer software, financing or marketing sales
- 🔍 **Dealer inventory and competitor monitoring**: watch a competitor's stock, days on market and price changes by `dealer_id`
- 🔋 **EV and hybrid market tracking**: follow used electric car prices, inventory and mileage nationwide with the fuel filter

#### Tips for best results

- Results come newest first, so a small **Max listings** on a schedule is the cheapest way to watch a market.
- `listed_at` is the day the car appeared on CarGurus (today minus `days_on_market`).
- `price` is the listed price; in states where CarGurus shows fee-inclusive prices it includes dealer fees, while the price filter works on the price before fees, so a few cars can be slightly over **Maximum price**. **Full details** adds `base_price` and the `dealer_fees`.
- CarGurus mixes in **store transfers**: cars a dealer group ships from a far store, shown in every radius search like on the site. They have `store_transfer: true` and their real `distance_mi`; filter on either if you only want local cars.
- Leave **Full details** off for counting, alerts and price monitoring; switch it on when you need descriptions, equipment, vehicle history or dealer addresses.
- Results from one run are deduplicated by listing ID.

#### Price history

Switch on **Price history** (`trackHistory`) and the Actor remembers every listing between runs, so you can see price drops and how long a car has been for sale.

- **Where it lives.** History is kept in a *named key-value store in your own Apify account* (default name `cars-history`, change it with **History store name**). Named stores never expire, you own the data, and storage costs a fraction of a cent.
- **First run starts the series.** The first time a listing is seen there is nothing to compare with, so `previous_price` is `null` and you are not charged for the add-on on that listing. From the second run on, each listing gets `first_seen_at`, `previous_price`, `price_change`, `price_change_pct` and `price_history` (the last 20 price points, one point per change).
- **Run it on a schedule.** History only grows when you run the Actor. Create a [schedule](https://docs.apify.com/platform/schedules) (daily is typical) with the same search and the same store name.
- **One store, several Actors.** Every car Actor we publish uses the same default store name, so a car keeps one history even if you scrape it with another of our car Actors. Item IDs start with the site (`cargurus:...`), so sites never clash.
- **Do not run two runs on the same store at the same time.** The last writer wins per listing, so two parallel runs can overwrite each other's newest point.
- **If you delete the store,** the Actor starts a new empty history without an error.

#### Frequently asked questions

#### Can I use CarGurus Car Listings Scraper with the Apify API?

Yes. Every run has a dataset you can read through the [Apify API](https://docs.apify.com/api/v2). Python:

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_APIFY_TOKEN>")
run = client.actor("carabain-digital/cargurus-listings").call(run_input={
    "location": "10001",
    "make": "Toyota",
    "model": "Camry",
    "max_price": 25000,
    "limit": 100,
})
for car in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(car["title"], car["price"], car["deal_rating"], car["imv_difference"])
```

JavaScript:

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

const client = new ApifyClient({ token: '<YOUR_APIFY_TOKEN>' });
const run = await client.actor('carabain-digital/cargurus-listings').call({
    location: '90012',
    fuel_type: 'electric',
    limit: 100,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items.length, 'cars');
```

#### Can I use CarGurus Car Listings Scraper through an MCP server or with AI agents?

Yes. Add it to an AI agent through the [Apify MCP server](https://mcp.apify.com) (`https://mcp.apify.com?tools=carabain-digital/cargurus-listings`), or let the agent find it with `search-actors` and run it with `call-actor`. A small search (`limit` 20) finishes in a few seconds, and the items are flat, so agents can read them with `get-dataset-items`. Example prompt: *"Use CarGurus Car Listings Scraper to find used Honda CR-Vs from 2019 or newer under $20,000 within 50 miles of ZIP 10001 and list the five with the biggest gap under market value."*

#### Can I integrate CarGurus data with other apps?

Yes: Google Sheets, Slack, Make, Zapier, n8n, Airtable or your own webhook, through Apify [integrations](https://apify.com/integrations) and [webhooks](https://docs.apify.com/platform/integrations/webhooks). Schedule a run and send new deals or price drops to your inbox or CRM.

#### What do the CarGurus deal ratings mean?

CarGurus compares each used car's price with its **Instant Market Value** (IMV), its estimate of what similar cars sell for, based on make, model, year, trim, mileage, options, condition and location. `deal_rating` is `great_price`, `good_price`, `fair_price`, `poor_price` (shown as "High Price" on the site), `overpriced`, `outlier` or `na` (not enough data). `imv_price` is the market value and `imv_difference` the gap to the price.

#### Why do I need a proxy?

CarGurus blocks datacenter IP addresses. The Actor therefore defaults to Apify's residential proxy in the US. If a run is blocked it retries on a fresh proxy session; if it still fails the run fails with a clear message instead of returning an empty dataset.

#### Why is a field empty?

Without **Full details**, `description`, `seller_url`, `lat`, `lon`, the equipment, vehicle history and dealer fee fields are `null`. New cars have no deal rating or market value. Some dealers publish no price ("call for price": `price_type` is `on_request`), and CarGurus does not know the horsepower of every engine. `first_registration` and `seats` are always `null`: US listings only have the model year.

#### Can I search by city instead of ZIP?

No. CarGurus searches around a ZIP code, so use the ZIP of the city centre (for example `60601` for Chicago) and a radius, or leave it empty for the whole US.

#### Is it legal to scrape CarGurus?

The Actor only collects publicly visible listings, the same data anyone can see on cargurus.com, and dealer business contact details. Rules such as privacy laws can still apply to how you store and use the data. Check your use case with a lawyer. More background: [Is web scraping legal?](https://blog.apify.com/is-web-scraping-legal/)

#### CarGurus Car Listings Scraper not working? Feedback

Open an issue on the **Issues** tab of this Actor with the run link and we will look at it. Feature ideas are welcome there too.

#### Other scrapers by us

| Actor | What it does |
|---|---|
| [CarGurus Reviews Scraper](https://apify.com/carabain-digital/car-gurus-reviews) | Scrape CarGurus dealer and car reviews: rating, text, date, reviewer. |
| [Auto Reviews Scraper](https://apify.com/carabain-digital/auto-reviews) | Car and dealer reviews from several automotive sites in one run. |
| [Germany Real Estate Scraper](https://apify.com/carabain-digital/germany-real-estate) | Scrape Immobilien from ImmoScout24 and Immowelt in one run, deduplicated. |

⭐ **Does it work well for you?** A review on the Store page helps others find this Actor and helps us keep it maintained.

# Actor input Schema

## `location` (type: `string`):

US ZIP code to search around (5 digits), as on CarGurus. Example: `10001` (New York), `90210`, `60601`. Leave empty to search all of the US. Ignored when you give search URLs.

## `radius_km` (type: `integer`):

Distance from the ZIP code in kilometres (converted to miles for CarGurus: 80 km = 50 mi). Default 50 miles. Example: `160` for 100 miles.

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

Car make as CarGurus writes it. Example: `Toyota`, `Ford`, `Mercedes-Benz`, `Land Rover`.

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

Model of that make (needs Make). Example: `Camry`, `F-150`, `Model 3`, `CR-V`.

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

`used` (CarGurus' default), `new`, or `any` (used cars first, then new cars). Example: `used`.

## `min_year` (type: `integer`):

Oldest model year. Example: `2018`.

## `max_year` (type: `integer`):

Newest model year. Example: `2023`.

## `min_price` (type: `integer`):

Lowest price in US dollars. Example: `10000`.

## `max_price` (type: `integer`):

Highest price in US dollars (CarGurus filters on the price before dealer fees). Example: `25000`.

## `max_mileage` (type: `integer`):

Highest odometer reading in miles. Example: `60000`.

## `fuel_type` (type: `string`):

Fuel type. Example: `electric`.

## `transmission` (type: `string`):

Transmission. Example: `manual`.

## `body_type` (type: `string`):

Body style. Example: `suv`.

## `seller_type` (type: `string`):

Keep only dealer or only private-seller listings. CarGurus search results are almost all dealers. Example: `dealer`.

## `start_urls` (type: `array`):

Search result pages copied from cargurus.com; they replace the filters above. Example: `https://www.cargurus.com/Cars/l-Used-Toyota-Camry-d292?zip=10001&distance=50`. Filters in the URL (ZIP, distance, price, year, mileage, body type ...) are kept; results always come newest first.

## `limit` (type: `integer`):

Stop after this many listings (newest first). Example: `100`.

## `includeDetails` (type: `boolean`):

Also open each listing: dealer description, all photos, full equipment list per category, accident and owner count from the vehicle history report, dealer fees and price before fees, dealer street address, coordinates, website and rating. Adds $1.00 per 1,000 listings on top of the base price. One extra request per listing (about 4 s per 10 listings).

## `trackHistory` (type: `boolean`):

Keep the price of every listing in a named store in your own Apify account and add first_seen_at, previous_price, price_change, price_change_pct and price_history to each item. Run it on a schedule: the first run only starts the series. Adds $1.00 per 1,000 listings that already had history. Do not run two runs on the same store at once.

## `historyStoreName` (type: `string`):

Name of the key-value store that holds the history (letters a-z, digits, dashes). All our car Actors use `cars-history` by default, so history is shared between them. Use another name to keep a separate series per search, e.g. `camry-nyc`.

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

CarGurus blocks datacenter IPs, so a US residential proxy is needed. The default (Apify Residential, country US) works; change it only to use your own proxy.

## Actor input object example

```json
{
  "location": "10001",
  "condition": "used",
  "fuel_type": "any",
  "transmission": "any",
  "body_type": "any",
  "seller_type": "any",
  "limit": 20,
  "includeDetails": false,
  "trackHistory": false,
  "historyStoreName": "cars-history",
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "US"
  }
}
```

# Actor output Schema

## `listings` (type: `string`):

All scraped car listings, one item per vehicle.

# 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 = {
    "location": "10001",
    "limit": 20,
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ],
        "apifyProxyCountry": "US"
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("carabain-digital/cargurus-listings").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 = {
    "location": "10001",
    "limit": 20,
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
        "apifyProxyCountry": "US",
    },
}

# Run the Actor and wait for it to finish
run = client.actor("carabain-digital/cargurus-listings").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 '{
  "location": "10001",
  "limit": 20,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "US"
  }
}' |
apify call carabain-digital/cargurus-listings --silent --output-dataset

```

## MCP server setup

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

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/m5cIv3xfm6YKUaOgB/builds/6Xoq1K6cEljF8dW7X/openapi.json
