{
  "openapi": "3.0.1",
  "info": {
    "title": "Magicbricks Properties and Details Scraper",
    "description": "Permission-gated Magicbricks property detail scraper. Written authorization is required for automated retrieval and reuse; default runs make zero source requests.",
    "version": "1.0",
    "x-build-id": "BZxnIWAzhomte3r2c"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/realestateapi~magicbricks-properties-and-details-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-realestateapi-magicbricks-properties-and-details-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/realestateapi~magicbricks-properties-and-details-scraper/runs": {
      "post": {
        "operationId": "runs-sync-realestateapi-magicbricks-properties-and-details-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/realestateapi~magicbricks-properties-and-details-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-realestateapi-magicbricks-properties-and-details-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": {
          "authorizationConfirmed": {
            "title": "Current written authorization confirmed",
            "type": "boolean",
            "description": "Operator attestation that current written authorization permits automated retrieval and the intended reuse of Magicbricks content. Retained for provenance only: per the 2026-11-16 written-permission attestation the policy gate is removed, so this flag no longer blocks collection. It does not grant permission or override the source's Terms.",
            "default": false
          },
          "propertyUrls": {
            "title": "Property detail URLs",
            "minItems": 0,
            "maxItems": 50,
            "type": "array",
            "description": "HTTPS Magicbricks propertyDetails URLs copied from public listing pages.",
            "items": {
              "type": "string",
              "pattern": "^https://(?:www\\.)?magicbricks\\.com/propertyDetails/"
            },
            "default": [
              "https://www.magicbricks.com/propertyDetails/3-BHK-1450-Sq-ft-Multistorey-Apartment-FOR-SALE-Mira-Road-in-Mumbai&id=4d423836303735363837"
            ]
          },
          "searchUrls": {
            "title": "Public search URLs (discovery)",
            "maxItems": 20,
            "type": "array",
            "description": "Optional HTTPS Magicbricks search URLs for city/category discovery. Bounded pagination yields official propertyDetails links, which are then enriched with the existing detail parser.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "maxPages": {
            "title": "Maximum search pages",
            "minimum": 1,
            "maximum": 3,
            "type": "integer",
            "description": "Bounded number of discovery pages (deterministic ?page=N pagination).",
            "default": 1
          },
          "maxRequests": {
            "title": "Maximum source requests",
            "minimum": 1,
            "maximum": 40,
            "type": "integer",
            "description": "Hard cap on total requests (search pages plus detail pages) for one run.",
            "default": 40
          },
          "maxConcurrency": {
            "title": "Maximum concurrency",
            "minimum": 1,
            "maximum": 2,
            "type": "integer",
            "description": "Bound on simultaneous requests; collection is sequential, so 1 is always honored.",
            "default": 1
          },
          "includeDetails": {
            "title": "Fetch property details",
            "type": "boolean",
            "description": "Enrich discovered detail URLs with the existing public detail parser. Defaults to true.",
            "default": true
          },
          "testMode": {
            "title": "Bounded test mode",
            "type": "boolean",
            "description": "When true, caps the run to 1 page and 6 total requests. Does not change the source authorization boundary.",
            "default": false
          },
          "maxItems": {
            "title": "Maximum properties",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Maximum unique property records to save.",
            "default": 10
          },
          "requestDelayMs": {
            "title": "Request delay (ms)",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Delay between public detail-page requests.",
            "default": 250
          },
          "requestTimeoutSecs": {
            "title": "Request timeout (seconds)",
            "minimum": 5,
            "maximum": 120,
            "type": "integer",
            "description": "Maximum time to wait for one public detail page.",
            "default": 30
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional standard Apify proxy configuration. When supplied with useApifyProxy (or explicit proxy URLs), source requests are routed through the resolved proxy. Omit this property to keep the current direct-request behavior unchanged.",
            "properties": {
              "useApifyProxy": {
                "title": "Use Apify Proxy",
                "type": "boolean",
                "description": "Whether to use Apify Proxy for the requests."
              },
              "apifyProxyGroups": {
                "title": "Apify Proxy groups",
                "type": "array",
                "description": "Apify Proxy groups to use (e.g. RESIDENTIAL).",
                "items": {
                  "type": "string"
                }
              },
              "apifyProxyCountry": {
                "title": "Apify Proxy country",
                "type": "string",
                "description": "Two-letter country code to route the Apify Proxy through."
              }
            },
            "additionalProperties": true
          }
        }
      },
      "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}