# MagicBricks Property Scraper 🏠 (`shahidirfan/magicbricks-property-scraper`) Actor

Scrape residential & commercial properties from India's largest real estate platform. Extract prices, locations, amenities, seller details & contact info. Essential for investment analysis, market intelligence, competitive pricing research & property portfolio tracking.

- **URL**: https://apify.com/shahidirfan/magicbricks-property-scraper.md
- **Developed by:** [Shahid Irfan](https://apify.com/shahidirfan) (community)
- **Categories:** Real estate, Developer tools, Automation
- **Stats:** 2 total users, 0 monthly users, 67.3% runs succeeded, 1 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 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.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#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

### What does MagicBricks Property Scraper do?

Extract comprehensive property listing data from MagicBricks, India's largest real estate platform. Paste a search results URL and collect villas, apartments, houses, plots, and rental listings including prices, area, furnishing, bedrooms, seller details, amenities, images, nearby landmarks, and project context. Built for investment analysis, market research, pricing intelligence, and property portfolio tracking.

### Why use MagicBricks Property Scraper?

- **Reliable dataset creation** - Collect structured property data from MagicBricks without manual copy-paste or repetitive workflows.
- **Automation-ready output** - Export results to JSON, CSV, Excel, XML, or push them to Google Sheets, webhooks, and no-code platforms.
- **Use-case fit** - Supports real estate market research, lead generation, competitor pricing analysis, and scheduled listing monitoring.

### What data can you extract from MagicBricks?

| Field | Description |
|-------|-------------|
| `title` | Property listing title |
| `price` | Listing price and per-square-foot rate |
| `bedrooms` / `bathrooms` / `balconies` | Room counts |
| `propertyType` | Villa, apartment, house, plot, or flat |
| `city` / `locality` | Location information |
| `areaSqft` / `carpetArea` / `landArea` | Property dimensions |
| `furnishing` / `facing` / `ownership` / `status` | Property features |
| `advertiserName` / `contactType` | Seller details |
| `amenities` / `nearbyLandmarks` | Community features |
| `coordinates` / `images` / `videoUrl` | Media and geo data |

### How to use MagicBricks Property Scraper

1. Open the Actor on Apify Store.
2. Paste a MagicBricks search results URL (category page, locality page, or bedroom-filtered page).
3. Set the number of listings you need and optional page limit.
4. Run the Actor.
5. Download the dataset or connect it to your workflow.

### Input Parameters

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| `url` | String | Yes | `https://www.magicbricks.com/villa-for-sale-in-bangalore-pppfs` | MagicBricks search results URL to scrape |
| `results_wanted` | Integer | No | `20` | Maximum number of listings to collect |
| `max_pages` | Integer | No | `3` | Maximum number of result pages to visit |
| `proxyConfiguration` | Object | No | `{ "useApifyProxy": true }` | Apify proxy settings |

### Output Data

Each dataset item can include:

| Field | Type | Description |
|-------|------|-------------|
| `id` | String | MagicBricks listing ID |
| `title` | String | Listing title |
| `propertyType` | String | Property type label |
| `transactionType` | String | Transaction type |
| `listingType` | String | Sale or rent |
| `city` | String | City name |
| `locality` | String | Locality name |
| `listingUrl` | String | Full listing detail URL |
| `pageUrl` | String | Search result page URL |
| `pageNumber` | Number | Result page number |
| `price` | Number | Listing price |
| `priceText` | String | Human-readable price |
| `minPrice` | Number | Minimum price shown |
| `maxPrice` | Number | Maximum price shown |
| `pricePerSqft` | Number | Price per square foot |
| `areaSqft` | Number | Area in square feet |
| `areaText` | String | Human-readable area |
| `carpetArea` | String | Carpet area value |
| `landArea` | String | Land area value |
| `bedrooms` | String | Bedroom count |
| `bathrooms` | String | Bathroom count |
| `balconies` | String | Balcony count |
| `furnishing` | String | Furnishing status |
| `facing` | String | Facing direction |
| `ownership` | String | Ownership type |
| `status` | String | Possession status |
| `ageOfConstruction` | String | Construction age band |
| `parking` | String | Parking availability |
| `advertiserName` | String | Seller name |
| `contactType` | String | Owner or agent |
| `projectName` | String | Project or society name |
| `developerName` | String | Developer name |
| `project` | Object | Project details |
| `seoDescription` | String | Listing summary |
| `detailedDescription` | String | Cleaned description |
| `shortDescription` | String | Short description |
| `amenities` | Array | Amenity names |
| `nearbyLandmarks` | Array | Nearby landmarks |
| `coordinates` | Object | Latitude and longitude |
| `images` | Array | Listing image URLs |
| `imageCount` | Number | Image count |
| `videoUrl` | String | Video URL |
| `source` | String | Data source |

### Usage Examples

#### Basic Villa Search

Collect listings from the default Bangalore villas page:

```json
{
  "url": "https://www.magicbricks.com/villa-for-sale-in-bangalore-pppfs",
  "results_wanted": 20,
  "max_pages": 2
}
```

#### Bedroom Filter URL

Collect listings from a filtered MagicBricks results page:

```json
{
  "url": "https://www.magicbricks.com/4-bhk-villa-for-sale-in-bangalore-pppfs",
  "results_wanted": 30,
  "max_pages": 3
}
```

#### Rentals and Other Categories

Scrape rental listings or other property types like apartments, houses, or plots:

```json
{
  "url": "https://www.magicbricks.com/flat-for-rent-in-bangalore-pppfs",
  "results_wanted": 25,
  "max_pages": 2
}
```

### Sample Output

```json
{
  "id": "85289623",
  "title": "4BHK Villa for Resale in Budigere",
  "listingUrl": "https://www.magicbricks.com/propertyDetails-4-BHK-3195-Sqft-Villa-FOR-Sale-Budigere-in-Bangalore&id=AQAKzLzZnE9zpSvf+uAgZw==&category=Sale",
  "pageUrl": "https://www.magicbricks.com/villa-for-sale-in-bangalore-pppfs",
  "pageNumber": 1,
  "propertyType": "Villa",
  "transactionType": "Resale",
  "listingType": "Sale",
  "city": "Bangalore",
  "locality": "Budigere",
  "price": 19500000,
  "priceText": "1.95 Cr",
  "pricePerSqft": 6103,
  "bedrooms": "4",
  "bathrooms": "4",
  "balconies": "1",
  "furnishing": "Unfurnished",
  "facing": "West",
  "ownership": "Freehold",
  "status": "Ready to Move",
  "areaSqft": 3195,
  "areaText": "3195 Sq-ft",
  "carpetArea": "1950",
  "advertiserName": "Poonam",
  "contactType": "Owner",
  "amenities": [
    "Banquet Hall",
    "Jogging and Strolling Track",
    "Outdoor Tennis Courts",
    "Visitor Parking",
    "Conference Room"
  ],
  "nearbyLandmarks": [
    { "categoryId": "19210", "name": "Budigere Bus Stop" },
    { "categoryId": "19202", "name": "New Baldwin International School" }
  ],
  "coordinates": {
    "latitude": 13.135110855102539,
    "longitude": 77.74694061279297
  },
  "imageCount": 9,
  "source": "magicbricks"
}
```

### Tips for Best Results

- Use MagicBricks search result pages, not individual property detail pages or blog pages.
- Rental URLs with `for-rent` in the path are detected and handled correctly.
- Start with `results_wanted: 20` and `max_pages: 1` to validate the output before scaling up.
- The scraper stops automatically when no new listings are found on a page.
- Leave proxy enabled for cloud runs. Disable only when your network can reach MagicBricks reliably.

### Integrations

- **Google Sheets** - Export results for spreadsheet analysis.
- **Airtable** - Build searchable property databases.
- **Make** - Trigger downstream automations.
- **Zapier** - Send listing data into business workflows.
- **Webhooks** - Push results into your own systems.

#### Export Formats

- **JSON** - For APIs and developers.
- **CSV** - For spreadsheets and quick analysis.
- **Excel** - For reporting and sharing.
- **XML** - For system integrations.

### Related Actors

- [Homes.com Property Scraper](https://apify.com/shahidirfan/homes-com-property-scraper) - Extract property data from Homes.com listings including prices, locations, specs, and agent contact info.
- [Housing.com Property Scraper](https://apify.com/shahidirfan/housing-com-property-scraper) - Collect property listings from Housing.com search result pages with pricing, seller details, and location data.
- [PropertyGuru Scraper](https://apify.com/shahidirfan/propertyguru-scraper) - Extract real estate data from PropertyGuru for Southeast Asian property markets.

### Frequently Asked Questions

#### What kind of MagicBricks URLs can I use?

Use MagicBricks property search result URLs. Canonical result URLs, `?page=2` variants, and `/page-2` variants are all normalized automatically before scraping begins.

#### How many listings can I collect?

The scraper collects up to the number specified in `results_wanted`. There is no hard upper limit, but very large collections may require more pages and higher proxy reliability.

#### Does the scraper work for rental listings?

Yes. URLs containing `for-rent` in the path are detected as rental searches and handled with the correct search parameters.

#### Do I have to use a proxy?

No. The actor runs without proxy unless you enable `proxyConfiguration` in the input. For cloud runs on Apify, proxy is recommended for reliable access at scale.

#### Will empty fields appear in the dataset?

No. The scraper removes null, undefined, and empty string values before saving each item. Only fields with actual data appear in the output.

#### Does the actor collect images and landmarks?

Yes. When the listing page provides them, image URLs and nearby landmarks are included in the output. Images are returned as absolute URLs for direct access.

#### What property types are supported?

Villas, apartments, flats, houses, and plots are supported. The scraper detects the property type from the URL path and applies the correct category filter.

#### What happens if a page has no more listings?

The scraper stops pagination when a page returns no listings or no new unique listings. This prevents infinite loops and wasted requests on empty pages.

### Support

For issues, feature requests, or custom Actor work, use the Issues tab on the Actor page or contact the developer through Apify.

### Legal Notice

This Actor is designed for legitimate data collection from publicly available sources. Users are responsible for using the data responsibly and complying with applicable laws and website terms.

# Actor input Schema

## `url` (type: `string`):

MagicBricks search result URL to scrape.

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

Maximum number of listings to collect.

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

Maximum number of search pages to visit.

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

Optional Apify proxy settings.

## Actor input object example

```json
{
  "url": "https://www.magicbricks.com/villa-for-sale-in-bangalore-pppfs",
  "results_wanted": 20,
  "max_pages": 3,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# 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 = {
    "url": "https://www.magicbricks.com/villa-for-sale-in-bangalore-pppfs",
    "results_wanted": 20,
    "max_pages": 3
};

// Run the Actor and wait for it to finish
const run = await client.actor("shahidirfan/magicbricks-property-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 = {
    "url": "https://www.magicbricks.com/villa-for-sale-in-bangalore-pppfs",
    "results_wanted": 20,
    "max_pages": 3,
}

# Run the Actor and wait for it to finish
run = client.actor("shahidirfan/magicbricks-property-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 '{
  "url": "https://www.magicbricks.com/villa-for-sale-in-bangalore-pppfs",
  "results_wanted": 20,
  "max_pages": 3
}' |
apify call shahidirfan/magicbricks-property-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/acts/6AUcAe7fbuAKhgqJf/builds/9JMvdTgnP34vhROH2/openapi.json
