{
  "openapi": "3.0.1",
  "info": {
    "title": "WG-Gesucht Scraper — Germany Flatshare & Rental Data",
    "description": "WG-Gesucht scraper & real estate data API for wg-gesucht.de. German flatshare rooms (WG-Zimmer), 1-room flats, apartments & houses: rent, deposit, size, WG details, district, GPS, photos — clean JSON/CSV. Fast overview or full detail. No-code, no API key needed.",
    "version": "1.0",
    "x-build-id": "YIrtYzMadH9HIrV1A"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/sian.agency~wg-gesucht-property-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-sian.agency-wg-gesucht-property-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/sian.agency~wg-gesucht-property-scraper/runs": {
      "post": {
        "operationId": "runs-sync-sian.agency-wg-gesucht-property-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/sian.agency~wg-gesucht-property-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-sian.agency-wg-gesucht-property-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": {
          "scrapeMode": {
            "title": "🧭 Scrape mode",
            "enum": [
              "overview",
              "detail"
            ],
            "type": "string",
            "description": "⚡ **Choose the depth of data per listing.**\n\n- **overview** — fast card-level scrape from the search result list (id, title, rent, WG size, area, district, available-from, thumbnail). Cheapest, highest volume.\n- **detail** — opens every listing's full page for richer fields (deposit, total rent, GPS coordinates, floor, features, full description, exact address).\n\n💡 **TIP:** Start with overview to size a city, then switch to detail for the listings you care about.",
            "default": "overview"
          },
          "searchMode": {
            "title": "🎯 Search mode",
            "enum": [
              "byCity",
              "bySearchUrl",
              "byListingUrl"
            ],
            "type": "string",
            "description": "🔍 **How to tell the scraper which listings to fetch.**\n\n- **byCity** — give one or more German city names + a category.\n- **bySearchUrl** — paste a wg-gesucht.de search URL (all your filters preserved).\n- **byListingUrl** — give specific listing URLs or IDs (detail mode only).",
            "default": "byCity"
          },
          "cities": {
            "title": "📍 Cities",
            "uniqueItems": true,
            "type": "array",
            "description": "📍 **CITY SEARCH:** German city names to scrape, e.g. `Berlin`, `München`, `Hamburg`, `Köln`, `Frankfurt`.\n\n💡 **TIP:** Add several cities to compare markets in one run.\n\n⚠️ For a city outside this common set, use **By search URL** mode and paste a wg-gesucht.de search link instead.\n\nUsed when **Search mode = byCity**.",
            "items": {
              "type": "string"
            }
          },
          "category": {
            "title": "🏘️ Category",
            "enum": [
              "wg-zimmer",
              "1-zimmer-wohnungen",
              "wohnungen",
              "haeuser"
            ],
            "type": "string",
            "description": "🏘️ **What kind of listing to search.**\n\n- **wg-zimmer** — flatshare rooms (WG-Zimmer) — the classic wg-gesucht use case.\n- **1-zimmer-wohnungen** — 1-room flats.\n- **wohnungen** — apartments.\n- **haeuser** — houses.\n\nUsed with **byCity** search. (WG rooms have no bedroom/bathroom/energy fields — that is normal for shared rooms.)",
            "default": "wg-zimmer"
          },
          "searchUrls": {
            "title": "🔗 Search URLs",
            "uniqueItems": true,
            "type": "array",
            "description": "🔗 **SEARCH-URL MODE:** Paste wg-gesucht.de search URLs — every filter you set on the site (rent band, size, short/long term, photos-only, virtual tour, sort) is preserved.\n\n✅ **SUPPORTED:** the standard search path, e.g. `https://www.wg-gesucht.de/wg-zimmer-in-Berlin.8.0.1.0.html?rMax=600`.\n\n💡 **BULK EDIT:** Click \"Bulk edit\" to paste one URL per line.\n\nUsed when **Search mode = bySearchUrl**.",
            "items": {
              "type": "string"
            }
          },
          "listingUrls": {
            "title": "🆔 Listing URLs or IDs",
            "uniqueItems": true,
            "type": "array",
            "description": "🆔 **DETAIL-BY-URL MODE:** Specific listing detail URLs (`https://www.wg-gesucht.de/wg-zimmer-in-Berlin-Schoeneberg.13616431.html`) or bare numeric IDs (`13616431`).\n\n⚠️ wg-gesucht listings churn fast — old IDs return \"Angebot nicht vorhanden\" (deleted). Discover fresh IDs via byCity / bySearchUrl.\n\n💡 **BULK EDIT:** Click \"Bulk edit\" to paste one per line.\n\nUsed when **Search mode = byListingUrl** (requires **Scrape mode = detail**).",
            "items": {
              "type": "string"
            }
          },
          "maxResults": {
            "title": "🔢 Max results",
            "minimum": 1,
            "type": "integer",
            "description": "🔢 **Maximum listings per run.**\n\n- **FREE users:** capped at 25 listings/run.\n- **PAID users:** unlimited.\n\nThe scraper stops paginating once this many listings are collected.",
            "default": 100
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}