{
  "openapi": "3.0.1",
  "info": {
    "title": "Kleinanzeigen Scraper",
    "description": "Scrape Kleinanzeigen.de listings by keyword, location, category or any search URL: title, price as a number, VB / Festpreis / zu verschenken, postcode and coordinates, posting date, full description, attributes, seller type and photos. Export JSON/CSV, use the API, schedule new-ads feeds.",
    "version": "0.1",
    "x-build-id": "dFXVvWgrKIxS4QQPv"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/lergassy~kleinanzeigen-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-lergassy-kleinanzeigen-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/lergassy~kleinanzeigen-scraper/runs": {
      "post": {
        "operationId": "runs-sync-lergassy-kleinanzeigen-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/lergassy~kleinanzeigen-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-lergassy-kleinanzeigen-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "searchQueries": {
            "title": "🔍 Search keywords",
            "type": "array",
            "description": "Give this or <code>startUrls</code>. One or more keywords, searched one after another on Kleinanzeigen — the same words you would type into the search box, e.g. <code>iphone 15</code>, <code>e-bike</code>, <code>2 zimmer wohnung</code>. Combine with <b>Location</b>, <b>Category</b>, price and seller filters below.",
            "items": {
              "type": "string"
            }
          },
          "location": {
            "title": "📍 Location",
            "type": "string",
            "description": "German city, district or 5-digit postcode the keyword searches are limited to, e.g. <code>Berlin</code>, <code>München</code>, <code>10115</code>. Leave empty to search all of Germany. Used with keywords or a category (start URLs already carry their own location)."
          },
          "radius": {
            "title": "Radius around the location (km)",
            "minimum": 0,
            "maximum": 200,
            "type": "integer",
            "description": "Also include listings up to this many kilometres around the location. Kleinanzeigen allows 5, 10, 20, 30, 50, 100, 150 or 200 km — other numbers are rounded to the nearest. Leave empty for the location itself."
          },
          "category": {
            "title": "Category",
            "type": "string",
            "description": "Limit the search to one Kleinanzeigen category: German name (<code>Fahrräder & Zubehör</code>, <code>Mietwohnungen</code>, <code>Autos</code>), a common English name (<code>bikes</code>, <code>apartments for rent</code>, <code>cars</code>, <code>phones</code>) or the numeric id from a category URL (<code>…/c216</code> → <code>216</code>). Works alone too: category + location lists everything in it."
          },
          "startUrls": {
            "title": "🔗 Kleinanzeigen URLs",
            "type": "array",
            "description": "Give this or <code>searchQueries</code>. Search, category or ad links copied from kleinanzeigen.de — every filter you set on the site (category, location, radius, price, condition, sorting) is kept, e.g. <code>https://www.kleinanzeigen.de/s-wohnung-mieten/berlin/c203l3331</code>. Ad links (<code>/s-anzeige/…</code>) return that one ad.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "minPrice": {
            "title": "Min price (€)",
            "minimum": 0,
            "type": "integer",
            "description": "Only listings priced at least this many euros. Applied by Kleinanzeigen itself and checked again on every row. Works with keywords and start URLs."
          },
          "maxPrice": {
            "title": "Max price (€)",
            "minimum": 0,
            "type": "integer",
            "description": "Only listings priced at most this many euros. Applied by Kleinanzeigen itself and checked again on every row."
          },
          "sellerType": {
            "title": "Seller type",
            "enum": [
              "any",
              "private",
              "commercial"
            ],
            "type": "string",
            "description": "<b>Private</b> = private individuals only (Privat), <b>Commercial</b> = dealers, agencies and shops only (Gewerblich), <b>Any</b> = both.",
            "default": "any"
          },
          "adType": {
            "title": "Ad type",
            "enum": [
              "offers",
              "wanted",
              "all"
            ],
            "type": "string",
            "description": "<b>Offers</b> (default) = items for sale or rent (Angebote). <b>Wanted</b> = people looking to buy (Gesuche, e.g. \"Suche iPhone\"). <b>All</b> = both. A start URL that already contains <code>anzeige:angebote</code> or <code>anzeige:gesuche</code> keeps its own choice.",
            "default": "offers"
          },
          "maxItems": {
            "title": "💯 Max listings per search",
            "minimum": 1,
            "maximum": 1250,
            "type": "integer",
            "description": "Maximum listings to return for each keyword or start URL. Kleinanzeigen itself shows at most 1,250 listings (50 pages) per search — split big searches by category, location or price to get more.",
            "default": 30
          },
          "includeDetails": {
            "title": "Open every ad page (description, attributes, seller, all photos)",
            "type": "boolean",
            "description": "On (default): each listing also gets the full description, all attributes (e.g. Wohnfläche, Kilometerstand, Zustand), features, seller name / type / member since / rating, all photos, coordinates and shipping info. Included in the price. Off: only what the result list shows (title, price, location, date, snippet, first photo) — about 3× faster.",
            "default": true
          },
          "onlyNewRowsStore": {
            "title": "🔁 Only new listings — memory name",
            "pattern": "^[A-Za-z0-9-]{0,63}$",
            "type": "string",
            "description": "Give this run a name — <code>my-berlin-flats</code> — and the Actor remembers every listing it delivered under that name. Every later run with the same name writes and charges <b>only listings you have not received before</b>. Schedule the Actor (e.g. hourly) to get a feed of new ads. Leave empty to get everything found, every time."
          },
          "maxConcurrency": {
            "title": "Parallel ad pages",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "How many ad pages are opened at the same time. The default is fast and polite; lower it if you see errors.",
            "default": 8
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Leave empty: the Actor connects directly and switches to German residential addresses by itself only for pages Kleinanzeigen refuses. Set a proxy here only if you must use your own."
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}