# Kleinanzeigen Scraper (`datascrapers/kleinanzeigen-scraper`) Actor

Kleinanzeigen.de listing dataset from search URLs or keywords, including titles, prices, locations, seller type, and optional listing details.

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

## Pricing

from $1.30 / 1,000 results

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

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

## What's an Apify Actor?

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 Scraper** creates a structured dataset of classified listings collected from [Kleinanzeigen](https://www.kleinanzeigen.de), Germany's classifieds marketplace. Each dataset item represents one Kleinanzeigen listing and can include identifiers, title, price, location, shipping, category, images, attributes, and seller fields. Query the source by pasting Kleinanzeigen search or category URLs, individual `/s-anzeige/` listing URLs, or keyword `searchQueries`. Control the result limit with `maxItems`, and retrieve records through the Apify Dataset API or export them as JSON, CSV, Excel, XML, or another supported format.

### Dataset at a glance

| Property | Value |
|---|---|
| Source | kleinanzeigen.de (German classifieds marketplace) |
| Record unit | One Kleinanzeigen listing |
| Input methods | Search/category or `/s-anzeige/` listing URLs (`startUrls`); keyword queries (`searchQueries`) |
| Main identifiers | `id`, `url` |
| Delivery | Apify Dataset and API |
| Export formats | JSON, CSV, Excel, XML, HTML (Apify dataset exports) |
| Update model | Fresh records per Actor run |
| Pricing | $2.00 per 1,000 listings (`apify-default-dataset-item`); Actor start $0.00005 |

### Coverage and available records

The Actor collects listings from public Kleinanzeigen pages using one or both entry points:

- **URL-based**: Pass search or category URLs (for example `https://www.kleinanzeigen.de/s-laptop/k0`) or `/s-anzeige/` listing URLs in `startUrls`.
- **Search-based**: Set `searchQueries` (console prefill `laptop`). Each query becomes a Kleinanzeigen search URL. Both inputs can be combined.

Record types and limits:

- **Overview records** always include `id`, `listingId`, `url`, `title`, `price`, `priceValue`, `currency`, `location`, `shipping`, `sellerType`, `isProfessional`, `tags`, and `badges` when the search card publishes them.
- **Detail fields** are conditional. Schema default for `fetchDetails` is `true` (console prefill `false`). When enabled, the same record can include full description, image gallery, `attributes`, `features`, `locationStructured`, `category`, `postedDate`, `viewsCount`, and `seller`. Disable it for overview-only records (`detailFetched` is then `false`).
- **Result cap**: `maxItems` limits listings (`0` = unlimited, schema default; console prefill `25`). `maxPages` limits pages per start URL (`0` = site cap, about 10 pages / about 250 listings).
- **Site cap**: Kleinanzeigen caps unfiltered searches at about 250 results.

Known exclusions: login-only content; historical snapshots.

### Data dictionary

Field names match dataset JSON properties exactly. Fields marked *conditional* appear when `fetchDetails` is enabled and Kleinanzeigen publishes the value. Missing text is usually `""`; `priceValue` and `viewsCount` can be `null`. Deduplicate on `id` or `url`.

| Field | Type | Nullable | Description | Example |
|---|---|---:|---|---|
| `id` | string | No | Numeric listing identifier; recommended dedup key | `3445720155` |
| `listingId` | string | No | Listing slug or id from the card or `/s-anzeige/` URL | `3445720155` |
| `url` | string | No | Listing page URL; secondary dedup key | `https://www.kleinanzeigen.de/s-anzeige/3445720155` |
| `title` | string | Yes | Listing headline | `Lenovo ThinkPad T14 Gen 1 \| 14" \| 16 GB RAM \| 512 GB SSD` |
| `description` | string | Yes | Card snippet, or full text when `fetchDetails` is on | — |
| `price` | string | Yes | Asking price as shown (`VB`, `VHB`, `zu verschenken`) | `319 €` |
| `priceValue` | number | Yes | Numeric euro amount; `null` when not parseable | `319.0` |
| `currency` | string | Yes | Currency code when a euro price is shown | `EUR` |
| `location` | string | Yes | Location as shown (postal code and city) | `58644 Iserlohn` |
| `locationStructured` | object | Yes | Structured location (*conditional*) | See nested table |
| `shipping` | string | Yes | Shipping or pickup label as shown | `Versand möglich` |
| `viewsCount` | integer | Yes | View count when published (*conditional*) | — |
| `category` | string | Yes | Category when published (*conditional*) | — |
| `postedDate` | string | Yes | Posted date as rendered (*conditional*) | — |
| `images` | string\[] | Yes | Image URLs; gallery when `fetchDetails` is on | — |
| `attributes` | object | Yes | Label/value pairs (*conditional*); keys vary by category | `{}` |
| `features` | string\[] | Yes | Feature tags (*conditional*) | `[]` |
| `tags` | object | Yes | Card tags `{size, rooms, condition}` | See nested table |
| `badges` | string\[] | Yes | Badges when shown (`TOP`, `Highlight`, `Verkäufergarantie`) | `[]` |
| `sellerType` | string | Yes | `Gewerblich`, `Privat`, or empty | `Gewerblich` |
| `isProfessional` | boolean | No | `true` when the listing is marked commercial | `true` |
| `seller` | object | Yes | Seller object (*conditional*) | See nested table |
| `source` | string | No | Source host | `kleinanzeigen.de` |
| `scrapedAt` | string | No | Collection timestamp (ISO 8601, UTC) | `2026-07-14T14:49:31.184181+00:00` |
| `detailFetched` | boolean | No | `true` when the listing page was collected | `false` |

#### `locationStructured` (conditional — `fetchDetails`)

| Field | Type | Nullable | Description |
|---|---|---:|---|
| `street` | string | Yes | Street when published |
| `postalCode` | string | Yes | German postal code |
| `city` | string | Yes | City |
| `district` | string | Yes | District when published |

#### `tags`

| Field | Type | Nullable | Description |
|---|---|---:|---|
| `size` | string | Yes | Size tag when shown (for example floor area) |
| `rooms` | string | Yes | Room-count tag when shown |
| `condition` | string | Yes | Condition or remaining card tag |

#### `seller` (conditional — `fetchDetails`)

| Field | Type | Nullable | Description |
|---|---|---:|---|
| `companyName` | string | Yes | Commercial seller name when published |
| `contactName` | string | Yes | Contact name when published |
| `profileUrl` | string | Yes | Seller profile URL when published |
| `imprint` | string | Yes | Imprint text when published |
| `activeSince` | string | Yes | Activity tenure as shown |
| `isPrivate` | boolean | Yes | `true` when the seller is marked private |

### Example dataset record

Overview-only record from a laptop search (`fetchDetails: false`). Empty objects, empty arrays, and `null` are the Actor's overview-only defaults.

```json
{
  "id": "3445720155",
  "listingId": "3445720155",
  "url": "https://www.kleinanzeigen.de/s-anzeige/3445720155",
  "title": "Lenovo ThinkPad T14 Gen 1 | 14\" | 16 GB RAM | 512 GB SSD",
  "description": "",
  "price": "319 €",
  "priceValue": 319.0,
  "currency": "EUR",
  "location": "58644 Iserlohn",
  "locationStructured": {},
  "shipping": "Versand möglich",
  "viewsCount": null,
  "category": "",
  "postedDate": "",
  "images": [],
  "attributes": {},
  "features": [],
  "tags": {},
  "badges": [],
  "sellerType": "Gewerblich",
  "isProfessional": true,
  "seller": {},
  "source": "kleinanzeigen.de",
  "scrapedAt": "2026-07-14T14:49:31.184181+00:00",
  "detailFetched": false
}
```

The record above was produced with this input:

```json
{
  "startUrls": [{ "url": "https://www.kleinanzeigen.de/s-laptop/k0" }],
  "maxItems": 25,
  "maxPages": 0,
  "fetchDetails": false,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": ["RESIDENTIAL"],
    "apifyProxyCountry": "DE"
  }
}
```

### Query and input reference

| Input | Type | Required | Default | Accepted values | Description |
|---|---|---|---|---|---|
| `startUrls` | array (requestListSources) | No\* | — | Search/category or `/s-anzeige/` URLs | URL entry point. Console prefill: `https://www.kleinanzeigen.de/s-laptop/k0` |
| `searchQueries` | array (string) | No\* | — | Keywords (e.g. `laptop`) | Converted to Kleinanzeigen search URLs. Console prefill: `["laptop"]` |
| `maxItems` | integer | No | `0` | `0` or any positive integer | Maximum listings; `0` = unlimited (site cap still applies). Console prefill: `25` |
| `maxPages` | integer | No | `0` | `0` or any positive integer | Pages per start URL; `0` = site cap (~10 pages / ~250 listings) |
| `fetchDetails` | boolean | No | `true` | `true` / `false` | Listing-page fields on the same record. `false` = overview-only. Console prefill: `false` |
| `proxyConfiguration` | object | No | Apify proxy, `RESIDENTIAL`, `DE` | Apify or custom proxies | Residential Germany (`DE`) recommended |

\* Provide `startUrls`, `searchQueries`, or both. At least one source is required to collect listings.

Minimal request:

```json
{ "searchQueries": ["laptop"] }
```

Advanced request (search URL, detail fields, residential DE proxy):

```json
{
  "startUrls": [{ "url": "https://www.kleinanzeigen.de/s-laptop/k0" }],
  "maxItems": 25,
  "maxPages": 0,
  "fetchDetails": true,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": ["RESIDENTIAL"],
    "apifyProxyCountry": "DE"
  }
}
```

### Retrieve the data through the API

The Actor is published at <https://apify.com/datascrapers/kleinanzeigen-scraper>.

1. Start the Actor with a JSON input (console or API).
2. Wait for the run to finish, or use a synchronous endpoint if you want the response inline.
3. Retrieve items from the run's default dataset.
4. Paginate or export the dataset.

Python example:

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR-APIFY-TOKEN")

run_input = {
    "startUrls": [{"url": "https://www.kleinanzeigen.de/s-laptop/k0"}],
    "maxItems": 25,
    "fetchDetails": True,
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
        "apifyProxyCountry": "DE",
    },
}

