# MyHome.ie Locations API Documentation

Scrappa's `GET /api/myhome-ie/locations` lists the Irish regions (counties and Dublin postal areas) and their localities with the ids and slugs the search endpoint takes.

## How to use it

Call it without parameters to list every region with `id`, `name` and `slug`. Pass the `slug` as `location` to search. Pass `region_id` to list that region's localities with `id`, `name`, `slug`, `property_count` and `url`, then pass the ids as `locality_ids`.

## Text matching

`q` matches names ignoring case and accents. The platform has no autocomplete call, so matching runs on a daily cached list. Without `region_id`, `q` matches region names and Dublin localities. `localities_region_id` in the answer says which region was searched.

- **Documentation:** [https://scrappa.co/docs/myhome-ie-api/myhome_ie_locations](https://scrappa.co/docs/myhome-ie-api/myhome_ie_locations)
- **API group:** MyHome.ie API
- **Endpoint:** `GET https://scrappa.co/api/myhome-ie/locations`

## 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 |
| --- | --- | --- | --- |
| `region_id` | integer | No | Region id. Returns that region's localities. |
| `q` | string | No | Text to match in names, ignoring case and accents. |

## Example request

```bash
#!/bin/bash

curl -X GET \
    -H "x-api-key: YOUR_API_KEY_HERE" \
    "https://scrappa.co/api/myhome-ie/locations?q=Adamstown"
```

## Example response

```json
{
    "success": true,
    "query": "Adamstown",
    "region_id": null,
    "localities_region_id": 1265,
    "total_regions": 0,
    "total_localities": 1,
    "regions": [],
    "localities": [
        {
            "id": 1419,
            "name": "Adamstown",
            "slug": "adamstown",
            "property_count": 27,
            "url": "https://www.myhome.ie/residential/dublin-west/property-for-sale-in-adamstown"
        }
    ],
    "meta": {
        "billable": true,
        "endpoint_family": "locations"
    }
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 404 | Not Found | Nothing exists with that id, or the listing is no longer online (`not_found`). Non-billable. |
| 422 | Validation Error | A query parameter failed validation. Non-billable. |
| 503 | Upstream Unavailable | MyHome.ie could not be reached after retries, answered with a body this API cannot read, or did not apply the requested filters (public error code `upstream_unavailable`). Retryable and never billed. Clients are never rate limited. |

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