{
  "openapi": "3.0.1",
  "info": {
    "title": "MagicBricks Property Scraper - India Buy & Rent Listings",
    "description": "Scrape MagicBricks listings in any Indian city: price, BHK, carpet area, floor, furnishing, possession, GPS, amenities and the posting owner or agent. Buy and rent.",
    "version": "1.0",
    "x-build-id": "S8dksf50tQ9URNzPo"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/sian.agency~magicbricks-property-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-sian.agency-magicbricks-property-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/sian.agency~magicbricks-property-scraper/runs": {
      "post": {
        "operationId": "runs-sync-sian.agency-magicbricks-property-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/sian.agency~magicbricks-property-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-sian.agency-magicbricks-property-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": {
          "operation": {
            "title": "🎯 What do you want to scrape?",
            "enum": [
              "search",
              "detail"
            ],
            "type": "string",
            "description": "Pick one per run. Property Search returns listing rows for a city, locality and property type; Property Detail takes MagicBricks property URLs and returns the exact rupee price, posting date, full description and the complete photo set.",
            "default": "search"
          },
          "cities": {
            "title": "🏙️ Indian cities",
            "type": "array",
            "description": "Cities to search, e.g. Mumbai, New Delhi, Bangalore, Pune, Hyderabad, Chennai, Kolkata, Ahmedabad, Noida, Gurgaon. One search runs per city, so three cities return roughly three times the rows. This is how you get past the 3,000-listing ceiling MagicBricks puts on any single search. Write Bangalore, not Bengaluru.",
            "default": [
              "Mumbai"
            ],
            "items": {
              "type": "string"
            }
          },
          "listingType": {
            "title": "🏷️ Buy or rent",
            "enum": [
              "sale",
              "rent"
            ],
            "type": "string",
            "description": "Whether to search properties for sale or properties for rent. Rent prices are monthly.",
            "default": "sale"
          },
          "propertyType": {
            "title": "🏠 Property type",
            "enum": [
              "flats",
              "property",
              "independent-house",
              "builder-floor",
              "villa",
              "studio-apartment",
              "penthouse",
              "farm-house",
              "office-space",
              "showroom",
              "commercial-land",
              "agricultural-land"
            ],
            "type": "string",
            "description": "Which kind of property to search. 'Every property type' takes residential and commercial together. Flats is by far the deepest inventory in every city.",
            "default": "flats"
          },
          "bedrooms": {
            "title": "🛏️ BHK",
            "enum": [
              "any",
              "1",
              "2",
              "3",
              "4",
              "5"
            ],
            "type": "string",
            "description": "Restrict to a bedroom count. Applies to flats only — MagicBricks does not offer a BHK filter on houses, land or commercial property, so it is ignored for those types.",
            "default": "any"
          },
          "localities": {
            "title": "📍 Localities",
            "type": "array",
            "description": "Narrow each city to named localities, e.g. Andheri West, Powai, Whitefield, Baner. Each locality runs as its own search against every city listed above, which is the way to build a dataset larger than one city's 3,000-listing ceiling. Leave empty to take the whole city.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "maxResults": {
            "title": "🔢 Max listings",
            "minimum": 1,
            "maximum": 20000,
            "type": "integer",
            "description": "Stop after this many listings across every city and locality. Each page returns 30, so the run stops at the first page that crosses your limit.",
            "default": 60
          },
          "includeDetails": {
            "title": "📄 Fetch full property pages",
            "type": "boolean",
            "description": "Open each listing's own page to add the exact rupee price, the posting date, the full description, the developer and age of construction, and the complete photo set instead of one thumbnail. Costs one extra request per listing and bills the Property Detail event on top of the search row.",
            "default": false
          },
          "propertyUrls": {
            "title": "🔗 Property URLs",
            "type": "array",
            "description": "Used by the Property Detail operation: MagicBricks property URLs to expand, in the www.magicbricks.com/propertyDetails/…&id=… form you get from a listing page.",
            "default": [],
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "searchUrls": {
            "title": "🌐 Search URLs",
            "type": "array",
            "description": "Paste MagicBricks result-page URLs instead of filling the fields above. Build the search you want on the site with any filters it offers — budget, area, possession, posted-by — then paste the URL here and every one of those filters is honoured, because the page itself does the filtering.",
            "default": [],
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}