# Kleinanzeigen API scraper — search Germany's #1 classifieds (kleinanzeigen.de): listings with prices, photos & attributes, full listing detail, similar ads, category tree, live filter facets, location autocomplete, seller profiles & inventory. Bare datacenter, no account, German locale, seller PII redacted.

> Search Kleinanzeigen classifieds by keyword and/or category with price, location + radius, seller-type and sort filters. Returns normalized listings (title, price, photos, location, seller type) with the true total. Page pagination.
> ReefAPI engine `kleinanzeigen` · 8 endpoints · clean JSON, no scraping or browsers to manage.

## How to call
- **Endpoint:** `POST https://api.reefapi.com/kleinanzeigen/v1/<action>` with a JSON body.
- **Auth:** header `x-api-key: <YOUR_REEFAPI_KEY>` — create one free (1,000 credits, no card): https://reefapi.com/signup
- **Response (every call):** `{ ok: boolean, data: ..., meta: { record_count, credits, ... }, error: { code, message } }` — branch on `ok`. Failed or blocked calls are free.
- **One key + one shared credit pool** across every ReefAPI API. Per-call credits are listed on each endpoint below.
- **Use it from an AI agent (MCP):** connect `https://api.reefapi.com/mcp` (remote streamable-http, `Authorization: Bearer <key>`) and your assistant can call these actions directly.

## Endpoints

### POST /kleinanzeigen/v1/search — 1 credit
Search Kleinanzeigen classifieds by keyword and/or category with price, location + radius, seller-type and sort filters. Returns normalized listings (title, price, photos, location, seller type) with the true total. Page pagination.

**Parameters:**
- `query` (string, optional) — Free-text keyword. (search needs query OR category_id/category_slug.)
- `category_id` (integer, optional) — Numeric category id (the c<NNN> in a category URL; discover via the categories action).
- `category_slug` (string, optional) — Category slug for sorted/HTML browse, e.g. handy-telefon (from a category URL s-<slug>).
- `location_id` (integer, optional) — Location id from the location_suggestions action (enables radius search).
- `radius` (integer, optional) — Search radius in km around location_id (e.g. 10, 20, 50).
- `location` (string, optional) — City/postal code for sorted (HTML) search; for radius search use location_id instead.
- `price_min` (integer, optional) — Minimum price in EUR (whole euros).
- `price_max` (integer, optional) — Maximum price in EUR.
- `seller_type` (enum, optional) — Filter by seller type. privat = private, gewerblich = commercial dealer. [one of: privat, gewerblich]
- `sort` (enum, optional) — Result ordering. 'newest' = most recently posted first; omit for Kleinanzeigen's default relevance ordering. [one of: newest]
- `page` (integer, optional, default 1) — Result page (1-based). Page forward with meta.next_page.

**Returns:** listings[] (adid, title, price, location, images, seller_type, posted_date), total, page, has_more, next_page

**Example request body:**
```json
{
  "query": "iphone"
}
```

### POST /kleinanzeigen/v1/listing — 1 credit
Full listing detail by url, slug or adid: title, price, description, all photos, attributes (e.g. car specs), category breadcrumb, seller id & badges, posted date.

**Parameters:**
- `url` (string, optional) — Full Kleinanzeigen listing URL. (listing needs url OR slug OR adid.)
- `slug` (string, optional) — Listing slug/path (the s-anzeige/... part).
- `adid` (integer, optional) — Numeric ad id (from a search result's adid).

**Returns:** listing{} — title, price, description, images, attributes, breadcrumb, seller_id, seller_badges, posted_date

### POST /kleinanzeigen/v1/similar — 1 credit
Related/similar listings shown on an ad's detail page ("Das könnte dich auch interessieren") — by url, slug or adid.

**Parameters:**
- `url` (string, optional) — Full listing URL. (similar needs url OR slug OR adid.)
- `slug` (string, optional) — Listing slug/path.
- `adid` (integer, optional) — Numeric ad id of the source listing.

**Returns:** listings[] — related ads (adid, title, price, location, image)

### POST /kleinanzeigen/v1/categories — 1 credit
Full Kleinanzeigen category tree (id, name, nested children) for discovering category_id values to use in search.

**Parameters:** none

**Returns:** categories[] — nested {id, name, children[]}

### POST /kleinanzeigen/v1/filters — 1 credit
Live filter facets for a query/category from the search filter tree: category, location (state) and attribute facets, each with a result count — so you know which filter values are available and how many listings match.

**Parameters:**
- `query` (string, optional) — Keyword to scope facets to (filters needs query OR category_id).
- `category_id` (integer, optional) — Category id to scope facets to.

**Returns:** category_facets[], location_facets[], attribute_facets[] (each {name, count, url/value}), total

**Example request body:**
```json
{
  "query": "iphone"
}
```

### POST /kleinanzeigen/v1/location_suggestions — 1 credit
Autocomplete location names + ids for a partial query — use the returned location_id with search's location_id + radius.

**Parameters:**
- `query` (string, required) — Partial location text to autocomplete (e.g. Munc).

**Returns:** suggestions[] — {location_id, name}

**Example request body:**
```json
{
  "query": "Berlin"
}
```

### POST /kleinanzeigen/v1/user_listings — 1 credit
All active listings for a seller (by user/seller id), with page pagination.

**Parameters:**
- `user_id` (integer, required) — Seller user/seller id (a listing's seller_id).
- `page` (integer, optional, default 1) — Result page (1-based). Page forward with meta.next_page.

**Returns:** listings[] for this seller, user_id, page, has_more, next_page

### POST /kleinanzeigen/v1/seller — 1 credit
Public seller profile by user/seller id: display name (redacted by default), member since, reputation badges, rating count, and listing count.

**Parameters:**
- `user_id` (integer, required) — Seller user/seller id.

**Returns:** seller{} — seller_id, name (redacted), active_since, badges, rating_count, listing_count

## More
- Try it live, no code: https://reefapi.com/playground?engine=kleinanzeigen
- Human docs page: https://reefapi.com/docs/kleinanzeigen
- Every ReefAPI API in one file (for your AI): https://reefapi.com/llms-full.txt
