{
  "openapi": "3.0.1",
  "info": {
    "title": "Zameen.com Scraper - Pakistan Property Listings & Prices",
    "description": "Scrape Zameen.com property listings across Pakistan: PKR prices, beds, baths, marla or kanal area, photos, agent tier and GPS coordinates. Sale and rental.",
    "version": "1.0",
    "x-build-id": "iogdDNoNbFRSjqWbz"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/sian.agency~zameen-property-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-sian.agency-zameen-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~zameen-property-scraper/runs": {
      "post": {
        "operationId": "runs-sync-sian.agency-zameen-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~zameen-property-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-sian.agency-zameen-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": {
          "operation": {
            "title": "🎯 What do you want to scrape?",
            "enum": [
              "search",
              "detail"
            ],
            "type": "string",
            "description": "Pick one per run. Property Search walks Zameen.com's own listing pages for any of its 64 Pakistani cities, in any of the ten sale and rental sections the site publishes, and returns 25 listings per page; Property Detail takes Zameen listing URLs or bare listing numbers and returns the full advert text, every photo, the feature list, GPS coordinates and the agency marketing the listing.",
            "default": "search"
          },
          "locations": {
            "title": "📍 Cities",
            "uniqueItems": true,
            "type": "array",
            "description": "Which Pakistani cities to read. Every value is Zameen's own city, with the numeric id the site's own links carry — the list is exactly what the site indexes at city level. DHA Phase 6, Bahria Town and other society-level pages live one level below the city: reach them by pasting their Zameen address into Search URLs.",
            "items": {
              "type": "string",
              "enum": [
                "Lahore",
                "Karachi",
                "Islamabad",
                "Multan",
                "Faisalabad",
                "Peshawar",
                "Quetta",
                "Jhelum",
                "Gujrat",
                "Bahawalpur",
                "Dera_Ghazi_Khan",
                "Hyderabad",
                "Murree",
                "Rahim_Yar_Khan",
                "Rawalpindi",
                "Sheikhupura",
                "Gujranwala",
                "Abbottabad",
                "Gwadar",
                "Hassan_Abdal",
                "Mardan",
                "Wah",
                "Taxila",
                "Okara",
                "Sialkot",
                "Kasur",
                "Bahawalnagar",
                "Gharo",
                "Chakwal",
                "Sargodha",
                "Sahiwal",
                "Muzaffarabad",
                "Sarai_Alamgir",
                "Haripur",
                "Burewala",
                "Attock",
                "Naran",
                "Fateh_Jang",
                "Kharian",
                "Mirpur",
                "Wazirabad",
                "Nowshera",
                "Karachi_DHA_City_Karachi",
                "Kohat",
                "Vehari",
                "Mandi_Bahauddin",
                "Swat",
                "Daska",
                "Pakpattan",
                "Muzaffargarh",
                "Thatta",
                "Astore",
                "Muridke",
                "Gujar_Khan",
                "Arifwala",
                "Khanpur",
                "Kamoki",
                "Pind_Dadan_Khan",
                "Bhalwal",
                "Buner",
                "Talagang",
                "Shakargarh",
                "Tando_Muhammad_Khan",
                "Chilas"
              ],
              "enumTitles": [
                "🏙️ Lahore",
                "🏙️ Karachi",
                "🏙️ Islamabad",
                "🏙️ Multan",
                "🏙️ Faisalabad",
                "🏙️ Peshawar",
                "🏙️ Quetta",
                "🏙️ Jhelum",
                "🏙️ Gujrat",
                "🏙️ Bahawalpur",
                "🏙️ Dera Ghazi Khan",
                "🏙️ Hyderabad",
                "🌄 Murree",
                "🏙️ Rahim Yar Khan",
                "🏙️ Rawalpindi",
                "🏙️ Sheikhupura",
                "🏙️ Gujranwala",
                "🏔️ Abbottabad",
                "🏖️ Gwadar",
                "🏙️ Hassan Abdal",
                "🏙️ Mardan",
                "🏙️ Wah",
                "🏙️ Taxila",
                "🏙️ Okara",
                "🏙️ Sialkot",
                "🏙️ Kasur",
                "🏙️ Bahawalnagar",
                "🏙️ Gharo",
                "🏙️ Chakwal",
                "🏙️ Sargodha",
                "🏙️ Sahiwal",
                "🏙️ Muzaffarabad",
                "🏙️ Sarai Alamgir",
                "🏙️ Haripur",
                "🏙️ Burewala",
                "🏙️ Attock",
                "🌄 Naran",
                "🏙️ Fateh Jang",
                "🏙️ Kharian",
                "🏙️ Mirpur",
                "🏙️ Wazirabad",
                "🏙️ Nowshera",
                "🏙️ DHA City, Karachi",
                "🏙️ Kohat",
                "🏙️ Vehari",
                "🏙️ Mandi Bahauddin",
                "🏙️ Swat",
                "🏙️ Daska",
                "🏙️ Pakpattan",
                "🏙️ Muzaffargarh",
                "🏙️ Thatta",
                "🏔️ Astore",
                "🏙️ Muridke",
                "🏙️ Gujar Khan",
                "🏙️ Arifwala",
                "🏙️ Khanpur",
                "🏙️ Kamoki",
                "🏙️ Pind Dadan Khan",
                "🏙️ Bhalwal",
                "🏙️ Buner",
                "🏙️ Talagang",
                "🏙️ Shakargarh",
                "🏙️ Tando Muhammad Khan",
                "🏔️ Chilas"
              ]
            },
            "default": [
              "Lahore"
            ]
          },
          "category": {
            "title": "🏷️ Section",
            "enum": [
              "homes",
              "houses",
              "flats",
              "plots",
              "commercial-sale",
              "rentals",
              "rental-houses",
              "rental-flats",
              "rental-plots",
              "rental-commercial"
            ],
            "type": "string",
            "description": "One of the ten listing sections Zameen publishes, one per run. The first five read sale adverts (asking price); the last five read the same kinds of property under Zameen's rental sections (monthly rent in the same price field). Each section has its own result count, so houses and flats in one city are two sections, not one filtered view.",
            "default": "homes"
          },
          "maxResults": {
            "title": "🔢 Max listings",
            "minimum": 1,
            "maximum": 50000,
            "type": "integer",
            "description": "Stop after this many listings across the whole run, not per city. One page carries 25 listings, so a run ends on the first page that crosses your limit. Zameen puts no ceiling of its own on a search — Lahore Homes shows 27,000+ matches — so this budget, not the site, is what stops the run.",
            "default": 100
          },
          "keywords": {
            "title": "🔎 Keywords",
            "type": "string",
            "description": "Optional free-text filter Zameen applies server-side before the page is served — 'swimming pool', 'corner plot', 'advance booking'. Zameen matches it against the advert text, and the count shown on the page reflects it. Leave empty for everything."
          },
          "includeDetails": {
            "title": "📄 Add full details",
            "type": "boolean",
            "description": "Open each listing's own page to add the untruncated advert text, the complete photo set, the feature list, GPS coordinates, the floor area in square metres, the land area in square feet and the agency marketing the listing. Costs one extra request per listing and bills the Property Detail event on top of the listing row.",
            "default": false
          },
          "minPrice": {
            "title": "💵 Min price (PKR)",
            "minimum": 0,
            "type": "integer",
            "description": "Skip listings priced below this. 0 means no lower bound. For a rental section this is the monthly rent. Zameen applies this server-side, so the count you see on the page already reflects it; a promoted 'super hot' card can still appear outside your band, and that card is filtered out locally and not saved.",
            "default": 0
          },
          "maxPrice": {
            "title": "💰 Max price (PKR)",
            "minimum": 0,
            "type": "integer",
            "description": "Skip listings priced above this. 0 means no upper bound. Pairing it with a minimum is the usual way to carve a big city into bands. Zameen applies this server-side; out-of-band promoted cards are still removed before anything is saved.",
            "default": 0
          },
          "minBeds": {
            "title": "🛏️ Min beds",
            "minimum": 0,
            "type": "integer",
            "description": "Keep only listings with at least this many bedrooms. 0 means no minimum. Plots and commercial listings carry no bedroom count and are kept whatever you set here. Applied after the page is read — Zameen ignores bed parameters in its addresses.",
            "default": 0
          },
          "minBaths": {
            "title": "🚿 Min baths",
            "minimum": 0,
            "type": "integer",
            "description": "Keep only listings with at least this many bathrooms. 0 means no minimum. Plots and commercial listings carry no bathroom count and are kept whatever you set here. Applied after the page is read.",
            "default": 0
          },
          "searchUrls": {
            "title": "🌐 Search URLs",
            "type": "array",
            "description": "Paste Zameen search addresses instead of filling the form — build the search on zameen.com, copy the address bar, and the section, city or society and filters in it are read straight off the URL, including society-level pages such as https://www.zameen.com/Homes/Lahore_DHA_Defence-9-1.html that the city picker above does not reach. A page number in the address is ignored; the run starts at page one and pages forward on its own.",
            "default": [],
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "listingUrls": {
            "title": "🏠 Listing URLs",
            "type": "array",
            "description": "Used by the Property Detail operation: Zameen advert addresses to expand, e.g. https://www.zameen.com/Property/dha-phase-7-house-53557411-1632-1.html. A bare listing number such as 53557411 works too — Zameen redirects it to the full advert.",
            "default": [],
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}