{
  "openapi": "3.0.1",
  "info": {
    "title": "Willhaben Scraper — Marktplatz, Autos, Immobilien & Jobs",
    "description": "Scrape willhaben.at, Austria's biggest marketplace: Marktplatz, Autos, Immobilien & Jobs. Search by keyword or willhaben URL, look up ads by ID, or monitor listings for new ads and price drop. No browser, 100 listings per request.",
    "version": "0.1",
    "x-build-id": "z3o7JKtHbiFPUYp4y"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/shluca~willhaben-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-shluca-willhaben-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/shluca~willhaben-scraper/runs": {
      "post": {
        "operationId": "runs-sync-shluca-willhaben-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/shluca~willhaben-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-shluca-willhaben-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": {
          "mode": {
            "title": "Mode",
            "enum": [
              "search",
              "ids",
              "monitor"
            ],
            "type": "string",
            "description": "search: run a willhaben search. ids: fetch specific ads by ID (max $0.03 per run at 30 ids). monitor: same search + diff against the previous run's state, emitting only new/priceDropped/priceIncreased/delisted rows (schedule this mode for deal alerts).",
            "default": "search"
          },
          "keyword": {
            "title": "Search keyword",
            "type": "string",
            "description": "Free-text search, e.g. \"iphone 15\" or \"wohnung wien 30 m2\". Used with vertical. Ignored when searchUrl is set. Example prefills: \"iphone 15\", \"fahrrad\", \"wohnung wien\"."
          },
          "vertical": {
            "title": "Section (vertical)",
            "enum": [
              "marktplatz",
              "immobilien",
              "fahrzeuge",
              "jobs"
            ],
            "type": "string",
            "description": "Site section: marktplatz (default), immobilien, fahrzeuge (used cars), jobs (web platform /jobs/suche — own data stack, runs on the web path).",
            "default": "marktplatz"
          },
          "searchUrl": {
            "title": "Search URL (overrides keyword)",
            "type": "string",
            "description": "Full willhaben.at search URL copied from the browser, e.g. https://www.willhaben.at/iad/kaufen-und-verkaufen/marktplatz?keyword=fahrrad&PRICE_FROM=100&isUrgentOffer=true — any filters encoded in the URL are honored. Must be a www.willhaben.at URL."
          },
          "adIds": {
            "title": "Ad IDs (for mode: ids)",
            "type": "array",
            "description": "willhaben ad IDs to fetch individually, e.g. [\"1257485200\", \"1960751783\"]. One request per ID, cap 30 IDs per run (max $0.03/run).",
            "items": {
              "type": "string"
            }
          },
          "maxItems": {
            "title": "Max rows",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Maximum rows to push (and charge). 30 rows = one search page, ≈ $0.026 per run at list price. Keep small for cheap agent calls.",
            "default": 30
          },
          "maxPages": {
            "title": "Max pages",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many search result pages to walk (30 rows per page). maxPages × 1 request each.",
            "default": 1
          },
          "changesOnly": {
            "title": "Monitor: emit only changes",
            "type": "boolean",
            "description": "Monitor mode: when true, unchanged ads are not emitted (new / priceDropped / priceIncreased / delisted only). When false, every current ad is emitted with its change label. A monitor run with zero changes exits cleanly with an empty result — schedule it and stay green.",
            "default": true
          },
          "priceMin": {
            "title": "Price min (EUR)",
            "minimum": 0,
            "type": "integer",
            "description": "Only listings with price >= this value."
          },
          "priceMax": {
            "title": "Price max (EUR)",
            "minimum": 0,
            "type": "integer",
            "description": "Only listings with price <= this value."
          },
          "sellerType": {
            "title": "Seller type",
            "enum": [
              "all",
              "private",
              "commercial"
            ],
            "type": "string",
            "description": "Filter by seller type.",
            "default": "all"
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "relevance",
              "newest",
              "priceAsc",
              "priceDesc"
            ],
            "type": "string",
            "description": "Result ordering (relevance = willhaben default).",
            "default": "relevance"
          },
          "category": {
            "title": "Category (numeric API id)",
            "minimum": 1,
            "maximum": 99999,
            "type": "integer",
            "description": "Willhaben numeric search id — switches to the API-only numeric form. Known: 3/2 Gebrauchtwagen (used cars), 2/131 Mietwohnung, 2/101 Eigentumswohnung, 5/303 Kaufen, 5/304 Zu verschenken. (Jobs ignore this — separate platform.)"
          },
          "includeSellerData": {
            "title": "Include seller data (GDPR opt-in)",
            "type": "boolean",
            "description": "OFF by default (GDPR-safe listings-only). ON: adds sellerName/orgName/address/coordinates/orgId + sellerType (private/commercial) from the public listing payload. You are responsible for having a lawful basis for processing personal data in your use case.",
            "default": false
          },
          "enrichSellerProfile": {
            "title": "Enrich seller profiles",
            "type": "boolean",
            "description": "Requires includeSellerData. Adds one API request per unique seller (max 20/run): sellerProfileName, sellerMemberSince, sellerActiveAds.",
            "default": false
          },
          "sellerContactFromDetails": {
            "title": "Fetch contacts from detail pages",
            "type": "boolean",
            "description": "Requires includeSellerData. In search/monitor modes, fetches up to 10 detail pages (1 request each) to extract public contact attributes (phone, website, contact person) from listings.",
            "default": false
          },
          "includeRawAttributes": {
            "title": "Include all raw attributes",
            "type": "boolean",
            "description": "Adds an `attributes` object per row with every listing attribute not mapped to a typed field (complete coverage; disable for lean output).",
            "default": true
          },
          "apiToken": {
            "title": "API token override",
            "type": "string",
            "description": "X-WH-Application-Token for the mobile-app search API. The built-in app-level token usually works — set this only if runs fail and fall back to the slower web path."
          },
          "visitorId": {
            "title": "Visitor ID override",
            "type": "string",
            "description": "X-WH-Visitor-Id for the mobile-app search API. Only needed together with an API token override."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}