{
  "openapi": "3.0.1",
  "info": {
    "title": "Kleinanzeigen Classifieds Scraper",
    "description": "Scrape ads from Kleinanzeigen (kleinanzeigen.de, formerly eBay Kleinanzeigen): title, price, location, coordinates, photos, attributes, features and seller. Search pages, keywords or single ads. Export JSON, CSV or Excel.",
    "version": "1.0",
    "x-build-id": "F299AV4UEWmlcFxU0"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/confidential_gnat~kleinanzeigen-listings-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-confidential_gnat-kleinanzeigen-listings-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/confidential_gnat~kleinanzeigen-listings-scraper/runs": {
      "post": {
        "operationId": "runs-sync-confidential_gnat-kleinanzeigen-listings-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/confidential_gnat~kleinanzeigen-listings-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-confidential_gnat-kleinanzeigen-listings-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": {
          "startUrls": {
            "title": "Kleinanzeigen URLs",
            "type": "array",
            "description": "Search pages (a category, a keyword or a location) and single ad pages. Set the category, place and keyword on kleinanzeigen.de, then paste the address. Examples: https://www.kleinanzeigen.de/s-wohnung-mieten/berlin/c203l3331 or https://www.kleinanzeigen.de/s-autos/c216",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "maxItems": {
            "title": "Max ads per search or URL",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum ads saved for each start URL. The site shows at most 1,250 ads per search; for more, the search is split into price ranges automatically.",
            "default": 5
          },
          "cacheProjectName": {
            "title": "Cache project name",
            "type": "string",
            "description": "Use the same name on each scheduled run to get only new ads. Ads already saved under that name are skipped, not charged and not counted towards Max ads per search. Each record gets changeType: new. Leave empty to turn the cache off."
          },
          "searchQuery": {
            "title": "Search keyword (optional)",
            "type": "string",
            "description": "Search for a keyword, for example gebrauchtes fahrrad. Combine with Place, Category and the filters below, or leave empty to use only the URLs."
          },
          "location": {
            "title": "Place (city, district or postal code)",
            "type": "string",
            "description": "Search in this place, for example Hamburg or 80331. Used together with Search keyword or Category. Leave empty for all of Germany."
          },
          "categoryId": {
            "title": "Category ID",
            "type": "integer",
            "description": "Search one category. Common IDs: 195 Real estate, 203 Apartments for rent, 216 Cars, 210 Auto, bike & boat, 217 Bikes & accessories, 80 Home & garden, 161 Electronics, 153 Fashion & beauty, 102 Jobs, 17 Family, kids & baby, 130 Pets, 185 Leisure & hobby, 73 Music, movies & books, 231 Tickets, 297 Services, 272 Free & swap, 235 Lessons & courses. The ID is the number after c in a category URL."
          },
          "radius": {
            "title": "Radius around the place (km)",
            "enum": [
              "",
              "5",
              "10",
              "20",
              "30",
              "50",
              "100",
              "150",
              "200"
            ],
            "type": "string",
            "description": "Also include ads around the place. Works only with Place or a URL that has a place.",
            "default": ""
          },
          "sellerType": {
            "title": "Seller type",
            "enum": [
              "any",
              "private",
              "commercial"
            ],
            "type": "string",
            "description": "Only private sellers, only commercial sellers, or both.",
            "default": "any"
          },
          "adType": {
            "title": "Ad type",
            "enum": [
              "any",
              "offered",
              "wanted"
            ],
            "type": "string",
            "description": "Ads that offer something, ads that look for something (wanted), or both.",
            "default": "any"
          },
          "minPrice": {
            "title": "Minimum price (€)",
            "minimum": 0,
            "type": "integer",
            "description": "Only ads priced at or above this amount. Applied to every search page."
          },
          "maxPrice": {
            "title": "Maximum price (€)",
            "minimum": 0,
            "type": "integer",
            "description": "Only ads priced at or below this amount. Applied to every search page."
          },
          "scrapeDetails": {
            "title": "Open each ad (full details)",
            "type": "boolean",
            "description": "On: every ad page is opened for the full description, all photos, coordinates, street, attributes (mileage, rooms, condition…), features, publication date and seller. Off: fast records from the search results only (title, short description, price, place, size and rooms, one photo).",
            "default": true
          },
          "includeExtras": {
            "title": "Add view count and seller rating",
            "type": "boolean",
            "description": "With Open each ad: also read how often the ad was viewed and the seller's average rating and number of reviews. Costs a little extra time per ad.",
            "default": true
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional. Kleinanzeigen works with the default connection, so leaving Apify Proxy off keeps runs cheapest. Turn it on only if you want to use your own proxy IPs.",
            "default": {
              "useApifyProxy": false
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}