# Kleinanzeigen Listings Extractor (`kawsar/kleinanzeigen-listings-extractor`) Actor

Scrape Kleinanzeigen search results into clean, structured data. Grab the title, price, location, image, and link from any category, follow pagination automatically, and export to Excel, CSV, or Google Sheets for price tracking and market research.

- **URL**: https://apify.com/kawsar/kleinanzeigen-listings-extractor.md
- **Developed by:** [Kawsar](https://apify.com/kawsar) (community)
- **Categories:** Automation, Developer tools, Other
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.99 / 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 Listings Extractor

Turn any Kleinanzeigen search into a clean, structured dataset. Paste a search or category URL and this scraper collects every ad on the results pages: title, price, location, description, photo, and a direct link to each listing. It follows pagination on its own, so you get page after page without clicking through.

Works for any category on kleinanzeigen.de, whether you are tracking iPhones, bikes, furniture, cars, or real estate. No coding required, and results export straight to Excel, CSV, JSON, or Google Sheets.

### Table of contents

- [Features](#features)
- [What you get per listing](#what-you-get-per-listing)
- [Input](#input)
- [How to use it](#how-to-use-it)
- [How to get a search URL](#how-to-get-a-search-url)
- [Example input](#example-input)
- [Example output](#example-output)
- [Use cases](#use-cases)
- [Tips and best practices](#tips-and-best-practices)
- [Pricing and performance](#pricing-and-performance)
- [FAQ](#faq)
- [Notes and limitations](#notes-and-limitations)

### Features

- Scrape any Kleinanzeigen search or category results URL
- Automatic pagination, so the actor walks page after page for you
- Batch mode: run many search URLs in a single run
- Limit control with `maxItems` and `maxPages` so you only pay for what you need
- Built-in deduplication by listing ID across pages
- Parses price into a numeric value and flags negotiable (VB) prices
- Splits the location line into postal code and city
- Detects offers vs wanted ads (`Gesuch`)
- Clean per-listing error handling, so one bad page never crashes the run
- Export to Excel, CSV, JSON, XML, or Google Sheets

### What you get per listing

| Field | Type | Description |
|-------|------|-------------|
| `listingId` | string | The ad's Kleinanzeigen ID |
| `url` | string | Direct link to the listing |
| `listingTitle` | string | Ad title |
| `price` | string | Price text as shown, for example `40 €` or `VB` |
| `priceValue` | number | Numeric price when available |
| `isNegotiable` | boolean | True when the price is marked VB (negotiable) |
| `shipping` | string | Shipping note when present |
| `location` | string | Location line as shown on the ad |
| `postalCode` | string | German postal code parsed from the location |
| `city` | string | City or area parsed from the location |
| `listingText` | string | Short description snippet |
| `postedDate` | string | When the ad was posted, as shown on the site |
| `imageUrl` | string | Thumbnail image URL |
| `tags` | array | Extra labels such as `Gesuch` (wanted) |
| `listingType` | string | `offer` or `wanted` |
| `sourceUrl` | string | The search URL the listing came from |
| `scrapedAt` | string | ISO timestamp of the run |

### Input

| Field | Key | Type | Default | Description |
|-------|-----|------|---------|-------------|
| Search URLs | `searchUrls` | array | (required) | One or more Kleinanzeigen search or category results URLs, one per line |
| Max pages per search | `maxPages` | integer | `20` | How many results pages to follow per search URL (max 100) |
| Max items | `maxItems` | integer | `25` | Maximum listings to collect per run (max 1000) |
| Request timeout (seconds) | `requestTimeoutSecs` | integer | `30` | Per-request timeout (5 to 120) |

Provide at least one URL in `searchUrls`. Add several to scrape multiple searches in one run; the combined result is capped at `maxItems`.

### How to use it

1. Open [kleinanzeigen.de](https://www.kleinanzeigen.de) and run your search with any filters, category, or location.
2. Copy the URL from your browser's address bar.
3. Paste it into the **Search URLs** field, one URL per line.
4. To scrape more than one search at once, add each results URL on its own line.
5. Optionally adjust **Max items** and **Max pages per search**.
6. Click **Start**.
7. When the run finishes, open the **Output** tab and export to Excel, CSV, JSON, or Google Sheets.

### How to get a search URL

Kleinanzeigen search URLs already carry the category, keyword, and location. A few examples:

- Keyword in a city: `https://www.kleinanzeigen.de/s-aachen/iphone/k0l1921`
- Whole category: `https://www.kleinanzeigen.de/s-fahrraeder/c217`
- Keyword nationwide: `https://www.kleinanzeigen.de/s-iphone/k0`

Apply any filters you want on the site first (price range, radius, condition, offer vs wanted). The actor scrapes exactly what that URL returns, so the filters carry over automatically.

### Example input

```json
{
    "searchUrls": [
        "https://www.kleinanzeigen.de/s-aachen/iphone/k0l1921"
    ],
    "maxItems": 25,
    "maxPages": 20,
    "requestTimeoutSecs": 30
}
```

Multiple searches in one run:

```json
{
    "searchUrls": [
        "https://www.kleinanzeigen.de/s-berlin/fahrrad/k0l3331",
        "https://www.kleinanzeigen.de/s-muenchen/sofa/k0l6411"
    ],
    "maxItems": 200,
    "maxPages": 10
}
```

### Example output

```json
{
    "listingId": "3489517709",
    "url": "https://www.kleinanzeigen.de/s-anzeige/pitaka-magez-case-pro-4-fuer-iphone-16-pro-max/3489517709-173-1931",
    "listingTitle": "Pitaka MagEZ Case Pro 4 für iPhone 16 Pro Max",
    "price": "40 €",
    "priceValue": 40,
    "isNegotiable": false,
    "shipping": null,
    "location": "52080 Eilendorf",
    "postalCode": "52080",
    "city": "Eilendorf",
    "listingText": "Ich verkaufe hier eine hochwertige Schutzhülle von Pitaka...",
    "postedDate": "Heute, 10:37",
    "imageUrl": "https://img.kleinanzeigen.de/api/v1/prod-ads/images/45/45219975-4e13-40a9-ab66-b2758a711081?rule=$_2.AUTO",
    "tags": [],
    "listingType": "offer",
    "sourceUrl": "https://www.kleinanzeigen.de/s-aachen/iphone/k0l1921",
    "scrapedAt": "2026-08-20T09:04:01.734425+00:00"
}
```

### Use cases

- **Price monitoring:** Track how prices for a product or category move over time in a region.
- **Resale sourcing:** Find underpriced items and negotiable (VB) ads to flip.
- **Lead generation:** Build lists of sellers in a category or city.
- **Market research:** Measure supply, price ranges, and demand across regions.
- **Competitor tracking:** Watch what other sellers list and how they price.
- **SEO and keyword research:** Study real listing titles and demand signals on a live marketplace.

### Tips and best practices

- Narrow your search on the site first. A tighter URL means fewer pages and lower cost.
- Use `maxItems` to keep runs small while testing, then raise it once the output looks right.
- For a full category sweep, raise `maxPages`; the actor stops early when a search runs out of results.
- Run several city or category URLs together in batch mode to compare regions in one dataset.
- Schedule the actor to run daily or weekly to build a price history over time.

### Pricing and performance

The actor runs on the Apify platform and bills for the compute it uses. Cost scales with how many pages you scrape, which is driven by `maxItems` and `maxPages`. Each results page holds roughly 25 listings, so collecting 100 listings usually means about four page requests. Keep limits low for quick, cheap runs and raise them for full sweeps.

### FAQ

**Do I need an account or login?**
No. The actor reads public search result pages only.

**Can I scrape a single listing's full detail page?**
This actor extracts everything shown on the search results pages, which already includes title, price, location, description snippet, image, and the link to each ad. Follow the `url` field if you want to open the full listing.

**What formats can I export to?**
Excel, CSV, JSON, XML, and Google Sheets, through the Apify dataset export.

**Why are prices and dates in German?**
Values are returned exactly as shown on kleinanzeigen.de, including German number and date formatting. The numeric `priceValue` field gives you a clean integer to sort and filter on.

**Can I run it on a schedule?**
Yes. Use Apify Schedules to run it automatically and grow a historical dataset.

### Notes and limitations

- The actor reads public search result pages. It does not log in or access private data.
- Prices, dates, and descriptions are returned as shown on the site, in German formatting.
- The results page provides a single thumbnail per listing; full image galleries live on the individual ad page.
- Site layout changes on kleinanzeigen.de can affect extraction; the actor is updated as needed.

# Actor input Schema

## `searchUrls` (type: `array`):

Kleinanzeigen search or category results URLs. Open kleinanzeigen.de, run your search with any filters or location, copy the address from your browser, and add one URL per line. You can add as many as you like.

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

How many results pages to follow for each search URL.

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

Maximum number of listings to collect per run.

## `requestTimeoutSecs` (type: `integer`):

Per-request timeout in seconds.

## Actor input object example

```json
{
  "searchUrls": [
    "https://www.kleinanzeigen.de/s-aachen/iphone/k0l1921"
  ],
  "maxPages": 20,
  "maxItems": 25,
  "requestTimeoutSecs": 30
}
```

# Actor output Schema

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

Kleinanzeigen listings extracted from your search URLs, with title, price, location, image, and link for each ad.

# 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 = {
    "searchUrls": [
        "https://www.kleinanzeigen.de/s-aachen/iphone/k0l1921"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("kawsar/kleinanzeigen-listings-extractor").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 = { "searchUrls": ["https://www.kleinanzeigen.de/s-aachen/iphone/k0l1921"] }

# Run the Actor and wait for it to finish
run = client.actor("kawsar/kleinanzeigen-listings-extractor").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 '{
  "searchUrls": [
    "https://www.kleinanzeigen.de/s-aachen/iphone/k0l1921"
  ]
}' |
apify call kawsar/kleinanzeigen-listings-extractor --silent --output-dataset

```

## MCP server setup

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

```

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/6a31Ipw752LkQHnu3/builds/I5UPjPlKKqzmNHwqc/openapi.json
