# MagicBricks Scraper: Rent & Sale, 16 Fields, No Browser (`themineworks/magicbricks-scraper`) Actor

Scrape MagicBricks property listings across Indian cities: price, BHK, area, project, locality, poster and listing date. Rent or sale. Parses the site's structured schema.org data: no login, no browser, pay per property. Use it as an MCP server in Claude, ChatGPT & AI agents.

- **URL**: https://apify.com/themineworks/magicbricks-scraper.md
- **Developed by:** [The Mine Works](https://apify.com/themineworks) (community)
- **Categories:** Real estate, Lead generation, MCP servers
- **Stats:** 5 total users, 3 monthly users, 80.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.60 / 1,000 property scrapeds

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?

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

## MagicBricks Scraper: Rent & Sale, 16 Fields, No Browser

Pay only for results delivered. [Browse all Actors](https://apify.com/themineworks).

Scrape MagicBricks property listings across Indian cities: price, BHK, area, project, locality, poster and listing date. Rent or sale. Parses the site's structured schema.org data: no login, no browser, pay per property. Use it as an MCP server in Claude, ChatGPT & AI agents.

💰 From $0.60 / 1,000 results.

> ⚡ Part of a 74-scraper suite with 8,800+ runs · no login, no cookies, no ban risk.
>
> 💸 You are only charged for delivered results. Empty searches, failed pages and duplicates are never billed.

### Scrape 2 BHK rentals in Bangalore

The default recipe. `city` is free text, pass any city name MagicBricks uses in its own
`cityName` URL parameter (Bangalore, Mumbai, Pune, Hyderabad, Chennai, Delhi, Noida…).

```json
{
  "city": "Bangalore",
  "listingType": "RENT",
  "bedrooms": ["2"],
  "maxResults": 100
}
```

### Scrape flats for sale across several BHK sizes

`bedrooms` accepts up to 5 values and each one is fetched as its own MagicBricks search page, so
this is how you widen a run rather than running it three times.

```json
{
  "city": "Pune",
  "listingType": "BUY",
  "bedrooms": ["2", "3", "4"],
  "maxResults": 200
}
```

### Monitor MagicBricks asking prices city by city

`price` and `area_sqft` come back as numbers and `listed_at` is a real timestamp, so a scheduled
run against the same city and BHK gives you a clean price-per-sqft time series.

```json
{
  "city": "Hyderabad",
  "listingType": "RENT",
  "bedrooms": ["3"],
  "maxResults": 150
}
```

### Why use this MagicBricks scraper

MagicBricks is one of India's two largest property portals. This actor reads its public
listing surface and returns one clean record per property: a stable property id, the listing
title, whether it is for rent or sale, the numeric price with currency, BHK count, property type,
built-up area in square feet, the named project or society, locality, city, who posted it, the
listing and expiry timestamps, and a canonical URL: 16 fields in total, read from the schema.org JSON-LD MagicBricks publishes on its own search pages, so there is no browser and no HTML-layout fragility.

Price and area come back as numbers, not display strings, so you can sort and aggregate without
parsing "₹50,000" or "1,240 sqft" first.

### All MagicBricks scraper input options

| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| `city` | string | no | `"Bangalore"` | Indian city name, e.g. Bangalore, Mumbai, Pune. |
| `listingType` | string | no | `"RENT"` | Rent or sale listings. |
| `bedrooms` | array | no | `["2"]` | BHK counts to search, e.g. 2 and 3. Each is a separate search page. |
| `maxResults` | integer | no | `25` | Maximum properties to return. |

### What data you get from each MagicBricks listing

One record per property, up to 16 fields. Field list and example below are taken from a real run, not a mock-up.

| Field | Type | Example |
|---|---|---|
| `property_id` | string | `"4d423632373632343835"` |
| `title` | string | `"2 BHK Apartment for Rent in Rajajinagar Ba…` |
| `listing_type` | string | `"RENT"` |
| `price` | number | `50000` |
| `price_currency` | string | `"INR"` |
| `bhk` | number | `2` |
| `property_type` | string | `"Apartment"` |
| `area_sqft` | number | `1240` |
| `project` | string | `"Puravankara Purva Sunflower"` |
| `locality` | string | `"Rajajinagar"` |
| `city` | string | `"Bangalore"` |
| `posted_by` | string | `"Salman"` |
| `listed_at` | string | `"2026-07-26T23:45:22.000Z"` |
| `expires_at` | string | `"2026-09-24T23:45:22.000Z"` |
| `url` | string | `"https://www.magicbricks.com/propertyDetail%E2%80%A6%60%20||%20%60scraped_at%60%20|%20string%20|%20%60"2026-07-27T08:24:12.230Z"` |

#### Example output

```json
{
  "property_id": "4d423632373632343835",
  "title": "2 BHK Apartment for Rent in Rajajinagar Bangalore",
  "listing_type": "RENT",
  "price": 50000,
  "price_currency": "INR",
  "bhk": 2,
  "property_type": "Apartment",
  "area_sqft": 1240,
  "project": "Puravankara Purva Sunflower",
  "locality": "Rajajinagar",
  "city": "Bangalore",
  "posted_by": "Salman",
  "listed_at": "2026-07-26T23:45:22.000Z",
  "expires_at": "2026-09-24T23:45:22.000Z",
  "url": "https://www.magicbricks.com/propertyDetails/2-BHK-1240-Sq-ft-Multistorey-Apartment-FOR-Rent-Rajaji-Nagar-in-Bangalore&id=4d423632373632343835",
  "scraped_at": "2026-07-27T08:24:12.230Z"
}
```

### What people use MagicBricks property data for

- **Rental yield analysis.** Pull rent and sale listings for the same locality and compute gross yield per BHK band.
- **Locality price tracking.** Run weekly to build a time series of asking prices per locality and project.
- **Project-level supply monitoring.** The `project` field groups listings by named development, showing how much inventory a builder has live.
- **Broker versus owner mix.** `posted_by` reveals how much of a market's supply is intermediated.
- **Relocation and site-selection research.** Compare price per square foot across cities on a like-for-like BHK basis.

### MagicBricks scraper FAQ

#### Which cities are covered?

Any city MagicBricks itself lists. The city is an input, so coverage matches the portal's own.

#### Rent or sale?

Both. Set `listingType`. Every record also carries `listing_type` so mixed datasets stay unambiguous.

#### Is `area_sqft` the carpet area or the built-up area?

It is the area MagicBricks displays on the listing, which is normally built-up. The portal does not consistently label which basis a given lister used, so the value is passed through rather than relabelled.

#### Why does the title format vary between runs?

MagicBricks serves different title formats to different exit IPs. The parser handles both known formats and fills `locality` and `city` from the request context rather than trusting the title, so the structured fields stay correct either way.

### What does it cost to scrape MagicBricks listings

Pay per event: one `property-scraped` event per delivered record, charged only **after** the record is validated and stored. Empty results, blocked pages and duplicates are never charged. Store discounts apply automatically on paid Apify plans.

#### What a run with no results costs

Every run is charged one Actor Start event of $0.00005, including a run that returns nothing. The per-result charge is separate and genuinely does not fire on an empty, blocked or duplicate result, so a run that finds nothing costs $0.00005 and no more.

### Use MagicBricks data in Claude, ChatGPT & any MCP agent

This actor runs as an MCP server, so an AI agent can call it directly:

```
https://mcp.apify.com/?tools=themineworks/magicbricks-scraper
```

```python
from apify_client import ApifyClient
client = ApifyClient("YOUR_APIFY_TOKEN")
run = client.actor("themineworks/magicbricks-scraper").call(run_input={"city": "Bangalore", "listingType": "RENT", "bedrooms": ["2"], "maxResults": 10})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)
```

### Is scraping MagicBricks listings legal

This actor collects only publicly available information: the same data any visitor can see without logging in. It does not access private or authenticated areas, does not attempt to bypass paywalls, and collects no personal data beyond what the source already publishes openly. You are responsible for using the output in line with the source site's terms and with the data protection law that applies to you.

MIT © [The Mine Works](https://apify.com/themineworks)

*Last verified: 2026-08*

# Actor input Schema

## `city` (type: `string`):

Indian city name, e.g. Bangalore, Mumbai, Pune.

## `listingType` (type: `string`):

Whether to search rental or for-sale property listings on MagicBricks, e.g. RENT for flats to let or BUY for flats for sale.

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

BHK counts to search, e.g. 2 and 3. Each is a separate search page.

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

Maximum number of properties to return across all searched BHK counts. Higher values cost more runtime.

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

Defaults to datacenter (measured live: identical results to residential, cheaper). Residential is used automatically as a one-shot fallback if a request fails on datacenter.

## `allowResidentialFallback` (type: `boolean`):

If a request fails on the default datacenter proxy, retry it once on Indian residential before giving up. On by default. Turn off to force datacenter-only.

## Actor input object example

```json
{
  "city": "Bangalore",
  "listingType": "RENT",
  "bedrooms": [
    "2"
  ],
  "maxResults": 10,
  "proxyConfiguration": {
    "useApifyProxy": true
  },
  "allowResidentialFallback": true
}
```

# 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 = {
    "city": "Bangalore",
    "listingType": "RENT",
    "bedrooms": [
        "2"
    ],
    "maxResults": 10,
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("themineworks/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 = {
    "city": "Bangalore",
    "listingType": "RENT",
    "bedrooms": ["2"],
    "maxResults": 10,
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("themineworks/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 '{
  "city": "Bangalore",
  "listingType": "RENT",
  "bedrooms": [
    "2"
  ],
  "maxResults": 10,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call themineworks/magicbricks-scraper --silent --output-dataset

```

## MCP server setup

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