# markt.de API scraper — search Germany's general classifieds (markt.de): ads with price, photos, location and category, full ad detail with the seller's own attribute table, the live category tree with result counts, and German place autocomplete. No account needed; every filter is verified against markt.de's own echo before results are returned; seller contact data is never collected.

> Search markt.de classifieds by keyword and/or category, restricted by place + radius, price range, ad type (private / commercial / wanted), price type (fixed / negotiable / free / swap) and sort order. Returns the ads on one page with markt.de's true total. Every filter is confirmed against markt.de's own canonical URL first: a place or category markt.de does not know is REFUSED instead of being silently dropped (which would return the whole catalogue). A search with no matches returns zero rows and ok:true — that is an answer; one with fewer than 20 matches returns exactly those, never markt.de's unrelated fill-up ads.
> ReefAPI engine `marktde` · 4 endpoints · clean JSON, no scraping or browsers to manage.

## How to call
- **Endpoint:** `POST https://api.reefapi.com/marktde/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 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). Clients that add connectors by URL, such as ChatGPT and the Claude app, connect with OAuth 2.1 (the user pastes their key once on a ReefAPI page; discovery at `/.well-known/oauth-protected-resource/mcp`). Config files send the key as `Authorization: Bearer <key>`. `?key=<key>` in the URL also works as a last-resort fallback.

## Endpoints

### POST https://api.reefapi.com/marktde/v1/search — 1 credit
Search markt.de classifieds by keyword and/or category, restricted by place + radius, price range, ad type (private / commercial / wanted), price type (fixed / negotiable / free / swap) and sort order. Returns the ads on one page with markt.de's true total. Every filter is confirmed against markt.de's own canonical URL first: a place or category markt.de does not know is REFUSED instead of being silently dropped (which would return the whole catalogue). A search with no matches returns zero rows and ok:true — that is an answer; one with fewer than 20 matches returns exactly those, never markt.de's unrelated fill-up ads.

**Parameters:**
- `query` (string, optional) — Free-text keyword, e.g. a product, model or job title. search needs query OR category (or both).
- `category` (string, optional) — markt.de category id, from the categories action (e.g. 2000000000 = Fahrzeuge, 2200000000 = Haus & Garten, 2220110000 = Tische). An id markt.de does not know is rejected, not silently ignored.
- `location` (string, optional) — German place name exactly as markt.de spells it — city, district, Landkreis or Bundesland (use the locations action to resolve free text). A place markt.de does not know is rejected, not ignored.
- `radius` (integer, optional) — Search radius in km around location (requires location). 0 = the place itself.
- `price_min` (number, optional) — Lowest price in EUR.
- `price_max` (number, optional) — Highest price in EUR.
- `ad_type` (enum, optional) — Who placed the ad / what kind of ad it is. [one of: private, commercial, wanted]
- `price_type` (enum, optional) — How the price is meant — markt.de's own Preistyp. [one of: fixed, negotiable, best_offer, free, swap, hourly]
- `sort` (enum, optional, default "newest") — Result order. [one of: newest, price_asc, price_desc]
- `page` (integer, optional, default 1) — 1-based result page; 20 ads per page.

**Returns:** listings[] — {id, url, title, description, price{amount_eur, currency, formatted, label, negotiable}, location{postal_code, city}, posted, category, image_url, image_count, seller{member_tier, online}, promoted} plus total, page, has_more, next_page, filters_applied, canonical_url

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

### POST https://api.reefapi.com/marktde/v1/detail — 1 credit
One markt.de ad in full, by ad id or ad URL: title, price (with markt.de's own machine price as a cross-check), full description, the seller's attribute table (e.g. Hersteller / Farbe / Zimmer), category breadcrumb, place, posting time and every photo. A removed or unknown ad returns NOT_FOUND.

**Parameters:**
- `id` (string, optional) — The 8-character ad id — the /a/<id>/ part of an ad URL, and the `id` of every search result. detail needs id OR url.
- `url` (string, optional) — Full markt.de ad URL.

**Returns:** listing{} — id, url, title, price{amount_eur, formatted, label, machine_eur}, description, location, posted, category_path[], attributes{}, images[], seller{member_tier, member_since, online}

**Example request body:**
```json
{
  "url": "https://www.markt.de/mifa-klappfahrrad/a/62f2411d/"
}
```

### POST https://api.reefapi.com/marktde/v1/categories — 1 credit
markt.de's category tree one level at a time, WITH a live ad count per child — so you can pick a `category` id for search and see how many ads it holds. Called with no parent it returns the ten top-level categories; with a parent id it returns that category's children; with a query it returns how the matches for that keyword split across categories.

**Parameters:**
- `parent` (string, optional) — Category id whose children to list (from a previous categories call). Omit for the top level.
- `query` (string, optional) — Optional keyword — the counts then describe how that keyword's matches are distributed over the categories.

**Returns:** categories[] — {id, name, ad_count} plus parent and total

**Example request body:**
```json
{
  "parent": "2200000000"
}
```

### POST https://api.reefapi.com/marktde/v1/locations — 1 credit
German place autocomplete straight from markt.de: free text in, markt.de's own spellings out (cities, districts, Landkreise, Bundesländer). Feed a returned name to search's `location` — search only accepts places markt.de knows.

**Parameters:**
- `query` (string, required) — Partial or full place name.

**Returns:** locations[] — {name} in markt.de's ranking order, plus query

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

## At scale
- **Volume:** 5M+ requests a day, measured at 60 requests a second across the fleet with no
  central bottleneck. Per-key limits are raised for high-volume accounts; volume pricing on request.
- **Missing a source:** tell us a site we do not cover and it becomes an engine. A customer asked
  for bestprice.gr on 21 Sep 2026 and it was in the catalog on 22 Sep.
- **Support:** 2 minute median time from a question in the live chat to the first answer. Setup
  help included, no support tier to buy.
- **One key, one credit pool** across every API. No per-site plans, no separate subscriptions.

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