{
  "openapi": "3.0.1",
  "info": {
    "title": "Zameen.com Scraper | Pakistan Property Data & Price Trends",
    "description": "Collect detailed property listings from Pakistan's biggest real estate portal. This fast, no-login scraper pulls houses, flats, plots and commercial properties for sale or rent, with price per marla, price-drop tracking and CSV, JSON or API export.",
    "version": "0.3",
    "x-build-id": "to766KasWtsKKcMUr"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/taiw~zameen-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-taiw-zameen-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/taiw~zameen-scraper/runs": {
      "post": {
        "operationId": "runs-sync-taiw-zameen-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/taiw~zameen-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-taiw-zameen-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": [
              "listings",
              "priceTrends"
            ],
            "type": "string",
            "description": "\"Listings\" returns one row per property. \"Price trends\" scrapes the same listings and returns one summary row per area and property type (median price, median price per marla, count, min/max, and change versus earlier runs).",
            "default": "listings"
          },
          "city": {
            "title": "City",
            "enum": [
              "Islamabad",
              "Lahore",
              "Karachi",
              "Rawalpindi",
              "Faisalabad",
              "Peshawar",
              "Multan",
              "Gujranwala",
              "Sialkot",
              "Hyderabad",
              "Quetta",
              "Bahawalpur",
              "Abbottabad",
              "Sargodha",
              "Sahiwal",
              "Murree",
              "Attock"
            ],
            "type": "string",
            "description": "City to search. Ignored when Start URLs are provided.",
            "default": "Islamabad"
          },
          "cities": {
            "title": "Several cities (optional)",
            "type": "array",
            "description": "Search several cities in one run. When you pick cities here, the single City field above is ignored, and Maximum listings is split evenly between the cities (e.g. 300 for 3 cities = up to 100 each).",
            "items": {
              "type": "string",
              "enum": [
                "Islamabad",
                "Lahore",
                "Karachi",
                "Rawalpindi",
                "Faisalabad",
                "Peshawar",
                "Multan",
                "Gujranwala",
                "Sialkot",
                "Hyderabad",
                "Quetta",
                "Bahawalpur",
                "Abbottabad",
                "Sargodha",
                "Sahiwal",
                "Murree",
                "Attock"
              ]
            }
          },
          "purpose": {
            "title": "Purpose",
            "enum": [
              "buy",
              "rent"
            ],
            "type": "string",
            "description": "Properties for sale or for rent. Ignored when Start URLs are provided.",
            "default": "buy"
          },
          "propertyType": {
            "title": "Property type",
            "enum": [
              "house",
              "flat",
              "plot",
              "commercial",
              "farmhouse"
            ],
            "type": "string",
            "description": "Type of property. \"Flat\" covers apartments; \"Plot\" covers residential, commercial and other plots; \"Commercial\" covers shops, offices, buildings and similar. Ignored when Start URLs are provided.",
            "default": "house"
          },
          "locationKeyword": {
            "title": "Area / society (optional)",
            "type": "string",
            "description": "Narrow the search to an area or housing society inside the chosen city, e.g. \"DHA Phase 2\", \"Bahria Town\", \"G-13\". The Actor matches it to Zameen's own location list. If no location matches, it falls back to a keyword text search and logs a warning."
          },
          "minPrice": {
            "title": "Minimum price (PKR)",
            "minimum": 0,
            "type": "integer",
            "description": "Lowest price in Pakistani rupees, e.g. 10000000 for 1 crore. For rentals this is the monthly rent."
          },
          "maxPrice": {
            "title": "Maximum price (PKR)",
            "minimum": 0,
            "type": "integer",
            "description": "Highest price in Pakistani rupees, e.g. 50000000 for 5 crore."
          },
          "minAreaMarla": {
            "title": "Minimum area (marla)",
            "minimum": 0,
            "type": "number",
            "description": "Smallest plot/covered area in marla (1 kanal = 20 marla; Zameen uses 1 marla = 225 sq ft)."
          },
          "maxAreaMarla": {
            "title": "Maximum area (marla)",
            "minimum": 0,
            "type": "number",
            "description": "Largest area in marla."
          },
          "bedrooms": {
            "title": "Bedrooms",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Exact number of bedrooms (1-10). Leave empty for any."
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "newest",
              "price_low_high",
              "price_high_low"
            ],
            "type": "string",
            "description": "Order of results. \"Newest\" works best with \"Posted within\" and \"Only new listings\".",
            "default": "newest"
          },
          "postedWithinDays": {
            "title": "Posted within (days)",
            "minimum": 1,
            "maximum": 3650,
            "type": "integer",
            "description": "Only keep listings added or refreshed in the last N days. Leave empty for any age."
          },
          "startUrls": {
            "title": "Start URLs (optional)",
            "type": "array",
            "description": "Zameen search result URLs to scrape instead of the city/filter fields above, e.g. https://www.zameen.com/Homes/Lahore_DHA_Defence-9-1.html?price_max=50000000. Run a search on zameen.com and copy the address bar. Single listing URLs (https://www.zameen.com/Property/...) are also accepted. When provided, City, Purpose, Property type, Area/society, price, area, bedroom and sort fields are ignored.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "maxItems": {
            "title": "Maximum listings",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Stop after this many listings (in Price trends mode: how many listings to analyse). You are charged per listing saved, so this also caps your cost.",
            "default": 50
          },
          "includeDetailPages": {
            "title": "Open each listing for full details",
            "type": "boolean",
            "description": "When on, the Actor also opens every listing page to collect the full description, all features/amenities, all image URLs and status fields. Slower (one extra page per listing) and priced as a detailed result ($0.003 instead of $0.001 per listing). When off, description is the short preview from search results and only the cover image is returned. Ignored in Price trends mode.",
            "default": false
          },
          "includeContacts": {
            "title": "Include contact details",
            "type": "boolean",
            "description": "When on (default), each listing includes the contact name and phone number published on Zameen.com for that listing, plus the agency name and logo. Turn it off to leave out contact_name and phone_number. You are responsible for using contact data lawfully (see the legal note in the README).",
            "default": true
          },
          "onlyNew": {
            "title": "Only new listings",
            "type": "boolean",
            "description": "When on, skips listing IDs already saved by earlier runs of this Actor in your account (remembered in a named key-value store \"zameen-scraper-seen-ids\"). Useful for scheduled runs.",
            "default": false
          },
          "onlyPriceDrops": {
            "title": "Only price drops",
            "type": "boolean",
            "description": "Return only listings whose price went down since an earlier run, with the old price, the new price and the change in percent. The first run builds the baseline, so price drops appear from the second run. Prices are kept in your account in the key-value store \"zameen-scraper-price-history\". Combine with \"Only new listings\" for a daily feed of new listings plus price drops. Scans up to 40 search pages per search unless you set \"Max pages per search\".",
            "default": false
          },
          "maxPagesPerSearch": {
            "title": "Max pages per search",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Optional limit on search result pages per city or start URL (25 listings per page). Leave empty for no limit (40 when \"Only price drops\" is on)."
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Apify Proxy is on by default. If Zameen.com starts refusing datacenter IPs, the Actor automatically switches to residential proxies for the rest of the run, so you normally do not need to change anything. You can also pick the RESIDENTIAL group yourself.",
            "default": {
              "useApifyProxy": true
            }
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Maximum parallel requests. The default (8) suits most runs. Raise it up to 20 to speed up large runs; lower it if you see many refused requests in the log.",
            "default": 8
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}