# Bproperty Categories API Documentation

Scrappa's `GET /api/bproperty/categories` lists the property categories, such as apartment, house, office or shop, with the ids for the `category` filter of the search endpoint.

## What you get

Each category has `id`, `name`, `slug`, `property_type` (Residential, Commercial or Agricultural), `description` and `image`. Set `type` to `residential` or `commercial` to list one group.

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

## 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 |
| --- | --- | --- | --- |
| `type` | string | No | residential or commercial. |

## Example request

```bash
#!/bin/bash

curl -X GET \
    -H "x-api-key: YOUR_API_KEY_HERE" \
    "https://scrappa.co/api/bproperty/categories?type=residential"
```

## Example response

```json
{
    "success": true,
    "total": 1,
    "categories": [
        {
            "id": "1fn9ieyhdl7vgya",
            "name": "Apartment",
            "slug": "apartment",
            "property_type": "Residential",
            "description": "An apartment, flat or unit is a self-contained housing unit."
        }
    ],
    "meta": {
        "endpoint_family": "categories",
        "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)
