# Flatfox Search API Documentation

Search public Flatfox listings inside a map bounding box. The result is a list of map pins: id, display price, latitude and longitude. The source returns no total and no offset, so narrow the box or the filters to see more. Pass the pin ids to the Flatfox listing endpoint for the full details.

- **Documentation:** [https://scrappa.co/docs/immoscout24-ch-api/immoscout24_ch_flatfox_search](https://scrappa.co/docs/immoscout24-ch-api/immoscout24_ch_flatfox_search)
- **API group:** ImmoScout24 CH API
- **Endpoint:** `GET https://scrappa.co/api/immoscout24-ch/flatfox/search`

## 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 |
| --- | --- | --- | --- |
| `north` | number | Yes | Northern edge of the box in degrees latitude. Example: 47.45. |
| `south` | number | Yes | Southern edge of the box in degrees latitude. Example: 47.32. |
| `east` | number | Yes | Eastern edge of the box in degrees longitude. Example: 8.62. |
| `west` | number | Yes | Western edge of the box in degrees longitude. Example: 8.45. |
| `offer_type` | string | No | rent or buy. Defaults to rent. |
| `object_category` | string | No | apartment, house, shared, parking or industry. |
| `min_price` | integer | No | Minimum price in CHF. |
| `max_price` | integer | No | Maximum price in CHF. |
| `min_rooms` | number | No | Minimum number of rooms. |
| `organization` | integer | No | Only pins of one agency, using the organization id. |
| `max_count` | integer | No | Maximum number of pins, 1 to 1000. Defaults to 100. |

## Example request

```bash
#!/bin/bash

curl -X GET \
    -H "x-api-key: YOUR_API_KEY_HERE" \
    "https://scrappa.co/api/immoscout24-ch/flatfox/search?north=47.45&south=47.32&east=8.62&west=8.45&offer_type=rent&object_category=apartment&max_count=100"
```

## Example response

```json
{
    "success": true,
    "data": {
        "search_metadata": {
            "offer_type": "rent",
            "object_category": "apartment",
            "bounds": {
                "north": 47.45,
                "south": 47.32,
                "east": 8.62,
                "west": 8.45
            },
            "max_count": 100,
            "returned": 1
        },
        "results": [
            {
                "id": "1234567",
                "price_display": 2150,
                "latitude": 47.3769,
                "longitude": 8.5417
            }
        ],
        "pagination": {
            "current_page": 1,
            "max_count": 100,
            "has_more": false
        }
    },
    "meta": {
        "endpoint_family": "flatfox-search",
        "billable": true
    }
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 422 | Validation Error | A parameter is missing or invalid. This response is not billable. |
| 503 | Source Unavailable | The source is temporarily unreachable or blocked the request. Retry later; this response is not billable. |

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