run = client.actor("datascrapers/kleinanzeigen-scraper").call(run_input=run_input)
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item["id"], item["title"], item["price"])
```

Apify generates ready-to-run Python, JavaScript, and cURL examples on the Actor's API tab. Do not put a real API token in shared code or URLs.

### Data quality and record handling

- **Conditional fields**: description, gallery, `attributes`, `features`, `locationStructured`, `category`, `postedDate`, `viewsCount`, and `seller` appear when `fetchDetails` is enabled and published. Overview-only runs set `detailFetched` to `false`.
- **Source vs derived**: `price`, `location`, `shipping`, `sellerType`, `postedDate`, and `category` are stored as shown. `priceValue` is derived from `price` (`null` for `VB`, `VHB`, `zu verschenken`). `currency` is `EUR` when a euro amount is shown.
- **Deduplication**: unique by listing id within a run. Across runs, use `id` or `url`. Previous runs are not deduplicated.
- **Empty versus null**: missing text is usually `""`; objects `{}`; arrays `[]`; `priceValue` and `viewsCount` can be `null`. Unreadable fields are not fabricated.
- **Residential proxies**: Germany (`DE`) residential proxies are recommended; datacenter IPs may reduce coverage.

### Export and pipeline examples

| Destination | Recommended method | Typical use |
|---|---|---|
| PostgreSQL / Supabase | Dataset API poll or webhook consumer | Store listings alongside price-monitoring tables |
| Google Sheets | Apify Google Sheets integration | Share listing shortlists with research teams |
| CRM (HubSpot, Salesforce) | Webhook on run completion | Push new listings into outreach pipelines |
| S3 / cloud storage | Scheduled export via Apify scheduler + integration | Archival of marketplace snapshots |

### Pricing and cost examples

Pay-per-event: each listing is billed as `apify-default-dataset-item` at $0.002 ($2.00 per 1,000). Actor start is $0.00005 per run. `fetchDetails` changes fields on the same record; it is not a second billed event.

| Event | Trigger | Rate |
|---|---|---|
| Actor start | Once per run | $0.00005 |
| Listing result (`apify-default-dataset-item`) | Each listing pushed to the dataset | $0.002 per record ($2.00 per 1,000) |

| Records | Configuration | Estimated base cost |
|---:|---|---:|
| 1,000 | Overview or details (`fetchDetails` on or off) | $2.00 |
| 10,000 | Overview or details (`fetchDetails` on or off) | $20.00 |

Actor start ($0.00005) does not change the per-1,000 listing total at these sizes. Compute units are billed by your Apify plan. Estimates depend on the verified pricing model and selected options.

### Limitations and responsible data use

- The Actor collects publicly accessible Kleinanzeigen page data only.
- Unfiltered searches are capped at about 250 results (about 10 pages). Use additional or filtered start URLs for a larger set.
- Field availability depends on what Kleinanzeigen renders at run time; values can be empty or null.
- No historical snapshots unless you store them yourself.
- Residential proxies in Germany (`DE`) are recommended for large runs.
- You are responsible for compliance with Kleinanzeigen's terms, applicable privacy law, and any contractual obligations.

### Dataset questions

#### What does one dataset item represent?

One Kleinanzeigen listing. `fetchDetails` adds fields to that same record; it does not create a second item.

#### Which field should I use as a unique identifier?

`id` (the numeric Kleinanzeigen listing identifier) is the recommended deduplication key. Use `url` as a secondary key.

#### Are fields nullable or conditional?

Yes. Detail fields exist only when `fetchDetails` is enabled and Kleinanzeigen publishes them. `priceValue` and `viewsCount` can be `null`. Other missing values are typically empty strings, objects, or arrays.

#### What does fetchDetails change?

Schema default is `true`. Enabled: same record can include full description, gallery, `attributes`, `features`, `locationStructured`, `category`, `postedDate`, `viewsCount`, and `seller`. Disabled: overview-only, `detailFetched` is `false`. Billing remains one `apify-default-dataset-item` per listing.

#### Can I retrieve the records as CSV or JSON?

Yes. The dataset can be exported as JSON, CSV, Excel, XML, or HTML from the Apify Console, and queried through the Dataset API.

#### Does the Actor return historical data?

No. Each run captures listing state at run time. To track price or availability changes, schedule repeated runs and store the outputs yourself.

#### What counts as a billable result?

One `apify-default-dataset-item` charge per listing pushed to the dataset ($0.002, or $2.00 per 1,000). Actor start is $0.00005 once per run. There is no separate details event.

### Related datasets from Data Scrapers

- **[Gumtree Scraper](https://apify.com/datascrapers/gumtree-scraper)** — UK classified listings comparable with Kleinanzeigen for-sale ads.
- **[Etsy Scraper](https://apify.com/datascrapers/etsy-scraper)** — Marketplace goods for price comparison with Kleinanzeigen products.
- **[Cars.com Scraper](https://apify.com/datascrapers/cars-scraper)** — US vehicle listings alongside Kleinanzeigen automotive ads.
- **[Immobilienscout24 Scraper](https://apify.com/datascrapers/immobilienscout24-scraper)** — German property listings joinable with Kleinanzeigen real-estate ads by location.
- **[Amazon Search Scraper](https://apify.com/datascrapers/amazon-scraper)** — Retail product records for classifieds price comparison.

### Data Scrapers support

Need an additional field, record type, or export workflow? Contact Data Scrapers at stardustspotlight@gmail.com. Include a sample source URL, required fields, expected record volume, and preferred delivery format.

# Actor input Schema

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

Kleinanzeigen search/category URLs or individual listing URLs (/s-anzeige/). Paste any search results page from kleinanzeigen.de.

## `searchQueries` (type: `array`):

Optional keyword searches converted to Kleinanzeigen search URLs (e.g. "iphone", "fahrrad berlin"). Used when you don't have a direct URL.

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

Maximum number of listings to scrape (0 = unlimited)

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

Maximum search result pages to scrape per start URL (0 = up to site limit of 10 pages / ~250 listings). Kleinanzeigen caps unfiltered searches at 250 results.

## `fetchDetails` (type: `boolean`):

When enabled, visits each listing page for full description, images, attributes, and seller info. Disable for faster overview-only scraping.

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

Apify residential proxy in Germany (DE) recommended for Kleinanzeigen.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://www.kleinanzeigen.de/s-laptop/k0"
    }
  ],
  "searchQueries": [
    "laptop"
  ],
  "maxItems": 25,
  "maxPages": 0,
  "fetchDetails": true,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "DE"
  }
}
```

