# Hemnet Till Salu Search API

Search Hemnet's `GET /api/hemnet/search` endpoint for homes and apartments for sale (till salu) across Sweden. Every card is returned in full — price, square-meter price, living area, rooms, floor, coordinates, housing form, broker and agency, thumbnails and map thumbnail — so no second call is needed to render a result list.

- **Documentation:** [https://scrappa.co/docs/hemnet-api/hemnet_search](https://scrappa.co/docs/hemnet-api/hemnet_search)
- **API group:** Hemnet API
- **Endpoint:** `GET https://scrappa.co/api/hemnet/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 |
| --- | --- | --- | --- |
| `q` | string | No | Free-text filter, sent as the Hemnet search input's keywords field |
| `location_ids` | string | No | Comma-separated Hemnet location ids, e.g. 18031 for Stockholm kommun |
| `price_min` | integer | No | Minimum asking price in SEK |
| `price_max` | integer | No | Maximum asking price in SEK |
| `limit` | integer | No | Cards per request (default 1000, maximum 1000) |
| `offset` | integer | No | Cards to skip. offset + limit may not exceed 2500 |
| `sort` | string | No | Sort key, one of NEWEST, OLDEST, HIGHEST_PRICE, LOWEST_PRICE, HIGHEST_FEE, LOWEST_FEE, LARGEST_LIVING_AREA, SMALLEST_LIVING_AREA, LARGEST_LAND_AREA, SMALLEST_LAND_AREA, HIGHEST_PRICE_PER_M2, LOWEST_PRICE_PER_M2, CLOSEST_TO_WATER, CLOSEST_TO_COASTLINE, NEXT_OPEN_HOUSE, STREET_ADDRESS or STREET_ADDRESS_DESC |
| `expand_locations` | string | No | Widen the search around each location, one of EXPAND_1000M, EXPAND_2000M, EXPAND_5000M, EXPAND_10000M, EXPAND_15000M, EXPAND_30000M, EXPAND_50000M or EXPAND_100000M |

## Example request

```bash
#!/bin/bash

curl -X GET \
    -H "x-api-key: YOUR_API_KEY_HERE" \
    "https://scrappa.co/api/hemnet/search?location_ids=18031&limit=20"
```

## Example response

```json
{
    "success": true,
    "data": {
        "total": 2713,
        "count": 20,
        "cards": []
    }
}
```

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