# MagicBricks Price Trends API Documentation

Read price trends at three levels, chosen by the parameters supplied. City level (city only) returns a quarterly table of per-locality average price per square foot, price range, quarter-on-quarter change and rental yield. Locality level (locality) returns one locality snapshot with price per square foot, annual growth, demand and supply. Project level (project with locality) returns a twelve-point monthly series for the project and for its locality. Rates are integers in rupees per square foot; placeholders are dropped, never returned as zero.

- **Documentation:** [https://scrappa.co/docs/magicbricks-api/magicbricks_price_trends](https://scrappa.co/docs/magicbricks-api/magicbricks_price_trends)
- **API group:** MagicBricks API
- **Endpoint:** `GET https://scrappa.co/api/magicbricks/v1/price-trends`

## Authentication

Send your Scrappa API key in the `X-API-KEY` request header. Paid endpoints also support accountless x402 payments when called without an API key.

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `city` | string | Yes | City ref-no such as 4320 for Mumbai, or a city name resolved against /cities. Example: Mumbai. |
| `locality` | integer | No | Locality ref-no from /localities or /autocomplete, for example 78874 for Lower Parel. Required for the project level. |
| `project` | integer | No | Project id from /projects, for example 5444473. Requires locality. |
| `property_type` | string | No | Property type name or numeric code used for the project series. Defaults to flat (10002). |

## Example request

```bash
#!/bin/bash

curl -X GET \
    -H "x-api-key: YOUR_API_KEY_HERE" \
    "https://scrappa.co/api/magicbricks/v1/price-trends?city=Mumbai"
```

## Example response

```json
{
    "success": true,
    "data": {
        "level": "city",
        "city": "Mumbai",
        "localities": [
            {
                "locality": "Bangur Nagar",
                "locality_id": 94053,
                "avg_price_per_sqft": 31244,
                "price_range": "22,797-39,692",
                "qoq_percent": 25,
                "yield_percent": 2.9,
                "quarter": "Jul-Sep 2026"
            }
        ]
    },
    "meta": {
        "endpoint_family": "price_trends",
        "billable": true
    }
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 422 | Validation Error | A public parameter is missing or invalid, or a city, locality or property type cannot be resolved. No upstream call is made and the response is not billable. |
| 404 | Resource Not Found | The requested MagicBricks resource does not exist. The response is not billable. |
| 503 | Unexpected Upstream Response | MagicBricks answered with a body that is not the documented shape. The response is not billable. |
| 503 | Upstream Unavailable | The upstream service is temporarily unavailable. Please retry shortly. |

## More Scrappa resources

- [API documentation](https://scrappa.co/docs)
- [Full LLM-readable API reference](https://scrappa.co/llms-full.txt)
- [OpenAPI specification](https://scrappa.co/docs/api.json)
- [Pricing](https://scrappa.co/pricing)
