# Hemnet Map Cards API

Get map cards for the for-sale, upcoming or sold family, or resolve the geographic bounds of a set of locations. Each family has its own upstream document, so a single request never fans out across all three. The cards come from the search roots, because that is where the Hemnet app reads them from: the map roots (forSaleMap / saleMap / upcomingMap) are a tile-aggregation surface with no card rows, and live probing found the aggregate they return is empty - zero total and no sample pins - for both a location query and a Stockholm bounding box. This endpoint adds one field to the app's own map-card documents - the total - so a silently empty page is reported as a failure instead of a billable empty result.

- **Documentation:** [https://scrappa.co/docs/hemnet-api/hemnet_map](https://scrappa.co/docs/hemnet-api/hemnet_map)
- **API group:** Hemnet API
- **Endpoint:** `GET https://scrappa.co/api/hemnet/map`

## 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 |
| --- | --- | --- | --- |
| `mode` | string | No | cards (default) or bounds |
| `family` | string | No | Card family: for_sale (default), upcoming or sold |
| `location_ids` | string | No | Comma-separated location ids |
| `expand_locations` | string | No | Widen the area around each location, one of EXPAND_1000M, EXPAND_2000M, EXPAND_5000M, EXPAND_10000M, EXPAND_15000M, EXPAND_30000M, EXPAND_50000M or EXPAND_100000M |
| `geometries` | string | No | Geometry strings for a bounds request, as a JSON array (URL-encoded) or a comma-separated list. A WKT geometry contains commas, so send the JSON form for anything longer than one geometry |
| `limit` | integer | No | Map cards to return (default 1000) |

## Example request

```bash
#!/bin/bash

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

## Example response

```json
{
    "success": true,
    "data": {
        "family": "for_sale",
        "total": 2713,
        "count": 500,
        "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)
