# LankaPropertyWeb Agent Profile API Documentation

Scrappa's `GET /api/lankapropertyweb/agent` returns the public profile of one LankaPropertyWeb agent or agency and a page of its current listings.

## What you get

`slug`, `id`, `name`, `url`, `verified`, `logo`, `areas_covered`, `services` and `listings`. Each listing has `id`, `type`, `url`, `title`, `price`, `price_label`, `price_period`, `currency`, `location`, `image` and a short `description`. Use `id` and `type` with the listing endpoint for the full record.

## Pagination

`page` selects the listing page, 30 listings per page. `pagination` has `page`, `total_pages`, `returned` and `has_more`. A page past the last one returns an empty list with the real `page`.

## Privacy

Phone numbers are never returned.

## Notes

Take `slug` from `/api/lankapropertyweb/agents` or from `agent.agency.slug` of a listing. An unknown slug returns `404`, which is never billed.

- **Documentation:** [https://scrappa.co/docs/lankapropertyweb-api/lankapropertyweb_agent](https://scrappa.co/docs/lankapropertyweb-api/lankapropertyweb_agent)
- **API group:** LankaPropertyWeb API
- **Endpoint:** `GET https://scrappa.co/api/lankapropertyweb/agent`

## 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 |
| --- | --- | --- | --- |
| `slug` | string | Yes | Agent slug from the agents list or a listing, for example prince-estates-5864978. |
| `page` | integer | No | Listing page, 30 listings per page. |

## Example request

```bash
#!/bin/bash

curl -X GET \
    -H "x-api-key: YOUR_API_KEY_HERE" \
    "https://scrappa.co/api/lankapropertyweb/agent?slug=prince-estates-5864978"
```

## Example response

```json
{
    "success": true,
    "data": {
        "slug": "prince-estates-5864978",
        "id": 5864978,
        "name": "Prince Estates",
        "url": "https://www.lankapropertyweb.com/agents/prince-estates-5864978",
        "verified": true,
        "logo": "https://www.lankapropertyweb.com/images/pics/profiles/251881_1765289294_6177.png",
        "areas_covered": "Colombo",
        "services": [
            "Residential sales",
            "Rentals",
            "Commercial property",
            "Land"
        ],
        "listings": [
            {
                "id": "5886260",
                "type": "rent",
                "url": "https://www.lankapropertyweb.com/rentals/property_details-5886260.html",
                "title": "The Address 606 \u2013 1BR Luxury Apt. | 23rd & 24th Floor | Tower 1 | 845 sqft | Rent: LKR 350,000/month",
                "price": 350000,
                "price_label": "Rs. 350,000",
                "price_period": "month",
                "price_qualifier": null,
                "currency": "LKR",
                "location": "Colombo 3",
                "image": "https://www.lankapropertyweb.com/pics/5886260/5886260_1775336372_0122.jpeg",
                "description": "Modern elegance meets coastal charm in this beautifully crafted 1-bedroom residence"
            }
        ],
        "pagination": {
            "page": 1,
            "total_pages": 4,
            "returned": 1,
            "has_more": true
        }
    },
    "meta": {
        "endpoint_family": "agent",
        "billable": true
    }
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 404 | Not Found | No LankaPropertyWeb agent has that slug. Take it from the agents list or a listing. (`NOT_FOUND`). Non-billable. |
| 422 | Validation Error | A query parameter is missing, unknown or unusable. Unknown parameters and unknown values are rejected before any lookup, never ignored. Non-billable. |
| 503 | Upstream Unavailable | LankaPropertyWeb could not be reached after retries, answered with an error or changed its format (`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)
