# Bayut Agency Listings API Documentation

List the current property inventory of one agency with the same listing-card shape as search, plus optional purpose and sort filters and pagination. A valid empty inventory is a successful response.

- **Documentation:** [https://scrappa.co/docs/bayut-api/bayut_agency_listings](https://scrappa.co/docs/bayut-api/bayut_agency_listings)
- **API group:** Bayut API
- **Endpoint:** `GET https://scrappa.co/api/bayut/agency-listings`

## 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 |
| --- | --- | --- | --- |
| `agency_external_id` | string | Yes | Numeric agency id returned by the agency endpoint, e.g. 6168. |
| `purpose` | string | No | for-sale or for-rent. |
| `sort` | string | No | default, price-asc, price-desc, date-desc, v6-score or verified-score. Defaults to default. |
| `page` | integer | No | Zero-based page number. Defaults to 0. |
| `limit` | integer | No | Listings per page, 1 to 50. Defaults to 20. |

## Example request

```bash
#!/bin/bash

curl -X GET \
    -H "x-api-key: YOUR_API_KEY_HERE" \
    "https://scrappa.co/api/bayut/agency-listings?agency_external_id=6168&limit=20"
```

## Example response

```json
{
    "success": true,
    "data": {
        "listings": [
            {
                "id": "16769627",
                "title": "Spacious Layout | Fully Furnished | Prime Location",
                "url": "https://www.bayut.com/property/details-16769627.html",
                "purpose": "for-rent",
                "rooms": 3,
                "baths": 3,
                "price": {
                    "amount": 135000,
                    "currency": "AED",
                    "period": "yearly"
                },
                "area": {
                    "value": 137.87,
                    "unit": "sqm",
                    "sqft": 1484.03
                },
                "agency_name": "Driven Properties",
                "photo_count": 12
            }
        ]
    },
    "meta": {
        "endpoint_family": "agency_listings",
        "billable": true,
        "pagination": {
            "page": 0,
            "limit": 20,
            "total": 6865,
            "has_more": true,
            "next_page": 1,
            "truncated": false
        }
    }
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 422 | Validation Error | A public parameter or range is invalid. This response is not billable. |
| 502 | Invalid Source Response | Bayut returned an unexpected response shape. This response is not billable. |
| 503 | Service Unavailable | The transport or Bayut was unavailable after retries. This response is not billable and is safe to retry. |

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