# Kleinanzeigen Classifieds Listing & Attribute Scraper (`crawlyth-forge/kleinanzeigen-classifieds-listing-and-attribute`) Actor

Scrape Kleinanzeigen.de classified ads from a search URL or direct listing links: price, price type, location, seller type, posting date, images and category-specific attributes, filterable by price range and seller type.

- **URL**: https://apify.com/crawlyth-forge/kleinanzeigen-classifieds-listing-and-attribute.md
- **Developed by:** [crawlyth forge](https://apify.com/crawlyth-forge) (community)
- **Categories:** E-commerce, Lead generation, Automation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.49 / 1,000 results

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/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

## Kleinanzeigen Classifieds Listing & Attribute Scraper

Kleinanzeigen.de is Germany's busiest classifieds marketplace. This actor turns its public search results and ad pages into structured records: price, price type, location, category, seller, dates, photos, shipping and the category-specific attributes shown on each ad. It works without cookies, accounts or a proxy.

### Three ways to start

- **Keyword search** — type a query such as `BMW E61`, optionally add a category, city/postal code and radius, then let the actor build the search.
- **Search URLs** — paste any Kleinanzeigen search or filtered category URL. The actor keeps the URL's own filters, adds yours and walks the pages.
- **Direct ad URLs** — give individual listings when you already know exactly which ads you need.

All three can be combined in one run. Results are deduplicated by listing id.

### Filters and pagination

- Minimum and maximum price are sent to Kleinanzeigen and checked again on every record.
- Seller type: private, commercial or both.
- Ad type: offers, wanted ads or both.
- Sort: recommended, newest, lowest price, highest price.
- Shipping (possible or pickup), buy-now listings and photo-only ads.
- Location plus a 0–200 km radius for keyword searches.
- `maxPages` limits how many result pages each search walks; `maxItems` caps the whole run. A run stops at the source's last page even when `maxPages` is higher.

The actor follows Kleinanzeigen's own page count, so a 25-result page followed by an empty page ends cleanly instead of retrying forever.

### What each record contains

- `listingId`, `listingUrl`, `title`
- `descriptionPreview` from the result card and `description` from the ad page
- `price`, `priceText`, `priceCurrency`, `priceType` (`FIXED`, `NEGOTIABLE`, `FREE`, `ON_REQUEST`), `isNegotiable`, `isFree`
- `postalCode`, `city`, `region`, `locationText`
- `category`, `categoryPath`, `categoryId`
- `sellerId`, `sellerName`, `sellerType`, `sellerProfileUrl`, `sellerMemberSince`
- `images`, `thumbnailUrl`, `imageCount`
- `datePosted`, `datePostedISO`, `lastModified`, `scrapedAt`
- `attributes` — the ad's structured details, such as mileage, first registration, fuel, rooms, condition or brand
- `isActive`, `isTopAd`, `viewCount`, `shippingAvailable`, `shippingCost`
- `adType`, `tags`, `searchUrl`, `searchTotalResults`, `page`, `position`

A field the source does not show for a particular ad is omitted instead of being returned as `null` or an empty value.

### Input reference

| Input | Type | Default | Purpose |
|---|---|---|---|
| `searchUrls` | array | – | Kleinanzeigen search or category URLs |
| `searchKeywords` | string | – | Keyword search, e.g. `iPhone 15 Pro` |
| `category` | select | all | Top-level category for a keyword search |
| `location` | string | – | City, district or German postal code |
| `radiusKm` | select | 0 | Search radius around the location |
| `listingUrls` | array | – | Individual ad URLs |
| `minPrice` / `maxPrice` | integer | – | Price range in EUR |
| `sellerType` | select | all | `private`, `commercial` or both |
| `adType` | select | all | `offer`, `want` or both |
| `sortBy` | select | site default | Result ordering |
| `shipping` | select | all | Shipping possible, pickup only or both |
| `buyNowOnly` | boolean | false | Only buy-now listings |
| `photosOnly` | boolean | false | Only ads with a photo |
| `maxItems` | integer | 100 | Listing cap for the whole run |
| `maxPages` | integer | 10 | Pages per search URL |
| `scrapeDetails` | boolean | true | Open each ad for description, images, seller and attributes |

Old task inputs keep working: `maxListings` is read as `maxItems`, and older keys such as `keywords`, `query`, `categoryId`, `locationStr`, `sortingField`, `rateLimitDelay`, `maxRetries` and `requestTimeout` are mapped in code. `proxyConfiguration` is no longer required and is ignored.

### Examples

Search German cars for a keyword and a price band:

```json
{
  "searchKeywords": "BMW E61",
  "category": "216",
  "minPrice": 2000,
  "maxPrice": 15000,
  "sellerType": "private",
  "sortBy": "priceAsc",
  "maxItems": 200,
  "scrapeDetails": true
}
```

Crawl a saved search URL and keep the cards only:

```json
{
  "searchUrls": ["https://www.kleinanzeigen.de/s-autos/k0c216"],
  "maxItems": 100,
  "maxPages": 4,
  "scrapeDetails": false
}
```

Fetch specific ads:

```json
{
  "listingUrls": [
    "https://www.kleinanzeigen.de/s-anzeige/audi-80-tuev-technisch-top-wenige-kilometer-oldtimer/3572927701-216-7402"
  ]
}
```

### How the connection works

The actor requests Kleinanzeigen's public pages over plain HTTP with browser headers. If the site answers with its temporary IP block, the actor switches to the public Google Translate rendered mirror of the same page, which serves the same server-rendered HTML. No login, cookie, API key or user proxy is needed, and no third-party paid proxy is used.

Search cards are parsed from the current result-page markup, with a fallback for the older card layout. Ad pages are parsed for the description, image set, breadcrumb, seller block and attribute table. Category-specific attributes come straight from the ad's detail list, so vehicles, property, jobs, electronics and fashion each keep their own fields.

### FAQ

**Do I need a Kleinanzeigen account?** No. The actor only reads public pages.

**Why does a record sometimes have no price?** Jobs, services and some wanted ads publish no fixed price. The card may also omit the price entirely; in that case the field is left out.

**Why is `attributes` empty for some categories?** Kleinanzeigen only publishes a structured detail list where the category defines one. A fashion ad often has fewer attributes than a car ad.

**Can I exceed 1,000 results?** `maxItems` allows up to 1,000 per run. Kleinanzeigen itself stops paginating at a finite result depth, so very broad searches should be split by category, price band or location.

**Does `scrapeDetails: false` lose data?** Yes, intentionally. Card-only runs are faster and cheaper but cannot fill the full description, complete image set, seller profile or detail attributes.

**Are images rehosted?** No. Image URLs point at Kleinanzeigen's public image host and are checked to load directly without a Referer.

**Is this affiliated with Kleinanzeigen?** No. It is an independent third-party tool that reads publicly visible pages.

### Limitations

- Kleinanzeigen may temporarily block an IP range; the mirror fallback handles that case, but a very large detail-heavy run can be slower while the mirror paces requests.
- Expired or removed ads are skipped when their detail page no longer exists.
- The public pages do not expose seller phone numbers, email addresses or coordinates; those fields are not invented.
- Result pages are finite. Partition broad searches with category, location or price filters to reach deeper inventory.

# Actor input Schema

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

Kleinanzeigen search-result URLs. Paste any search, category or filtered search from the site. The actor adds its own filters and walks the pages.

## `searchKeywords` (type: `string`):

Search Kleinanzeigen by keyword, for example "BMW E61" or "iPhone 15 Pro". Combine with category, location and the filters below.

## `category` (type: `string`):

Restrict a keyword search to one top-level Kleinanzeigen category.

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

City, district or German postal code for a keyword search, for example "Berlin" or "10115".

## `radiusKm` (type: `string`):

Search radius around the location. Only used when a location is set.

## `listingUrls` (type: `array`):

Full Kleinanzeigen ad URLs to fetch individually without a search. Expired or removed ads are skipped.

## `minPrice` (type: `integer`):

Only return listings at or above this price. Applied on Kleinanzeigen and again on the returned records.

## `maxPrice` (type: `integer`):

Only return listings at or below this price.

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

Show only private sellers, only commercial sellers, or both.

## `adType` (type: `string`):

Show only sale offers, only wanted ads, or both.

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

Order used by Kleinanzeigen for the search results.

## `shipping` (type: `string`):

Show only ads that can be shipped, only local pickup, or both.

## `buyNowOnly` (type: `boolean`):

Keep only ads that can be bought directly through Kleinanzeigen.

## `photosOnly` (type: `boolean`):

Skip ads without a photo.

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

Stop after this many listings across all searches and direct URLs.

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

Search-result pages to walk per search URL. Each page holds about 25 listings.

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

Open every ad page for the full description, all images, seller details and category-specific attributes. Turn off for a faster, card-only export.

## Actor input object example

```json
{
  "searchUrls": [
    "https://www.kleinanzeigen.de/s-autos/k0c216",
    "https://www.kleinanzeigen.de/s-berlin/autos/k0l3331c216"
  ],
  "category": "",
  "radiusKm": "0",
  "listingUrls": [
    "https://www.kleinanzeigen.de/s-anzeige/audi-80-tuev-technisch-top-wenige-kilometer-oldtimer/3572927701-216-7402"
  ],
  "sellerType": "",
  "adType": "",
  "sortBy": "",
  "shipping": "",
  "buyNowOnly": false,
  "photosOnly": false,
  "maxItems": 3,
  "maxPages": 1,
  "scrapeDetails": false
}
```

# Actor output Schema

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

Dataset containing all scraped Kleinanzeigen listings.

# 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-autos/k0c216"
    ],
    "buyNowOnly": false,
    "photosOnly": false,
    "maxItems": 3,
    "maxPages": 1,
    "scrapeDetails": false
};

// Run the Actor and wait for it to finish
const run = await client.actor("crawlyth-forge/kleinanzeigen-classifieds-listing-and-attribute").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-autos/k0c216"],
    "buyNowOnly": False,
    "photosOnly": False,
    "maxItems": 3,
    "maxPages": 1,
    "scrapeDetails": False,
}

# Run the Actor and wait for it to finish
run = client.actor("crawlyth-forge/kleinanzeigen-classifieds-listing-and-attribute").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-autos/k0c216"
  ],
  "buyNowOnly": false,
  "photosOnly": false,
  "maxItems": 3,
  "maxPages": 1,
  "scrapeDetails": false
}' |
apify call crawlyth-forge/kleinanzeigen-classifieds-listing-and-attribute --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,crawlyth-forge/kleinanzeigen-classifieds-listing-and-attribute"
        }
    }
}
```

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/mPIcf7QOTBFABzaJj/builds/hlpRvoshQQcZ5zI18/openapi.json
