# Immoweb Search Count API Documentation

Scrappa's `GET /api/immoweb/count` endpoint returns how many Immoweb listings match a filter set, without returning any listings.

## Why this is a separate endpoint

Every Immoweb search response already carries `x_count` and `x_count_with_geopoint` in its own response, so a search never needs an extra count call and you are never charged for a hidden lookup. This endpoint exists for the case where you want to size a market before you fetch any rows — for example, to decide how many pages a crawl will take or to report market volume.

It accepts the same filters as search and is billed as its own lookup, because it is one.

## Related endpoints

Use [Immoweb Search](/docs/immoweb-api/immoweb_search) to fetch the listings themselves, and [Location Autocomplete](/docs/immoweb-api/immoweb_locations) to resolve place names into filters.

- **Documentation:** [https://scrappa.co/docs/immoweb-api/immoweb_count](https://scrappa.co/docs/immoweb-api/immoweb_count)
- **API group:** Immoweb API
- **Endpoint:** `GET https://scrappa.co/api/immoweb/count`

## 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 |
| --- | --- | --- | --- |
| `transactionTypes` | string | Yes | FOR_SALE or FOR_RENT. Required. |
| `propertyTypes` | string | No | Property type filter. |
| `postalCodes` | string | No | Comma-separated Belgian postal codes. |
| `provinces` | string | No | Unprefixed province codes. |
| `priceType` | string | No | Price basis filter. |

## Example request

```bash
#!/bin/bash

curl -X GET \
    -H "x-api-key: YOUR_API_KEY_HERE" \
    "https://scrappa.co/api/immoweb/count?transactionTypes=FOR_SALE&postalCodes=BE-9000"
```

## Example response

```json
{
    "success": true,
    "count": 3812
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 422 | Validation Error | One or more query parameters failed validation. No credits are charged. |
| 503 | Upstream Unavailable | One upstream lookup per request. A failed lookup is never billed. Filter values outside the documented vocabulary are rejected with 422 before any upstream call. |

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