# Zameen.com Property Listings Scraper (`muhammadafzal/zameen-com-scraper`) Actor

Scrape public Zameen.com property listings from Pakistan search and detail pages into structured records with PKR prices, locations, beds, baths, areas, images, descriptions, and public agent fields for real-estate research and lead generation.

- **URL**: https://apify.com/muhammadafzal/zameen-com-scraper.md
- **Developed by:** [Muhammad Afzal](https://apify.com/muhammadafzal) (community)
- **Categories:** Real estate, Lead generation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $5.00 / 1,000 zameen listings

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Zameen.com Property Listings Scraper

Extract structured, publicly visible property listings from Zameen.com search pages and individual `/Property/` pages. Use it for Pakistan real-estate research, inventory monitoring, lead generation, and market intelligence.

Each dataset record includes the listing ID, title, sale/rent purpose, PKR price, displayed location, bedrooms, bathrooms, original area and unit, square-foot conversion where supported, image, public description, features, agent/agency name when visible, source URL, and extraction timestamp.

### Input

```json
{
  "startUrls": [{ "url": "https://www.zameen.com/Homes/Lahore-1-1.html" }],
  "maxResults": 10,
  "maxPages": 1,
  "includeDetails": false,
  "proxyConfiguration": { "useApifyProxy": true }
}
```

Use absolute public Zameen URLs. Search pages use Zameen’s own `rel="next"` pagination. Detail enrichment costs additional requests, so disable `includeDetails` for a cheaper search-card crawl.

### Pricing and limits

Pay per event: $0.00005 per run start plus $0.005 per unique listing successfully written. A 10-listing prefilled run costs up to $0.05005 in event charges at 1 GB, excluding any platform or proxy usage that may apply. Runs are bounded to 500 records and 20 pages per start URL.

### Reliability and compliance

The Actor uses a conservative browser session, deduplication, bounded retries, and optional Apify Proxy configuration. CAPTCHA, access-denied, rate-limit, or other challenge pages are reported in `OUTPUT` as `BLOCKED` when no records can truthfully be returned; no fabricated records are emitted. It does not log in, bypass access controls, or collect private contact data. Use only public data in accordance with Zameen’s terms and applicable law.

### What data does Zameen.com Property Listings Scraper return?

| Field | Type | Description |
|---|---|---|
| `listingId` | string | Stable public Zameen listing identifier. |
| `title` | string | Public property headline. |
| `purpose` | string or null | Sale or rent when detected. |
| `propertyType` | string or null | Public property category when detected. |
| `pricePkr` | number or null | Numeric asking price normalized to Pakistani rupees. |
| `priceDisplay` | string or null | Original price text shown by Zameen. |
| `location` | string or null | Public displayed location. |
| `bedrooms` | number or null | Advertised bedroom count. |
| `bathrooms` | number or null | Advertised bathroom count. |
| `area` | number or null | Advertised area value in the original unit. |
| `areaUnit` | string or null | Original area unit such as marla, kanal, or sqft. |
| `areaSqft` | number or null | Area converted to square feet when the unit is supported. |
| `url` | string | Canonical public Zameen listing URL. |
| `imageUrl` | string or null | Primary public listing image when available. |
| `description` | string or null | Public description when detail enrichment is enabled. |
| `features` | array | Public property features when detected. |
| `agentName` | string or null | Public advertiser or agency name when available. |
| `scrapedAt` | string | UTC extraction timestamp. |
| `sourceType` | string | Whether the record came from a search page or detail page. |
| `warning` | string or null | Nonfatal extraction warning, if any. |

### Use cases

- Compare listings, locations, availability, and market signals for property research.
- Build public prospect lists and qualify organizations or professionals before responsible outreach.
- Run a one-off research job and export the structured result as JSON, CSV, Excel, XML, or RSS from Apify.
- Schedule the same input to monitor changes over time and send completed datasets to a webhook or integration.
- Feed schema-shaped records into a database, spreadsheet, BI tool, or AI workflow with the source URL retained for verification.

### Output example

```json
{
  "listingId": "54462059",
  "title": "5 Marla House For Sale",
  "purpose": "sale",
  "propertyType": "House",
  "pricePkr": 16500000,
  "priceDisplay": "PKR 1.65 Crore",
  "location": "DHA Defence, Lahore",
  "bedrooms": 4,
  "bathrooms": 5,
  "area": 5,
  "areaUnit": "marla",
  "areaSqft": 1361.25
}
```

The exact fields depend on the selected input and what the public source exposes. Use the dataset schema as the machine-readable contract and retain source URLs for verification.

### Run Zameen.com Property Listings Scraper with the Apify API

```javascript
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('muhammadafzal/zameen-com-scraper').call({
  "startUrls": [
    {
      "url": "https://www.zameen.com/Homes/Lahore-1-1.html"
    }
  ],
  "maxResults": 10,
  "maxPages": 1,
  "includeDetails": false,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

You can also run the Actor from Apify Console, schedules, webhooks, the REST API, Make, Zapier, n8n, or the hosted Apify MCP server.

# Actor input Schema

## `startUrls` (type: `array`):

Use this for public Zameen.com search or property URLs. Example: https://www.zameen.com/Homes/Lahore-1-1.html.

## `maxResults` (type: `integer`):

Use this to cap unique property records returned across all URLs. Default 10 keeps the prefilled run fast; maximum 500.

## `maxPages` (type: `integer`):

Use this to limit pagination from each search URL. Default 1 keeps the prefilled run within Apify's five-minute quality test; maximum 20.

## `includeDetails` (type: `boolean`):

Enable this only when you need detail-page descriptions, features, images, or agent fields. It adds one browser request per listing and is disabled by default for fast, reliable search-card extraction.

## `proxyConfiguration` (type: `object`):

Use an owner-authorized Apify Proxy configuration when Zameen rate-limits or challenges direct requests. No credentials are logged.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://www.zameen.com/Homes/Lahore-1-1.html"
    }
  ],
  "maxResults": 10,
  "maxPages": 1,
  "includeDetails": false,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `listings` (type: `string`):

Schema-validated Zameen property records.

## `runSummary` (type: `string`):

Status, counts, warnings, and access diagnostics.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {};

// Run the Actor and wait for it to finish
const run = await client.actor("muhammadafzal/zameen-com-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {}

# Run the Actor and wait for it to finish
run = client.actor("muhammadafzal/zameen-com-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{}' |
apify call muhammadafzal/zameen-com-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,muhammadafzal/zameen-com-scraper"
        }
    }
}

```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/4thzqQ2Y1ow2YTMPM/builds/CMX6IoDRkblM0goAL/openapi.json
