# Immoweb Listing Statistics API Documentation

Scrappa's `GET /api/immoweb/stats` endpoint returns view and bookmark counts for a single Immoweb listing.

## Opt-in by design

This endpoint is never merged into a search or detail response. Listing detail already carries inline view and bookmark numbers, and this endpoint is a separate source that is deliberately kept distinct — the two disagree for the same listing, because they are counted differently. Mixing them into one number would invent a figure neither source published.

Call this endpoint when you specifically want the standalone statistics view. Otherwise read the inline `flagsAndStatistics.statistics` block from the detail record and pay for one lookup.

## Related endpoints

Use [Immoweb Listing Detail](/docs/immoweb-api/immoweb_listing) for the full record including inline statistics.

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

## 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 |
| --- | --- | --- | --- |
| `id` | integer | Yes | Immoweb listing identifier. |

## Example request

```bash
#!/bin/bash

curl -X GET \
    -H "x-api-key: YOUR_API_KEY_HERE" \
    "https://scrappa.co/api/immoweb/stats?id=21882350"
```

## Example response

```json
{
    "success": true,
    "listing_id": 21882350,
    "views": 502,
    "bookmarks": 8
}
```

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

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