# Zameen.com Scraper (`shahidirfan/zameen-com-scraper`) Actor

Extract detailed real estate listings from Pakistan's leading property portal. This lightweight actor efficiently scrapes data for houses, plots, and commercial properties for sale or rent. For seamless extraction and to avoid IP bans, the use of residential proxies is strongly recommended.

- **URL**: https://apify.com/shahidirfan/zameen-com-scraper.md
- **Developed by:** [Shahid Irfan](https://apify.com/shahidirfan) (community)
- **Categories:** Real estate, Developer tools, Automation
- **Features:** Limited permissions
- **Stats:** 104 total users, 7 monthly users, 100.0% runs succeeded, 2 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

from $0.80 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## 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.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

### What does Zameen.com Property Scraper do?

Zameen.com Property Scraper collects structured property listings from Zameen.com, Pakistan's real estate marketplace. Add one or more public listing URLs, or provide a city and area keyword, then receive clean records containing prices, property details, locations, agencies, contacts, photos, descriptions, amenities, and source URLs.

Use the Actor for Pakistan real estate market research, investment screening, price comparison, property inventory monitoring, agency research, lead preparation, and repeat scheduled collections. It supports homes, plots, commercial properties, sale listings, rental listings, and individual property pages.

### Why use Zameen.com Property Scraper?

- **Collect Pakistan property data** - Build datasets for Lahore, Karachi, Islamabad, Rawalpindi, Faisalabad, and other locations available on Zameen.com.
- **Support sale and rental research** - Collect sale listings with keyword and location inputs, or use public rental URLs for rental homes and commercial properties.
- **Compare asking prices** - Analyze prices, area, bedrooms, bathrooms, property types, cities, and neighborhood hierarchies in a consistent format.
- **Monitor inventory** - Run the Actor repeatedly to compare new, updated, reactivated, and inactive listing activity.
- **Research agencies and contacts** - Capture agency names, agency IDs, contact names, phone numbers, listing references, and published media.
- **Choose the right detail level** - Use lightweight listing records for broad collection, or enable `scrapeDetails` for descriptions, amenities, furnishing, verification, and full photo galleries.
- **Automate downstream work** - Export datasets to JSON, CSV, Excel, or XML, or connect them to Google Sheets, Airtable, Make, Zapier, webhooks, and custom applications.

### What data can you extract from Zameen.com?

Each dataset item represents one unique Zameen.com property listing. Duplicate listings are removed by `external_id`, and empty source values are omitted from the final record.

| Field | Description |
|-------|-------------|
| `external_id` | Unique Zameen.com listing identifier. |
| `title` | Property listing title. |
| `title_localized` | Localized title when published by the source. |
| `price` | Asking price as a number. |
| `currency` | Currency code, normally `PKR`. |
| `bedrooms` | Number of bedrooms when available. |
| `bathrooms` | Number of bathrooms when available. |
| `area` | Normalized property area value. |
| `area_unit` | Area unit such as `marla`, `kanal`, `sqft`, or `sqm`. |
| `location` | Neighborhood, phase, block, or location hierarchy. |
| `city` | City associated with the listing. |
| `purpose` | `sale` or `rent`. |
| `property_type` | Normalized type such as house, apartment, plot, shop, or office. |
| `added_date` | Original listing date in ISO format when available. |
| `updated_date` | Most recent update date in ISO format when available. |
| `reactivated_date` | Reactivation date when available. |
| `listing_state` | Listing state reported by Zameen.com. |
| `product` | Listing promotion tier when available. |
| `product_label` | Promotion label when available. |
| `product_score` | Source promotion score when available. |
| `reference_number` | Published listing reference number. |
| `permit_number` | Permit number when published. |
| `project_number` | Project number when published. |
| `contact_name` | Published contact person. |
| `phone_number` | Published phone or mobile number. |
| `agency_name` | Published agency name. |
| `agency_external_id` | Agency identifier. |
| `agency_logo` | Agency logo thumbnail URL. |
| `latitude` | Listing latitude when available. |
| `longitude` | Listing longitude when available. |
| `cover_photo_url` | Primary property image URL. |
| `photo_count` | Number of published photos. |
| `video_count` | Number of published videos. |
| `panorama_count` | Number of published panoramas. |
| `photos` | Array of property image URLs when available. |
| `description` | Full listing description when detail collection is enabled. |
| `amenities` | Readable summary of published amenities. |
| `verification_status` | Verification status when available. |
| `construction_status` | Construction status when available. |
| `furnishing` | Furnishing information when available. |
| `url` | Direct Zameen.com property URL. |
| `source` | Source domain, `zameen.com`. |
| `source_page_url` | Listing page used to collect the record. |
| `source_page_number` | Page number where the listing was found. |
| `search_location_external_id` | Location identifier used for a location search. |
| `search_location_slug` | Location slug used for a location search. |
| `search_category` | Category used for the collection, such as `Homes`, `Plots`, or `Commercial`. |

### How to scrape Zameen.com property data

1. Open the Actor in Apify Console.
2. Add one or more public Zameen.com listing URLs in `startUrls`, or leave the URL list empty and enter `location` with an area `keyword`.
3. Choose the category, sorting option, result limit, page limit, and detail setting.
4. Start the run and check the dataset preview.
5. Download the dataset or connect it to your preferred workflow.

When usable values are supplied in `startUrls`, those URLs take priority over `keyword`, `location`, and `category`. Use complete public URLs copied from Zameen.com. The Actor accepts city and area listing pages, category pages, rental pages, localized listing pages, and direct property detail pages.

#### Supported URL patterns

Examples of supported public URL formats include:

- Sale homes: `https://www.zameen.com/Homes/Lahore-1-1.html`
- Sale commercial properties: `https://www.zameen.com/Commercial/Faisalabad-16-1.html`
- Rental homes: `https://www.zameen.com/Rentals/Faisalabad-16-1.html`
- Rental commercial properties: `https://www.zameen.com/Rentals_Commercial/Faisalabad-16-1.html`
- Localized rental commercial pages: `https://www.zameen.com/ur/Rentals_Commercial/Faisalabad-16-1.html`
- Individual property pages: `https://www.zameen.com/Property/...-54290518-1619-1.html`

The section in the URL determines the purpose and category. For example, `Rentals_Commercial` means rental commercial listings. If a rental URL returns no records, confirm that the URL is a public active listing page and that its location ID and category are part of the canonical URL.

Keyword and location searches are intended for sale listings. Rental collection should use a public rental listing URL such as the examples above.

### Input Parameters

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| `startUrls` | Array of strings | No | Empty, with a Pakistan Homes UI prefill | One or more public Zameen.com listing URLs or direct property URLs. Usable URLs take priority over keyword and location inputs. |
| `category` | String | No | `Homes` | Category used with keyword and location. Allowed values are `Homes`, `Plots`, and `Commercial`. Ignored when a usable URL supplies the category. |
| `keyword` | String | No | Empty | Area or development keyword, such as `Bahria Town`, `DHA Phase 6`, or `G-13`. |
| `location` | String | No | Empty | City or broader location, such as `Lahore`, `Islamabad`, Karachi, or Faisalabad. |
| `sortBy` | String | No | `default` | Result order: `default`, `price_asc`, `price_desc`, or `date_desc`. |
| `results_wanted` | Integer | No | `20` | Maximum number of unique listings to save across the run. |
| `max_pages` | Integer | No | `20` | Maximum number of listing pages to inspect for each URL. |
| `scrapeDetails` | Boolean | No | `true` | Collect additional description, amenities, furnishing, verification, and gallery information when available. |
| `proxyConfiguration` | Object | No | Not set | Optional Apify Proxy settings for larger or repeated runs. |

### Output Data

The Actor saves one dataset item per unique property. Every saved item includes `external_id`, `title`, and `url` when the source provides enough information to identify and link the listing.

| Field | Type | Description |
|-------|------|-------------|
| `external_id` | String | Unique property listing ID. |
| `title` | String | Listing title. |
| `price` | Number | Numeric asking price. |
| `currency` | String | Source currency, normally `PKR`. |
| `bedrooms` | Number | Bedroom count when available. |
| `bathrooms` | Number | Bathroom count when available. |
| `area` | Number | Normalized area value. |
| `area_unit` | String | Unit for the area value. |
| `location` | String | Neighborhood or location hierarchy. |
| `city` | String | Listing city. |
| `purpose` | String | `sale` or `rent`. |
| `property_type` | String | Normalized property type. |
| `contact_name` | String | Published contact name. |
| `phone_number` | String | Published phone or mobile number. |
| `agency_name` | String | Published agency name. |
| `photos` | Array | Published property image URLs. |
| `description` | String | Description when detail collection is enabled. |
| `amenities` | String | Readable amenities summary. |
| `url` | String | Direct source property URL. |
| `source` | String | `zameen.com`. |
| `source_page_url` | String | Listing or search page used for collection. |
| `source_page_number` | Number | Page number where the record was found. |

The dataset also includes optional dates, promotion fields, media counts, coordinates, agency identifiers, verification information, furnishing, construction status, and search context fields listed above.

### Usage Examples

#### Basic City Collection

Collect up to 20 homes from a canonical Lahore listing page.

```json
{
  "startUrls": [
    "https://www.zameen.com/Homes/Lahore-1-1.html"
  ],
  "results_wanted": 20,
  "scrapeDetails": true
}
```

#### Multiple Cities and Price Sorting

Collect sale listings from several public city pages, with a shared result limit and page limit.

```json
{
  "startUrls": [
    "https://www.zameen.com/Homes/Lahore-1-1.html",
    "https://www.zameen.com/Homes/Islamabad-3-1.html",
    "https://www.zameen.com/Homes/Karachi-2-1.html"
  ],
  "results_wanted": 60,
  "max_pages": 3,
  "sortBy": "price_asc",
  "scrapeDetails": false
}
```

#### Rental Commercial Collection

Use the canonical composite rental section when collecting commercial rental listings in Faisalabad.

```json
{
  "startUrls": [
    "https://www.zameen.com/Rentals_Commercial/Faisalabad-16-1.html"
  ],
  "results_wanted": 50,
  "max_pages": 3,
  "scrapeDetails": true
}
```

#### Area and Category Search

Provide a city and area keyword when you want sale listings for a specific development or neighborhood.

```json
{
  "category": "Plots",
  "location": "Islamabad",
  "keyword": "G-13",
  "results_wanted": 50,
  "max_pages": 5,
  "sortBy": "price_desc",
  "scrapeDetails": true
}
```

#### Individual Property

Use a direct property URL when you need one specific listing and its available details.

```json
{
  "startUrls": [
    "https://www.zameen.com/Property/dha_phase_6_dha_phase_6_-_block_k_1_kanal_brand_new_ultra_luxurious_modern_designer_bungalow_for_sale_near_park_and_commercial_defence_raya-54290518-1619-1.html"
  ],
  "results_wanted": 1,
  "scrapeDetails": true
}
```

### Sample Output

The following is a representative dataset item. Optional fields may be absent when a listing does not publish them.

```json
{
  "external_id": "54290518",
  "title": "1 KANAL BRAND NEW ULTRA LUXURIOUS MODERN DESIGNER BUNGALOW FOR SALE NEAR PARK AND COMMERCIAL DEFENCE RAYA",
  "price": 87500000,
  "currency": "PKR",
  "bedrooms": 5,
  "bathrooms": 6,
  "area": 1,
  "area_unit": "kanal",
  "location": "DHA Defence, DHA Phase 6, DHA Phase 6 - Block K",
  "city": "Lahore",
  "purpose": "sale",
  "property_type": "house",
  "added_date": "2026-06-08T13:15:20.000Z",
  "updated_date": "2026-06-08T13:15:20.000Z",
  "listing_state": "active",
  "contact_name": "Ayyan Ali",
  "phone_number": "+923276066064",
  "agency_name": "Haram Estate & Builders",
  "latitude": 31.468862,
  "longitude": 74.463358,
  "cover_photo_url": "https://media.zameen.com/thumbnails/300542741-800x600.webp",
  "photo_count": 32,
  "photos": [
    "https://media.zameen.com/thumbnails/300542741-800x600.webp",
    "https://media.zameen.com/thumbnails/300542746-800x600.webp"
  ],
  "description": "1 KANAL HOUSE PRIME LOCATION NEAR DEFENCE RAYA 4 MINUTES DRIVE DOLMEN MALL AND KFC TIMHORTONS OWNER BUILD HOUSE VERY REASONABLE PRICE",
  "amenities": "Built in year: 2026 | View: AWESOME | Parking Spaces: 5 | Furnished: Yes",
  "url": "https://www.zameen.com/Property/dha_phase_6_dha_phase_6_-_block_k_1_kanal_brand_new_ultra_luxurious_modern_designer_bungalow_for_sale_near_park_and_commercial_defence_raya-54290518-1619-1.html",
  "source": "zameen.com"
}
```

### Tips for Best Results

- **Use canonical listing URLs** - Copy a public city, society, phase, category, rental, or direct property URL from Zameen.com.
- **Use the correct rental section** - Commercial rentals use a URL such as `Rentals_Commercial/Faisalabad-16-1.html`; generic rentals use `Rentals/Faisalabad-16-1.html`.
- **Start with a small run** - Test with `results_wanted: 20` and a low `max_pages` value before collecting a larger dataset.
- **Use precise keyword searches** - Include the city in `location` and the area, society, phase, block, or development in `keyword`.
- **Use detail collection selectively** - Enable `scrapeDetails` when descriptions, amenities, furnishing, verification, or full galleries matter. Disable it for faster, lighter datasets.
- **Keep URL filters in the URL** - When using `startUrls`, the URL controls the purpose, category, and location. The separate category input is ignored for usable URLs.
- **Check the dataset preview** - Confirm the city, purpose, category, property type, and result count before scheduling repeat runs.
- **Expect source-dependent fields** - Prices, phone numbers, coordinates, descriptions, amenities, and photos may be unavailable for individual listings.
- **Use consistent inputs for monitoring** - Reuse the same URL, result limit, page limit, and sorting option when comparing scheduled runs.

### Integrations and Export Formats

- **Apify API** - Retrieve dataset items programmatically for property portals, dashboards, and internal applications.
- **Google Sheets** - Review prices, areas, locations, agencies, and contacts in a spreadsheet.
- **Airtable** - Build a searchable inventory with views for cities, categories, agencies, and price ranges.
- **Make or Zapier** - Send selected listings to CRM, notification, enrichment, or reporting workflows.
- **Webhooks** - Trigger downstream processing when a run finishes.
- **JSON** - Use for applications, automation, analysis pipelines, and data enrichment.
- **CSV or Excel** - Use for spreadsheet analysis and business reporting.
- **XML** - Use when a downstream system requires XML data.

Apify datasets can be downloaded in JSON, CSV, Excel, XML, and other supported formats. You can also schedule recurring runs to refresh property inventory and compare listing changes over time.

### Frequently Asked Questions

#### Can I collect rental commercial listings?

Yes. Add a public URL using the `Rentals_Commercial` format, such as `https://www.zameen.com/Rentals_Commercial/Faisalabad-16-1.html`. The output will contain `purpose: "rent"` and `search_category: "Commercial"` when those source values are available.

#### Can I collect rental homes?

Yes. Add a public rental URL using the `Rentals` section, such as `https://www.zameen.com/Rentals/Faisalabad-16-1.html`.

#### Can I collect sale plots or commercial properties?

Yes. Use a matching public URL in `startUrls`, or use `category` with `location` and `keyword` for sale searches. The supported category values are `Homes`, `Plots`, and `Commercial`.

#### Can I use a localized Zameen.com URL?

Yes. Localized listing paths such as `/ur/Rentals_Commercial/Faisalabad-16-1.html` are supported when the page is public and follows Zameen.com's canonical URL format.

#### Can I collect more than one city or category in a run?

Yes. Add multiple public listing URLs to `startUrls`. The Actor removes duplicate listing IDs and stops after reaching the shared `results_wanted` limit or the available pages.

#### Can I scrape one specific property?

Yes. Add its direct property detail URL to `startUrls`, set `results_wanted` to `1`, and keep `scrapeDetails` enabled for the available description, amenities, contact, and gallery information.

#### Why did my URL return no results?

First confirm that the URL is public, active, and canonical. For rental commercial pages, use `Rentals_Commercial`, not `Commercial`, because the URL section identifies the rental purpose. Also check that the URL contains the correct location ID and page number. A valid page with no active matching listings can also produce an empty dataset.

#### Why are some fields missing?

Some listings do not publish every attribute. Missing values are omitted rather than replaced with misleading placeholders. Detail fields also depend on the source listing and whether `scrapeDetails` is enabled.

#### Does the Actor remove duplicate listings?

Yes. Duplicate records are skipped by `external_id` within the same run, which helps when multiple pages or URLs overlap.

#### Can I export the results to CSV or Excel?

Yes. Apify datasets can be downloaded as CSV, Excel, JSON, XML, and other supported formats, or accessed through the Apify API and integrations.

#### Can I schedule recurring collections?

Yes. Create an Apify schedule using the same input to refresh inventory, prices, listing states, and property details hourly, daily, weekly, or on another supported interval.

#### Is it legal to collect Zameen.com data?

You are responsible for complying with Zameen.com's terms, applicable laws, privacy requirements, and any restrictions that apply to the data you collect and use. Collect public listing information responsibly and handle published contact information with care.

### Related Actors

- [Housing.com Property Scraper](https://apify.com/shahidirfan/housing-com-property-scraper) - Collect Indian property listings, prices, locations, and property details.
- [iProperty Scraper](https://apify.com/shahidirfan/iproperty-scraper) - Collect Malaysian property listings, prices, locations, agents, and details.
- [Onthemarket Property Scraper](https://apify.com/shahidirfan/onthemarket-property-scraper) - Collect UK sale and rental listings, prices, images, and agent information.

### Support

For issues, missing fields, source changes, or feature requests, use the Issues tab on the Actor page. Include the input used, the affected Zameen.com URL, the requested result limit, and a representative output item when reporting a problem.

### Legal Notice

This Actor is intended for legitimate collection of publicly available Zameen.com property information. Users are responsible for complying with Zameen.com's terms of service, applicable laws, privacy requirements, and any restrictions on data collection and use.

# Actor input Schema

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

Array of Zameen.com LISTING URLs (recommended). Use canonical listing pages like https://www.zameen.com/Homes/Lahore-1-1.html or https://www.zameen.com/Homes/Lahore_Bahria_Town-509-1.html (avoid /search which often returns 503).

## `category` (type: `string`):

Which Zameen category to resolve when using keyword+location (ignored when using startUrls).

## `keyword` (type: `string`):

Area/development keyword to resolve within the city (e.g., 'Bahria Town', 'DHA', 'G-13').

## `location` (type: `string`):

City name (e.g., 'Lahore', 'Islamabad', 'Karachi'). Used together with keyword to build a canonical listing URL.

## `sortBy` (type: `string`):

Select the sorting order for property listings.

## `results_wanted` (type: `integer`):

Maximum number of listings to collect across all pages.

## `max_pages` (type: `integer`):

Safety cap on how many listing pages to open per start URL.

## `scrapeDetails` (type: `boolean`):

If enabled, actor collects full listing details, including description, amenities, and the full photo gallery when published. Detail collection uses the target's supported batch request flow with bounded fallback for missing records.

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

Use Apify Proxy to reduce blocking. Data center works; residential is optional for heavy runs.

## Actor input object example

```json
{
  "startUrls": [
    "https://www.zameen.com/Homes/Pakistan-1-1.html"
  ],
  "category": "Homes",
  "sortBy": "default",
  "results_wanted": 20,
  "max_pages": 20,
  "scrapeDetails": true,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `overview` (type: `string`):

No description

# 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 = {
    "startUrls": [
        "https://www.zameen.com/Homes/Pakistan-1-1.html"
    ],
    "category": "Homes",
    "sortBy": "default",
    "results_wanted": 20,
    "max_pages": 20,
    "scrapeDetails": true
};

// Run the Actor and wait for it to finish
const run = await client.actor("shahidirfan/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 = {
    "startUrls": ["https://www.zameen.com/Homes/Pakistan-1-1.html"],
    "category": "Homes",
    "sortBy": "default",
    "results_wanted": 20,
    "max_pages": 20,
    "scrapeDetails": True,
}

# Run the Actor and wait for it to finish
run = client.actor("shahidirfan/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 '{
  "startUrls": [
    "https://www.zameen.com/Homes/Pakistan-1-1.html"
  ],
  "category": "Homes",
  "sortBy": "default",
  "results_wanted": 20,
  "max_pages": 20,
  "scrapeDetails": true
}' |
apify call shahidirfan/zameen-com-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,shahidirfan/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/YQ5kMql2j77kdasD4/builds/jWOfhKAzT5l5j0PWG/openapi.json
