# Kleinanzeigen Autos Scraper: Dealer Data (`getascraper/kleinanzeigen-cars-scraper`) Actor

Scrape public Kleinanzeigen Autos with dealer-ready filters. Get prices, mileage, specs, galleries, seller signals, and source URLs in Google Sheets, Excel, or n8n. Skip manual listing checks. $0.00087 per listing.

- **URL**: https://apify.com/getascraper/kleinanzeigen-cars-scraper.md
- **Developed by:** [GetAScraper](https://apify.com/getascraper) (community)
- **Categories:** E-commerce, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.65 / 1,000 car listings

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.
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 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

## 🚗 Kleinanzeigen Autos Scraper: Dealer Data

<table width="100%" style="border-collapse:collapse;table-layout:fixed;margin:0 0 16px">
<tbody>
<tr>
<td colspan="4" style="padding:14px 18px;background:#EAF2F8;border:1px solid #C7D9EA;border-top:3px solid #0B1F33;border-radius:10px 10px 0 0">
<span style="font-size:16px;font-weight:700;color:#1C1917">Germany is one stop in a ten-market European used-car dataset.</span> <span style="font-size:15px;color:#57534E">Kleinanzeigen covers German dealer-ready inventory with native search filters; the actors below extend the same row shape across Benelux, Nordic, Iberian, and UK markets.</span>
</td>
</tr>
<tr>
<td colspan="4" style="padding:10px 14px;background:#0B1F33;border-left:1px solid #0B1F33;border-right:1px solid #0B1F33">
<span style="color:#FFFFFF;font-size:14px;font-weight:700;letter-spacing:0.5px">EUROPEAN USED-CAR CLASSIFIEDS COVERAGE</span> <span style="color:#FFFFFF;opacity:0.85;font-size:13px">&nbsp;&nbsp;Cross-border sourcing and pricing data spanning Benelux, Nordic, DACH, Iberian, and UK classifieds, plus a pan-EU dealer platform. Ten separate markets, not one.</span>
</td>
</tr>
<tr>
<td width="25%" style="width:25%;padding:11px 12px;border-left:1px solid #C7D9EA;border-bottom:1px solid #C7D9EA;vertical-align:top;background:#EAF2F8;border-radius:0 0 0 10px">
<span style="overflow-wrap:break-word;word-break:break-word"><img src="https://apify-image-uploads-prod.s3.us-east-1.amazonaws.com/jNDbFabbVxMhnQNb4-actor-ckYdwgUHwTVD337SK-zVHl7h08Kh-Kleinanzeigen.webp" width="18" height="18" style="vertical-align:middle;border-radius:4px">&nbsp;<a href="https://apify.com/getascraper/kleinanzeigen-cars-scraper" style="color:#0B1F33;text-decoration:none;font-weight:700;font-size:13px">Kleinanzeigen (DE)</a></span><br>
<span style="color:#0B1F33;font-size:11px;font-weight:700">&#10148; You are here</span>
</td>
<td width="25%" style="width:25%;padding:11px 12px;border-left:1px solid #C7D9EA;border-bottom:1px solid #C7D9EA;vertical-align:top;background:#FFFFFF">
<span style="overflow-wrap:break-word;word-break:break-word"><img src="https://apify-image-uploads-prod.s3.us-east-1.amazonaws.com/jNDbFabbVxMhnQNb4-actor-Pj1SDha1m3bqFTb86-MXXoz4OaRh-marktplaats-logo-aangepast-voor-thissen-autos-1.png" width="18" height="18" style="vertical-align:middle;border-radius:4px">&nbsp;<a href="https://apify.com/getascraper/marktplaats-cars-scraper" style="color:#1C1917;text-decoration:none;font-weight:700;font-size:13px">Marktplaats (NL)</a></span><br>
<span style="color:#57534E;font-size:11px">Dutch classifieds</span>
</td>
<td width="25%" style="width:25%;padding:11px 12px;border-left:1px solid #C7D9EA;border-bottom:1px solid #C7D9EA;vertical-align:top;background:#FFFFFF">
<span style="overflow-wrap:break-word;word-break:break-word"><img src="https://apify-image-uploads-prod.s3.us-east-1.amazonaws.com/jNDbFabbVxMhnQNb4-actor-8IERs8zcVhonYlUfd-vmBYzLCwqg-images_%2840%29.png" width="18" height="18" style="vertical-align:middle;border-radius:4px">&nbsp;<a href="https://apify.com/getascraper/otomoto-cars-scraper" style="color:#1C1917;text-decoration:none;font-weight:700;font-size:13px">OtoMoto (PL)</a></span><br>
<span style="color:#57534E;font-size:11px">Polish classifieds</span>
</td>
<td width="25%" style="width:25%;padding:11px 12px;border-left:1px solid #C7D9EA;border-right:1px solid #C7D9EA;border-bottom:1px solid #C7D9EA;vertical-align:top;background:#FFFFFF;border-radius:0 0 10px 0">
<span style="overflow-wrap:break-word;word-break:break-word"><img src="https://apify-image-uploads-prod.s3.us-east-1.amazonaws.com/jNDbFabbVxMhnQNb4-actor-QNOrwmoRJNQigdM12-Bvhsz8n53s-unnamed_%2836%29.png" width="18" height="18" style="vertical-align:middle;border-radius:4px">&nbsp;<a href="https://apify.com/getascraper/standvirtual-cars-scraper" style="color:#1C1917;text-decoration:none;font-weight:700;font-size:13px">Standvirtual (PT)</a></span><br>
<span style="color:#57534E;font-size:11px">Portuguese classifieds</span>
</td>
</tr>
</tbody>
</table>

<table width="100%">
<tr>
<td style="padding:24px 28px;background:#EAF2F8;border:1px solid #C7D9EA;border-top:4px solid #0B1F33;border-radius:12px">
<span style="font-size:23px;font-weight:800;color:#1C1917;line-height:1.3">Find dealer-ready German car inventory without building fragile search URLs.</span><br>
<span style="font-size:15px;color:#57534E;line-height:1.6">Scrape public Kleinanzeigen Autos with native filters and export prices, mileage, specifications, galleries, and seller signals to Google Sheets, Excel, or n8n.</span>
</td>
</tr>
</table>

<table width="100%">
<tr>
<td style="padding:14px 12px;width:25%;background:#FFFFFF;border:1px solid #C7D9EA;border-radius:10px 0 0 10px;vertical-align:top">
<span style="font-size:15px;font-weight:800;color:#0B1F33">🎯 Native filters</span><br>
<span style="font-size:12px;color:#57534E">Search cars the way dealers evaluate stock.</span>
</td>
<td style="padding:14px 12px;width:25%;background:#FFFFFF;border:1px solid #C7D9EA;border-left:none;vertical-align:top">
<span style="font-size:15px;font-weight:800;color:#0B1F33">🧹 Clean records</span><br>
<span style="font-size:12px;color:#57534E">Missing source values stay absent, never guessed.</span>
</td>
<td style="padding:14px 12px;width:25%;background:#FFFFFF;border:1px solid #C7D9EA;border-left:none;vertical-align:top">
<span style="font-size:15px;font-weight:800;color:#0B1F33">🪪 Seller context</span><br>
<span style="font-size:12px;color:#57534E">See public seller badges and profile links.</span>
</td>
<td style="padding:14px 12px;width:25%;background:#FFFFFF;border:1px solid #C7D9EA;border-left:none;border-radius:0 10px 10px 0;vertical-align:top">
<span style="font-size:15px;font-weight:800;color:#0B1F33">🖼️ Complete galleries</span><br>
<span style="font-size:12px;color:#57534E">Keep every public listing image.</span>
</td>
</tr>
</table>

Most Kleinanzeigen scrapers force you to hand-build search URLs and hope nothing breaks. This Actor gives you real filters, a full public data set per listing, and clean output ready for a sourcing pipeline.

### 🔍 What does this Actor do?

Kleinanzeigen Cars Scraper turns public German Autoanzeigen into structured vehicle data. It's built for dealers, sourcing teams, and market researchers who need comparable inventory without manually rebuilding the same search every day.

Build a guided search for make, model, price, mileage, registration year, power, fuel, transmission, body style, location, seller type, and equipment. Or paste a public Kleinanzeigen search or listing URL unchanged. The Actor returns only data present on the public listing.

### 🎯 Why use it?

- **Sourcing teams** can narrow a city to a radius, restrict results to commercial diesel estates under a budget, and export the matching inventory.
- **Market researchers** can collect price, mileage, registration, and rank context for comparable vehicles.
- **Dealers** can review public seller badges and image galleries before opening every source page.

### 🧭 How to use it

<table width="100%">
<tr>
<td style="padding:16px 14px;width:33%;background:#EAF2F8;border:1px solid #C7D9EA;border-radius:10px 0 0 10px;vertical-align:top">
<span style="font-size:12px;font-weight:800;color:#0B1F33;letter-spacing:1px">STEP 1</span><br>
<span style="font-size:14px;font-weight:700;color:#1C1917">Choose a search</span><br>
<span style="font-size:12px;color:#57534E">Build a guided search or paste public URLs.</span>
</td>
<td style="padding:16px 14px;width:33%;background:#EAF2F8;border:1px solid #C7D9EA;border-left:none;vertical-align:top">
<span style="font-size:12px;font-weight:800;color:#0B1F33;letter-spacing:1px">STEP 2</span><br>
<span style="font-size:14px;font-weight:700;color:#1C1917">Set filters</span><br>
<span style="font-size:12px;color:#57534E">Choose the stock and supply signals you need.</span>
</td>
<td style="padding:16px 14px;width:33%;background:#EAF2F8;border:1px solid #C7D9EA;border-left:none;border-radius:0 10px 10px 0;vertical-align:top">
<span style="font-size:12px;font-weight:800;color:#0B1F33;letter-spacing:1px">STEP 3</span><br>
<span style="font-size:14px;font-weight:700;color:#1C1917">Export results</span><br>
<span style="font-size:12px;color:#57534E">Download your dataset in JSON, CSV, Excel, or HTML.</span>
</td>
</tr>
</table>

### 🧾 Input

| Field | Type | Required | Description |
|---|---|---|---|
| `searchMode` | enum | No | Build a guided car search, or use pasted Kleinanzeigen URLs unchanged. |
| `startUrls` | array of URLs | No | Public Kleinanzeigen search or listing URLs. Used only in pasted-URL mode. |
| `keywords` | string | No | Words to match in the listing title or description, such as a trim or equipment. |
| `make` | enum | No | Vehicle make. Common makes are suggested, and other source values are accepted. |
| `model` | string | No | Model or model variant, kept as a free-text search term. |
| `location` | string | No | City name or German postcode to search near. |
| `radiusKm` | integer | No | Search radius around the location, in kilometers. |
| `minPriceEur` / `maxPriceEur` | integer | No | Lowest and highest asking price, in euros. |
| `minMileageKm` / `maxMileageKm` | integer | No | Lowest and highest mileage, in kilometers. |
| `minFirstRegistrationYear` / `maxFirstRegistrationYear` | integer | No | Earliest and latest first-registration year. |
| `minPowerKw` / `maxPowerKw` | integer | No | Lowest and highest engine power, in kilowatts. |
| `fuelTypes` | array of enum | No | One or more fuel types: petrol, diesel, CNG, LPG, hybrid, electric, other. |
| `transmissions` | array of enum | No | Automatic, manual, or both. |
| `bodyTypes` | array of enum | No | One or more body styles, such as saloon, estate, or SUV. |
| `damageStatus` | enum | No | Limit results to damaged or undamaged vehicles. |
| `doorCounts` | array of enum | No | One or more door-count bands. |
| `colors` | array of enum | No | One or more exterior colors. |
| `emissionClasses` | array of enum | No | One or more Euro emission classes. |
| `environmentBadges` | array of enum | No | One or more German environmental badge categories. |
| `interiorMaterials` | array of enum | No | One or more interior materials, such as full leather or fabric. |
| `minTuVYear` | integer | No | Earliest required TÜV validity year. |
| `sellerType` | enum | No | Private listings, commercial dealer listings, or both. |
| `listingIntent` | enum | No | Vehicle offers, buyer requests, or both. |
| `features` | array of enum | No | Required equipment, such as navigation, parking assist, or a sunroof. |
| `sortBy` | enum | No | Result ordering: recommended, newest, lowest price, or highest price. |
| `scrapeDetails` | boolean | No | Open each listing for full specifications, galleries, and seller context. Default `true`. |
| `maxItems` | integer | No | Maximum listings saved to the dataset. Default `10`. |
| `maxPages` | integer | No | Maximum search result pages read per search. Default `2`. |
| `maxDetailPages` | integer | No | Maximum listings opened when detail enrichment is on. Default `10`. |
| `maxConcurrency` | integer | No | Maximum requests running at the same time. Default `2`. |
| `proxyConfiguration` | object | No | Optional proxy settings. Not required for normal use. |

### 📦 Output

Every record includes the direct listing URL, price, location, source timestamp, and the strongest public vehicle details available. Detail enrichment adds full specifications, descriptions, image galleries, public seller context, and additional source attributes.

```json
{
  "listing_url": "https://www.kleinanzeigen.de/s-anzeige/beispiel-audi-a4/1234567890",
  "listing_id": "1234567890",
  "title": "Audi A4 Avant 2.0 TDI",
  "price": 18500,
  "currency": "EUR",
  "is_negotiable": true,
  "make": "Audi",
  "model": "A4",
  "body_type": "Estate",
  "year": 2019,
  "mileage_km": 82000,
  "fuel_type": "Diesel",
  "transmission": "Automatic",
  "power_kw": 140,
  "color": "Grey",
  "location": "München",
  "postal_code": "80331",
  "seller_type": "Commercial",
  "seller_name": "Beispiel Autohandel GmbH",
  "seller_badges": ["Verified dealer"],
  "image_urls": ["https://img.kleinanzeigen.de/api/v1/prod-ads/images/example.jpg"],
  "search_rank": 3,
  "search_page": 1,
  "detail_scraped": true,
  "scraped_at": "2026-08-20T05:00:00.000Z"
}
```

You can download the dataset in various formats such as JSON, HTML, CSV, or Excel.

### 📊 Data table

| Field | Type | Description |
|---|---|---|
| `listing_url`, `listing_id` | string | Public listing link and its source ID. |
| `title`, `description` | string | Listing headline and full description text. |
| `price`, `price_text`, `price_type`, `is_negotiable`, `currency` | mixed | Asking price and how it's presented on the source listing. |
| `make`, `model`, `body_type`, `condition` | string | Vehicle identity and condition. |
| `year`, `first_registration` | mixed | Model year and first-registration date, when published. |
| `mileage_km`, `fuel_type`, `transmission`, `power_kw`, `engine_cc` | mixed | Vehicle specification fields, when published. |
| `color`, `doors`, `seats`, `emission_class` | mixed | Additional vehicle detail fields, when published. |
| `location`, `postal_code`, `street_address` | string | Seller location fields, when published. |
| `image_url`, `image_urls`, `image_count` | mixed | Listing photos and how many are available. |
| `seller_name`, `seller_type`, `seller_profile_url`, `seller_badges`, `seller_rating`, `seller_review_count`, `seller_is_verified` | mixed | Public seller identity and trust signals, when published. |
| `search_rank`, `search_page` | integer | Position of the listing in the source search results. |
| `source_url`, `source_search_url` | string | The listing page and the search that produced it. |
| `detail_scraped` | boolean | Whether the individual listing page was opened for enrichment. |
| `listed_at`, `scraped_at` | string | When the listing was published and when this record was built. |

Any field the source listing does not publish is left out of that record entirely, so you never see placeholder or made-up values.

### 💰 Pricing

Pricing is pay per saved result. Empty runs cost nothing, and there are no subscriptions. Keep early runs small while validating a new sourcing scope.

### ⭐ Enjoying Kleinanzeigen Autos Scraper?

<table width="100%">
<tr>
<td style="padding:20px 24px 14px;background:#EAF2F8;border:1px solid #C7D9EA;border-left:5px solid #0B1F33;border-radius:10px 10px 0 0">
<span style="font-size:20px;letter-spacing:4px">⭐ ⭐ ⭐ ⭐ ⭐</span><br>
<span style="font-size:17px;font-weight:800;color:#1C1917">This Actor just saved your team from rebuilding the same search by hand.</span><br>
<span style="font-size:14px;color:#57534E">A 5-star rating takes 10 seconds and helps other dealers, sourcing teams, and researchers find it. Your feedback also tells us what to build next.</span>
</td>
</tr>
<tr>
<td style="padding:0;background:#0B1F33;border:1px solid #C7D9EA;border-top:none;border-radius:0 0 10px 10px;text-align:center">
<a href="https://apify.com/getascraper/kleinanzeigen-cars-scraper/reviews" style="display:block;padding:13px 16px;color:#FFFFFF;text-decoration:none;font-weight:800;font-size:15px;letter-spacing:0.3px">★&nbsp;&nbsp;Rate this Actor on Apify</a>
</td>
</tr>
</table>

### ❓ FAQ

**Can I paste a Kleinanzeigen URL I already filtered?**
Yes. Select pasted URL mode and the Actor uses public Kleinanzeigen search or listing URLs unchanged.

**Can I mix pasted URLs and guided filters?**
No. This keeps each run reproducible and prevents filters from unexpectedly changing a source URL.

**Why is a field missing from an item?**
Kleinanzeigen listings do not publish every detail. Missing values are omitted rather than replaced with guesses.

**Is this affiliated with Kleinanzeigen?**
No. This is an independent tool that collects publicly available listing information. Use it in line with applicable rules and the source website's terms.

Found a bug or want a feature added? Open an issue on the Actor's Issues tab, or reach out for a custom version of this Actor.

### 🔗 Other actors

- [Marktplaats Cars Scraper: Tweedehands auto's](https://apify.com/getascraper/marktplaats-cars-scraper) ↗ - Used-car listings from the Netherlands.
- [OtoMoto Cars Scraper: Samochody używane](https://apify.com/getascraper/otomoto-cars-scraper) ↗ - Used-car inventory from Poland's largest car marketplace.
- [VIN Decoder + NHTSA Recalls & Complaints: One Call](https://apify.com/getascraper/nhtsa-vehicle-intelligence-monitor) ↗ - Enrich vehicle research with official US recall and complaint data.
- [YallaMotor Cars Scraper](https://apify.com/getascraper/yallamotor-cars-scraper) ↗ - New and used car listings from the Middle East's YallaMotor.

# Actor input Schema

## `searchMode` (type: `string`):

Build a Kleinanzeigen autos search with the filters below, or use pasted Kleinanzeigen URLs without changes.

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

Used only when search mode is set to pasted URLs. These public URLs are crawled unchanged.

## `keywords` (type: `string`):

Optional words found in the listing title or description, such as trim, model variant, or equipment.

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

Vehicle make. Common Kleinanzeigen makes are suggested and custom source values are accepted.

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

Optional model text, kept as a Kleinanzeigen keyword constraint so uncommon variants are not silently dropped.

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

Kleinanzeigen resolves this to an exact location before the search starts. Use the city name or German postcode.

## `radiusKm` (type: `integer`):

Distance around the selected city or postcode. Use a Kleinanzeigen-supported value: 0, 1, 2, 3, 5, 10, 15, 20, 30, 50, 100, 150, or 200.

## `minPriceEur` (type: `integer`):

Lowest asking price in euros.

## `maxPriceEur` (type: `integer`):

Highest asking price in euros.

## `minMileageKm` (type: `integer`):

Lowest mileage in kilometres.

## `maxMileageKm` (type: `integer`):

Highest mileage in kilometres.

## `minFirstRegistrationYear` (type: `integer`):

Earliest first-registration year.

## `maxFirstRegistrationYear` (type: `integer`):

Latest first-registration year.

## `minPowerKw` (type: `integer`):

Lowest engine power in kilowatts.

## `maxPowerKw` (type: `integer`):

Highest engine power in kilowatts.

## `fuelTypes` (type: `array`):

One or more fuel types available on Kleinanzeigen.

## `transmissions` (type: `array`):

Automatic, manual, or both.

## `bodyTypes` (type: `array`):

One or more vehicle body styles.

## `damageStatus` (type: `string`):

Limit results to damaged or undamaged vehicles.

## `doorCounts` (type: `array`):

One or more Kleinanzeigen door-count bands.

## `colors` (type: `array`):

One or more exterior colours.

## `emissionClasses` (type: `array`):

One or more source emission classes.

## `environmentBadges` (type: `array`):

One or more German environmental badge categories.

## `interiorMaterials` (type: `array`):

One or more source interior-material values.

## `minTuVYear` (type: `integer`):

Earliest TÜV year required by the source filter.

## `sellerType` (type: `string`):

Choose private listings or commercial dealer listings.

## `listingIntent` (type: `string`):

Choose listings that offer a vehicle or requests from buyers.

## `features` (type: `array`):

Require one or more source-supported equipment features.

## `sortBy` (type: `string`):

Ordering used by the Kleinanzeigen search results.

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

Optional Apify Proxy settings. Kleinanzeigen is tested with direct public requests, so leave this empty unless your run needs a different network route.

## `scrapeDetails` (type: `boolean`):

Open individual listings to add detailed specifications, complete image galleries, public seller signals, and source attributes.

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

Maximum number of vehicle listings saved to the dataset.

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

Maximum number of pages read for each search URL.

## `maxDetailPages` (type: `integer`):

Maximum number of individual listings opened when detail enrichment is enabled.

## `maxConcurrency` (type: `integer`):

Advanced network setting. Lower values are gentler on the source and higher values may finish faster.

## Actor input object example

```json
{
  "searchMode": "guided",
  "startUrls": [],
  "keywords": "",
  "make": "",
  "model": "",
  "location": "",
  "radiusKm": 0,
  "minPriceEur": 0,
  "maxPriceEur": 10000000,
  "minMileageKm": 0,
  "maxMileageKm": 2000000,
  "minFirstRegistrationYear": 1900,
  "maxFirstRegistrationYear": 2100,
  "minPowerKw": 1,
  "maxPowerKw": 2000,
  "fuelTypes": [],
  "transmissions": [],
  "bodyTypes": [],
  "damageStatus": "",
  "doorCounts": [],
  "colors": [],
  "emissionClasses": [],
  "environmentBadges": [],
  "interiorMaterials": [],
  "minTuVYear": 1900,
  "sellerType": "",
  "listingIntent": "",
  "features": [],
  "sortBy": "recommended",
  "proxyConfiguration": {},
  "scrapeDetails": true,
  "maxItems": 10,
  "maxPages": 2,
  "maxDetailPages": 10,
  "maxConcurrency": 2
}
```

# Actor output Schema

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

Die erfassten Fahrzeuganzeigen im Standard-Dataset.

# 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 = {
    "searchMode": "guided",
    "sortBy": "recommended",
    "scrapeDetails": true,
    "maxItems": 10,
    "maxPages": 2,
    "maxDetailPages": 10,
    "maxConcurrency": 2
};

// Run the Actor and wait for it to finish
const run = await client.actor("getascraper/kleinanzeigen-cars-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 = {
    "searchMode": "guided",
    "sortBy": "recommended",
    "scrapeDetails": True,
    "maxItems": 10,
    "maxPages": 2,
    "maxDetailPages": 10,
    "maxConcurrency": 2,
}

# Run the Actor and wait for it to finish
run = client.actor("getascraper/kleinanzeigen-cars-scraper").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 '{
  "searchMode": "guided",
  "sortBy": "recommended",
  "scrapeDetails": true,
  "maxItems": 10,
  "maxPages": 2,
  "maxDetailPages": 10,
  "maxConcurrency": 2
}' |
apify call getascraper/kleinanzeigen-cars-scraper --silent --output-dataset

```

## MCP server setup

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

```

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/ckYdwgUHwTVD337SK/builds/bheje8C4iYFmvA9l7/openapi.json
