# Yad2 Regions and Cities API Documentation

Return the Yad2 address taxonomy page by page: the eight regions, the full city list, or the neighbourhoods. Region rows carry a region_id, city rows a city_id and neighbourhood rows a hood_id, each with its Hebrew name. The ids are the ones the search endpoint expects, so a region_id from here can be sent straight back as region. A page past the end is a successful, billable answer.

- **Documentation:** [https://scrappa.co/docs/yad2-api/yad2_regions](https://scrappa.co/docs/yad2-api/yad2_regions)
- **API group:** Yad2 API
- **Endpoint:** `GET https://scrappa.co/api/yad2/regions`

## 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 |
| --- | --- | --- | --- |
| `type` | string | No | regions, cities or hoods. Defaults to regions. |
| `page` | integer | No | 1-based page number. Defaults to 1. |
| `limit` | integer | No | Rows per page, 1 to 10000. Defaults to 50. |
| `city_id` | integer | No | Restrict a hoods lookup to one city_id from the cities list. Optional; the gateway returns the full neighbourhood list without it. |

## Example request

```bash
#!/bin/bash

curl -X GET \
    -H "x-api-key: YOUR_API_KEY_HERE" \
    "https://scrappa.co/api/yad2/regions?type=regions&page=1&limit=50"
```

## Example response

```json
{
    "success": true,
    "data": {
        "type": "regions",
        "items": [
            {
                "region_id": 2,
                "region": "\u05d3\u05e8\u05d5\u05dd"
            },
            {
                "region_id": 8,
                "region": "\u05d9\u05e8\u05d5\u05e9\u05dc\u05d9\u05dd"
            },
            {
                "region_id": 3,
                "region": "\u05ea\u05dc \u05d0\u05d1\u05d9\u05d1 \u05d5\u05d4\u05e1\u05d1\u05d9\u05d1\u05d4"
            }
        ],
        "pagination": {
            "page": 1,
            "per_page": 50,
            "total": 8,
            "total_pages": 1,
            "has_more": false
        }
    },
    "meta": {
        "endpoint_family": "regions",
        "billable": true
    }
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 503 | Yad2 Upstream Unavailable | Yad2 could not be reached for this request after the attempt budget. Never charged. |
| 503 | Yad2 Refused | Yad2 refused every attempt for this request instead of answering with data. The response is never charged. |
| 422 | Invalid Parameter | Yad2 refused a value in this request. The request is never forwarded upstream and is never charged. |
| 502 | Parser Drift | Yad2 answered with a payload this parser does not recognise. The incident has been reported; retrying returns the same body. |

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