# MagicBricks India Property Scraper (`unfenced-group/magicbricks-scraper`) Actor

Scrape buy/rent property listings from MagicBricks.com India. Prices, GPS, BHK, area, RERA, photos.

- **URL**: https://apify.com/unfenced-group/magicbricks-scraper.md
- **Developed by:** [Unfenced Group](https://apify.com/unfenced-group) (community)
- **Categories:** Real estate
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.72 / 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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use 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

## MagicBricks India Property Scraper

![magicbricks-scraper](https://api.apify.com/v2/key-value-stores/lJlifu6C8YQfZMPKE/records/magicbricks-scraper)

Extract structured property listings from **MagicBricks.com** — India's leading real estate portal with 8+ million listings. Covers residential buy and rent across all major Indian cities. No API key or login required.

---

### How it works

The scraper uses a two-stage extraction strategy:

1. **Page 1 (JSON-in-HTML)** — Loads the Next.js SRP page and extracts the embedded `__NEXT_DATA__` JSON block. This establishes the browser session and retrieves the first page of results along with the total listing count.
2. **Pages 2+ (Internal AJAX API)** — Uses session cookies from step 1 to call MagicBricks' internal `propertyList` AJAX endpoint, which returns clean JSON. This is significantly faster than loading full HTML pages for every page.

---

### Input

| Field | Type | Default | Description |
|-------|------|---------|-------------|
| `cities` | Array | `["New-Delhi","Pune","Hyderabad","Mumbai","Bangalore"]` | City slugs to scrape |
| `transaction` | Array | `["buy","rent"]` | `buy` or `rent` |
| `maxItems` | Integer | `500` | Max listings to return (0 = unlimited) |
| `maxPagesPerCity` | Integer | `40` | Safety cap on pages per city/tx combo |
| `proxyConfiguration` | Object | — | Proxy settings (datacenter or residential) |

#### Supported cities

`New-Delhi`, `Mumbai`, `Bangalore`, `Hyderabad`, `Pune`, `Chennai`, `Kolkata`, `Gurgaon`, `Noida`, `Ahmedabad`, `Navi-Mumbai`

---

### Output fields

| Field | Type | Description |
|-------|------|-------------|
| `propId` | String | Unique MagicBricks listing ID |
| `url` | String | Full URL to the property detail page |
| `transactionType` | String | `buy` or `rent` |
| `propertyType` | String | e.g. `Multistorey-Apartment`, `Villa` |
| `city` | String | City display name |
| `locality` | String | Neighbourhood / locality |
| `societyName` | String | Project or society name |
| `developerName` | String | Builder / developer name |
| `landmark` | String | Nearby landmark referenced in listing |
| `latitude` | Number | GPS latitude |
| `longitude` | Number | GPS longitude |
| `priceRaw` | String | Price as displayed (e.g. `₹ 85 Lac`) |
| `priceMin` | Number | Minimum price in INR |
| `priceMax` | Number | Maximum price in INR |
| `pricePerSqft` | Number | Price per sqft in INR |
| `bedrooms` | Integer | Number of bedrooms (BHK) |
| `bathrooms` | Integer | Number of bathrooms |
| `balconies` | Integer | Number of balconies |
| `areaSqft` | Number | Carpet/built-up area in sqft (best available) |
| `carpetArea` | Number | Carpet area in sqft |
| `builtUpArea` | Number | Built-up area in sqft |
| `superBuiltUpArea` | Number | Super built-up area in sqft |
| `floorNumber` | Integer | Floor the property is on |
| `totalFloors` | Integer | Total floors in the building |
| `furnishing` | String | `Furnished`, `Semi-Furnished`, `Unfurnished` |
| `facing` | String | Direction the property faces (e.g. `East`) |
| `ageOfProperty` | String | Property age / construction year band |
| `possessionStatus` | String | e.g. `Ready to Move`, `Under Construction` |
| `ownershipType` | String | `Freehold`, `Leasehold`, etc. |
| `availableFrom` | String | Availability date (mainly for rent) |
| `amenities` | String | Comma-separated list of amenities |
| `verified` | Boolean | MagicBricks verified listing flag |
| `isReraRegistered` | Boolean | RERA-registered project |
| `reraId` | String | RERA registration number |
| `postedDate` | String | ISO 8601 date when listed |
| `photoUrl` | String | URL of cover/main photo |
| `imageCount` | Integer | Total number of photos |
| `tagLine` | String | Short marketing tagline / subtitle |
| `description` | String | Full property description |
| `source` | String | Always `magicbricks.com` |
| `scrapedAt` | String | ISO 8601 timestamp of extraction |

---

### 💰 Pricing

**$0.90 per 1,000 results** — you only pay for successfully retrieved listings.

| Results | Cost |
|---------|------|
| 100 | ~$0.09 |
| 1,000 | ~$0.90 |
| 10,000 | ~$9.00 |


---

### Examples

**Apartments for sale in Mumbai**
```json
{
  "startUrls": [
    { "url": "https://www.magicbricks.com/property-for-sale/residential-real-estate?proptype=Multistorey-Apartment&cityName=Mumbai" }
  ],
  "maxItems": 100
}
````

**Rentals in Bangalore**

```json
{
  "startUrls": [
    { "url": "https://www.magicbricks.com/property-for-rent/residential-real-estate?cityName=Bangalore" }
  ],
  "maxItems": 50
}
```

**New listings — last 7 days**

```json
{
  "startUrls": [
    { "url": "https://www.magicbricks.com/property-for-sale/residential-real-estate?cityName=Delhi" }
  ],
  "daysOld": 7,
  "maxItems": 200
}
```

**With full details**

```json
{
  "startUrls": [
    { "url": "https://www.magicbricks.com/property-for-sale/residential-real-estate?cityName=Pune" }
  ],
  "fetchDetails": true,
  "maxItems": 50
}
```

***

### Run it on a schedule

This actor is built for repeat use. Set it to run daily, weekly, or hourly, and the data keeps flowing without you touching it.

- **Schedule runs** — open the actor, go to Schedules, and pick a cadence. Each run only charges you for the results it returns.
- **Connect it to your stack** — push results straight to Google Sheets, Slack, a webhook, or your database using Apify Integrations. No glue code needed.
- **Pull results via API** — every run writes a clean dataset you can fetch with one API call, ready for whatever you build on top of it.

Set it once and it runs on its own.

***

### Need a custom scraper?

**[Unfenced Group](https://www.unfencedgroup.nl)** builds Apify actors for any website — for free.

If the site you need isn't in our portfolio yet, just ask. We scope, build, and publish it at no cost to you. You only pay for results — we absorb the compute and proxy costs ourselves. Same pay-per-result pricing, same quality, same standards as every actor in this portfolio.

**Get in touch:** [www.unfencedgroup.nl](https://www.unfencedgroup.nl)

# Actor input Schema

## `cities` (type: `array`):

Indian cities to scrape. Ignored when Start URLs are provided.

## `transactionTypes` (type: `array`):

Buy (for sale) and/or rent listings.

## `minPrice` (type: `integer`):

Minimum listing price in INR. Leave empty for no minimum.

## `maxPrice` (type: `integer`):

Maximum listing price in INR. Leave empty for no maximum.

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

Maximum total listings to return across all cities. Set 0 for unlimited.

## `maxPagesPerCity` (type: `integer`):

Safety cap on pagination depth per city/transaction (30 listings per page).

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

Optional MagicBricks search-results URLs. When provided, the city and transaction filters above are ignored. Apply any filters on the website and paste the resulting URL.

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

Proxy configuration. Defaults to Apify Residential proxy with India geolocation, which MagicBricks requires.

## Actor input object example

```json
{
  "cities": [
    "New-Delhi",
    "Mumbai",
    "Bangalore",
    "Hyderabad",
    "Pune"
  ],
  "transactionTypes": [
    "buy",
    "rent"
  ],
  "maxResults": 500,
  "maxPagesPerCity": 40,
  "startUrls": [],
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

## `results` (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 = {
    "maxResults": 500
};

// Run the Actor and wait for it to finish
const run = await client.actor("unfenced-group/magicbricks-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 = { "maxResults": 500 }

# Run the Actor and wait for it to finish
run = client.actor("unfenced-group/magicbricks-scraper").call(run_input=run_input)

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

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

```

## CLI example

```bash
echo '{
  "maxResults": 500
}' |
apify call unfenced-group/magicbricks-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=unfenced-group/magicbricks-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "MagicBricks India Property Scraper",
        "description": "Scrape buy/rent property listings from MagicBricks.com India. Prices, GPS, BHK, area, RERA, photos.",
        "version": "0.0",
        "x-build-id": "zPJWMjkstzmMCoskW"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/unfenced-group~magicbricks-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-unfenced-group-magicbricks-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/unfenced-group~magicbricks-scraper/runs": {
            "post": {
                "operationId": "runs-sync-unfenced-group-magicbricks-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/unfenced-group~magicbricks-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-unfenced-group-magicbricks-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": {
                    "cities": {
                        "title": "Cities",
                        "type": "array",
                        "description": "Indian cities to scrape. Ignored when Start URLs are provided.",
                        "items": {
                            "type": "string",
                            "enum": [
                                "New-Delhi",
                                "Mumbai",
                                "Bangalore",
                                "Hyderabad",
                                "Pune",
                                "Chennai",
                                "Kolkata",
                                "Gurgaon",
                                "Noida",
                                "Ahmedabad",
                                "Navi-Mumbai"
                            ],
                            "enumTitles": [
                                "Delhi/NCR",
                                "Mumbai",
                                "Bangalore",
                                "Hyderabad",
                                "Pune",
                                "Chennai",
                                "Kolkata",
                                "Gurgaon",
                                "Noida",
                                "Ahmedabad",
                                "Navi Mumbai"
                            ]
                        },
                        "default": [
                            "New-Delhi",
                            "Mumbai",
                            "Bangalore",
                            "Hyderabad",
                            "Pune"
                        ]
                    },
                    "transactionTypes": {
                        "title": "Transaction type",
                        "type": "array",
                        "description": "Buy (for sale) and/or rent listings.",
                        "items": {
                            "type": "string",
                            "enum": [
                                "buy",
                                "rent"
                            ],
                            "enumTitles": [
                                "Buy (for sale)",
                                "Rent"
                            ]
                        },
                        "default": [
                            "buy",
                            "rent"
                        ]
                    },
                    "minPrice": {
                        "title": "Min price (INR)",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Minimum listing price in INR. Leave empty for no minimum."
                    },
                    "maxPrice": {
                        "title": "Max price (INR)",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Maximum listing price in INR. Leave empty for no maximum."
                    },
                    "maxResults": {
                        "title": "Max results",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Maximum total listings to return across all cities. Set 0 for unlimited.",
                        "default": 500
                    },
                    "maxPagesPerCity": {
                        "title": "Max pages per city",
                        "minimum": 1,
                        "type": "integer",
                        "description": "Safety cap on pagination depth per city/transaction (30 listings per page).",
                        "default": 40
                    },
                    "startUrls": {
                        "title": "Start URLs (overrides filters)",
                        "type": "array",
                        "description": "Optional MagicBricks search-results URLs. When provided, the city and transaction filters above are ignored. Apply any filters on the website and paste the resulting URL.",
                        "items": {
                            "type": "object"
                        },
                        "default": []
                    },
                    "proxyConfiguration": {
                        "title": "Proxy",
                        "type": "object",
                        "description": "Proxy configuration. Defaults to Apify Residential proxy with India geolocation, which MagicBricks requires.",
                        "default": {
                            "useApifyProxy": true,
                            "apifyProxyGroups": [
                                "RESIDENTIAL"
                            ]
                        }
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
