# Daft.ie Locations

Four lookups in one route. autocomplete returns live per-vertical listing counts for matching areas. areas and classified return Ireland's area dictionaries — counties, cities, areas and colleges in a single response — and are served from cache after the first call. within returns the sub-areas of a parent area; a leaf area has no sub-areas and returns an empty list rather than an error.

- **Documentation:** [https://scrappa.co/docs/daft-ie-api/daft_ie_locations](https://scrappa.co/docs/daft-ie-api/daft_ie_locations)
- **API group:** Daft.ie API
- **Endpoint:** `GET https://scrappa.co/api/daft-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 |
| --- | --- | --- | --- |
| `mode` | string | No | autocomplete (default), areas, classified or within. |
| `query` | string | No | Area text, for example dublin 6. Required for autocomplete. |
| `id` | string | No | Parent area id from the classified or areas mode. Required for within. |

## Example request

```bash
#!/bin/bash

curl -X GET \
    -H "x-api-key: YOUR_API_KEY_HERE" \
    "https://scrappa.co/api/daft-ie/locations?mode=classified"
```

## Example response

```json
{
    "success": true,
    "data": {
        "counties": [],
        "cities": [],
        "areas": [],
        "colleges": []
    },
    "meta": {
        "duration_ms": 320,
        "endpoint_family": "locations_classified",
        "cached": true
    }
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 404 | Not Found | The requested Daft.ie resource does not exist. This response is not billable. |
| 422 | Invalid Request | A parameter was missing, out of range, or not one of the accepted values — for example an unknown section, ad state, sort or area id. Nothing was requested from Daft.ie, so retrying unchanged will fail the same way. Not billable. |
| 422 | Rejected As Untrustworthy | Daft.ie returned a response that did not match the request, so no data is returned. This happens instead of silently widening a result set. A request did reach Daft.ie and its answer was discarded. Not billable. |
| 501 | Not Public Data | Daft.ie serves this route as gated, so it carries no public listing data. Not billable. |
| 503 | Service Unavailable | Daft.ie is inspecting or refusing the request, it refused the request shape outright, or no approved upstream route is available. This is not an empty result set. Not billable. A gateway-level 502 is rewritten to 503 before it reaches a client, so this endpoint never answers 502. |

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