# MagicBricks Scraper (`datascrapers/magicbricks-scraper`) Actor

Scrape property listings from MagicBricks using search queries or start URLs. Extract prices, amenities, seller details, and optional listing-page extras.

- **URL**: https://apify.com/datascrapers/magicbricks-scraper.md
- **Developed by:** [Data Scrapers](https://apify.com/datascrapers) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.20 / 1,000 dataset items

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

**MagicBricks Scraper** creates a structured dataset of property listings collected from MagicBricks. Each dataset item can include the listing id, title, price, locality, bedrooms, and area. Query the source with a city and a sale or rent category, control the result limit with maxItems, and retrieve records through the Apify Dataset API or export them as JSON, CSV, Excel, XML, or another supported format.

[![MagicBricks Scraper — input to structured data](https://raw.githubusercontent.com/faizanalii/apify-actor-assets/main/magicbricks-scraper/magicbricks-scraper-value-demo.gif)](https://apify.com/datascrapers/magicbricks-scraper)

### Dataset at a glance

| Property | Value |
|---|---|
| Source | magicbricks.com |
| Record unit | One property listing |
| Input methods | searchQueries, category |
| Main identifiers | listingId, url |
| Delivery | Apify Dataset and API |
| Export formats | JSON, CSV, Excel, XML |
| Update model | Fresh records per Actor run |
| Pricing | $2.50 per 1,000 listings on the free plan |

### Coverage and available records

A city search returns sale or rent listings. The stored Bangalore sale includes a 3-bedroom apartment in Lakkondahalli, price 2.69 Cr, 1,900 square feet, on floor 40 of 55. listingId is 84303549.

Set extractListingDetails to attach extra fields. Those extras are a separate listing-details event. maxItems limits listings. The Actor does not enquire or book a visit.

### Data dictionary

| Field | Type | Nullable | Description | Example |
|---|---|---:|---|---|
| listingId | string | no | Listing id. Use this field to deduplicate. | 84303549 |
| url | string | yes | Listing URL. | https://www.magicbricks.com/propertyDetails/3-BHK-1900-Sq-ft-Multistorey-Apartment-FOR-Sal |
| title | string | yes | Listing title. | 3BHK Multistorey Apartment for New Property in Lakkondahalli |
| propertyType | string | yes | Property type. | Apartment |
| category | string | yes | sale or rent. | sale |
| price | number | yes | Numeric price. | 26959100 |
| priceDisplay | string | yes | Price text. | 2.69 Cr |
| bedrooms | number | yes | Bedroom count. | 3 |
| bathrooms | number | yes | Bathroom count. | 2 |
| areaValue | number | yes | Area amount. | 1900 |
| areaUnit | string | yes | Area unit. | Sq-ft |
| locality | string | yes | Locality name. | Lakkondahalli |
| city | string | yes | City. | |

### Example dataset record

```json
{
  "listingId": 84303549,
  "title": "3BHK Multistorey Apartment for New Property in Lakkondahalli",
  "propertyType": "Apartment",
  "category": "sale",
  "price": 26959100,
  "priceDisplay": "2.69 Cr",
  "bedrooms": 3,
  "areaValue": 1900,
  "areaUnit": "Sq-ft",
  "locality": "Lakkondahalli"
}
```

This is a stored Bangalore sale listing.

### Query and input reference

| Input | Type | Required | Default | Accepted values | Description |
|---|---|---:|---|---|---|
| searchQueries | array | no | empty | city names | Cities to search. |
| category | string | no | schema default | sale or rent | Listing category. |
| extractListingDetails | boolean | no | false | true or false | Attach extras and charge listing-details. |
| maxItems | integer | no | schema default | integer | Listing cap. |
| maxConcurrency | integer | no | schema default | positive integer | Parallel reads. |
| proxyConfiguration | object | no | Apify residential | Apify proxy input | Optional proxy. |

Minimal request:

```json
{"searchQueries": ["Bangalore"], "category": "sale", "maxItems": 5}
```

### Retrieve the data through the API

Start the Actor with JSON input, wait for the run, then read the default dataset.

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_API_TOKEN>")
run = client.actor("datascrapers/magicbricks-scraper").call(run_input={
    "searchQueries": ["Bangalore"],
    "category": "sale",
    "maxItems": 5,
})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item.get("listingId"), item.get("priceDisplay"))
```

### Data quality and record handling

Deduplicate on listingId. price is the numeric amount. priceDisplay is the text on the listing. A later run can show a new price for the same id.

### Pricing and cost examples

Pay per event. dataset-item is $2.50 per 1,000 on Free, $2.40 on Bronze, $2.30 on Silver, and $2.20 on Gold. listing-details is $3.00, $2.90, $2.80, and $2.70 per 1,000. Platinum and Diamond use the Gold price. Platform usage is included. Saving 1,000 listings without extras costs $2.50 on Free.

### Limitations and responsible data use

The Actor reads public listings. It does not contact a seller. MagicBricks can change a price or withhold a city. Use the data in line with MagicBricks terms.

### Dataset questions

#### What is one record?

One listing, keyed by listingId.

#### Which field should I use to deduplicate?

listingId.

#### When is listing-details charged?

When extractListingDetails is true and the extra fields are saved.

### Related datasets from Data Scrapers

- [Bayut Scraper](https://apify.com/datascrapers/bayut-sa-scraper)
- [Trulia Scraper](https://apify.com/datascrapers/trulia-scraper)
- [Hemnet Scraper](https://apify.com/datascrapers/hemnet-se-scraper)
- [Daft Scraper](https://apify.com/datascrapers/daft-ie-scraper)

### Data Scrapers support

Questions about this dataset: stardustspotlight@gmail.com.

# Actor input Schema

## `searchQueries` (type: `array`):

Locations to search on MagicBricks (e.g. "Bangalore", "Whitefield", "Delhi NCR"). Primary input for AI agents — no URL required. The first city or locality match is used.

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

MagicBricks search or listing URLs (e.g. "https://www.magicbricks.com/property-for-sale/residential-real-estate?cityName=Bangalore" or a propertyDetails page). Optional — filters still apply to query-based searches.

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

Buy or rent inventory. Applies to search queries and start URLs that do not already encode a category.

## `propertyTypes` (type: `array`):

Restrict results to these property types. Leave empty for the default residential mix (apartments, houses, villas).

## `bedrooms` (type: `array`):

Bedroom configuration to include (e.g. 2, 3). Leave empty for all.

## `furnishTypes` (type: `array`):

Furnishing filter (furnished, semi-furnished, unfurnished).

## `postedBy` (type: `string`):

Restrict to owners, brokers, or builders.

## `possession` (type: `string`):

Ready-to-move inventory, under construction, or no restriction.

## `saleType` (type: `string`):

New property or resale. Leave empty for both.

## `reraVerified` (type: `boolean`):

Only include RERA-approved listings when enabled.

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

Keep listings at or above this price in Indian rupees (e.g. 5000000 for ₹50 L).

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

Keep listings at or below this price in Indian rupees (e.g. 20000000 for ₹2 Cr).

## `extractListingDetails` (type: `boolean`):

Open each listing in parallel for locality info, project reviews, price trends, and page extras. Charged as listing-details only when extras are actually attached. Search-card fields are always returned.

## `maxConcurrency` (type: `integer`):

Parallel listing-detail workers (1–10). Higher is faster; each request uses a rotated residential proxy.

## `maxItems` (type: `integer`):

Maximum number of listing records to scrape (0 = unlimited).

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

Proxy settings for anti-bot protection. Apify Residential is recommended for MagicBricks.

## Actor input object example

```json
{
  "searchQueries": [
    "Bangalore"
  ],
  "startUrls": [
    {
      "url": "https://www.magicbricks.com/property-for-sale/residential-real-estate?cityName=Bangalore"
    }
  ],
  "category": "sale",
  "reraVerified": false,
  "extractListingDetails": false,
  "maxConcurrency": 5,
  "maxItems": 10,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

## `results` (type: `string`):

Dataset of scraped MagicBricks listings

## `runStats` (type: `string`):

Aggregate scrape statistics including listing and details counts

# 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 = {
    "searchQueries": [
        "Bangalore"
    ],
    "startUrls": [
        {
            "url": "https://www.magicbricks.com/property-for-sale/residential-real-estate?cityName=Bangalore"
        }
    ],
    "maxItems": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("datascrapers/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 = {
    "searchQueries": ["Bangalore"],
    "startUrls": [{ "url": "https://www.magicbricks.com/property-for-sale/residential-real-estate?cityName=Bangalore" }],
    "maxItems": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("datascrapers/magicbricks-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 '{
  "searchQueries": [
    "Bangalore"
  ],
  "startUrls": [
    {
      "url": "https://www.magicbricks.com/property-for-sale/residential-real-estate?cityName=Bangalore"
    }
  ],
  "maxItems": 10
}' |
apify call datascrapers/magicbricks-scraper --silent --output-dataset

```

## MCP server setup

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