# Actor output Schema

## `dataset` (type: `string`):

No description

## `runStats` (type: `string`):

No description

## `input` (type: `string`):

No description

# API

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

## JavaScript example

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

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

// Prepare Actor input
const input = {
    "startUrls": [
        {
            "url": "https://www.kleinanzeigen.de/s-laptop/k0"
        }
    ],
    "searchQueries": [
        "laptop"
    ],
    "maxItems": 25,
    "fetchDetails": false,
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ],
        "apifyProxyCountry": "DE"
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("datascrapers/kleinanzeigen-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 = {
    "startUrls": [{ "url": "https://www.kleinanzeigen.de/s-laptop/k0" }],
    "searchQueries": ["laptop"],
    "maxItems": 25,
    "fetchDetails": False,
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
        "apifyProxyCountry": "DE",
    },
}

# Run the Actor and wait for it to finish
run = client.actor("datascrapers/kleinanzeigen-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 '{
  "startUrls": [
    {
      "url": "https://www.kleinanzeigen.de/s-laptop/k0"
    }
  ],
  "searchQueries": [
    "laptop"
  ],
  "maxItems": 25,
  "fetchDetails": false,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "DE"
  }
}' |
apify call datascrapers/kleinanzeigen-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,datascrapers/kleinanzeigen-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/Qkf8P7F3YDviiGmYM/builds/QncvbE3pJ419WD4CM/openapi.json
