# Bproperty Cities API Documentation

Scrappa's `GET /api/bproperty/cities` lists the cities of Bangladesh that Bproperty knows, with the ids for the `city` filter of the search endpoint.

## Notes

The endpoint has no parameters and returns one list sorted by name. Entries that are not real city names are left out. `total` is the number of cities returned.

- **Documentation:** [https://scrappa.co/docs/bproperty-api/bproperty_cities](https://scrappa.co/docs/bproperty-api/bproperty_cities)
- **API group:** Bproperty API
- **Endpoint:** `GET https://scrappa.co/api/bproperty/cities`

## 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.

## Example request

```bash
#!/bin/bash

curl -X GET \
    -H "x-api-key: YOUR_API_KEY_HERE" \
    "https://scrappa.co/api/bproperty/cities"
```

## Example response

```json
{
    "success": true,
    "total": 2,
    "cities": [
        {
            "id": "eyz5vhrduc9tsk0",
            "name": "Dhaka"
        },
        {
            "id": "huv8j1i5ub7ltiy",
            "name": "Chattogram"
        }
    ],
    "meta": {
        "endpoint_family": "cities",
        "billable": true,
        "attempts": 1
    }
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 422 | Validation Error | A query parameter is missing, unknown or unusable. Unknown parameters and unknown values are rejected, never ignored. Non-billable. |
| 503 | Upstream Unavailable | Bproperty could not be reached after one retry, answered with an error or changed its format (`upstream_unavailable`, `upstream_blocked`, `parser_drift`). Retryable and never billed. Clients are never rate limited. |

## 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)
