# LankaPropertyWeb Property Search API Documentation

Scrappa's `GET /api/lankapropertyweb/search` returns LankaPropertyWeb property in Sri Lanka as structured JSON, for sale, for rent or as land, with location, property type, price, bedrooms, floor area, land size, keywords and paging.

## What you get

One request returns one page of up to 25 listings, the site's own match count in `pagination.total` and the real `page`. Each listing has `id`, `type`, `property_type`, `title`, `description`, `price`, `price_label`, `price_period`, `currency`, `price_per_sqft`, `bedrooms`, `bathrooms`, `floor_area`, `land_size`, `address`, `coordinates`, `images`, `url`, `agent`, `flags`, `tags`, `availability` and `sold`. A field the site does not state is `null`. A price on request is `null`, never `0`. Call the listing endpoint with `id` and `type` for the full description, features and gallery.

## Prices

`price` is the number shown on the listing. `price_period` tells what it covers: `null` for a total, `month` for a monthly rent, or `day`, `sqft` and `perch` for a price per unit. `price_qualifier` holds words such as `negotiable`. Rent filters compare the monthly price.

## Filters are honoured

Every value is checked before the lookup, and unknown values are rejected with `422`. The site has a minimum bedroom filter only, so the parameter is `min_bedrooms`. It has no working bathroom, sort or agent filter, so this API does not offer them. Every returned row is checked again against `property_type`, `min_bedrooms`, `min_price`, `max_price` and the floor area limits. A row that breaks a filter is dropped and counted in `pagination.dropped_by_filter`. `query` echoes the applied filters.

## Location

Take `location` from the `name` of `/api/lankapropertyweb/autocomplete`, for example `Colombo 7`. Without a location the search covers Sri Lanka.

## Pagination

`page` runs from 1 to 400, 25 listings per page. A page past the last one returns an empty list with the real `page`. It never returns page 1 data under another page number. The order is the site's own ranking, with promoted listings first.

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

## 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 | Yes | sale, rent or land. |
| `location` | string | No | Place name from autocomplete, for example Colombo 7 or Kandy. |
| `property_type` | string | No | Sale: House, Apartment, Commercial, Villa or Bungalow. Rent adds Room, Annexe, Studio and Hostel. Land: Bare Land, Land with house, Beachfront land, Waterfront land, Cultivated Land, Coconut land, Rubber land or Paddy land. |
| `min_price` | integer | No | Minimum price in Sri Lankan rupees. For rent this is the monthly price. |
| `max_price` | integer | No | Maximum price in Sri Lankan rupees. For rent this is the monthly price. |
| `min_bedrooms` | integer | No | Minimum number of bedrooms. Not available for land. |
| `min_land` | integer | No | Minimum land size in perches. Land only. |
| `max_land` | integer | No | Maximum land size in perches. Land only. |
| `min_floor_area` | integer | No | Minimum floor area in square feet. Not available for land. |
| `max_floor_area` | integer | No | Maximum floor area in square feet. Not available for land. |
| `keywords` | string | No | Free text matched against the listing text. |
| `page` | integer | No | Result page, 1 to 400. |

## Example request

```bash
#!/bin/bash

curl -X GET \
    -H "x-api-key: YOUR_API_KEY_HERE" \
    "https://scrappa.co/api/lankapropertyweb/search?type=sale&location=Colombo+7&property_type=Apartment&max_price=100000000&min_bedrooms=2"
```

## Example response

```json
{
    "success": true,
    "data": {
        "items": [
            {
                "id": "5507299",
                "type": "sale",
                "property_type": "Apartment",
                "title": "3br Brand New Canterbury Golf Apartment For Sale At Kahathuduwa",
                "seo_title": "3 Bedroom Apartment for sale in Kahathuduwa for Rs. 27M Total",
                "description": "Our Reference No: SA 1297 (Please quote this reference number when inquiring) \u2022 946 sqft Floor area \u2022...",
                "price": 27000000,
                "price_label": "Rs. 27M",
                "price_period": null,
                "price_qualifier": null,
                "monthly_price_label": null,
                "currency": "LKR",
                "price_per_sqft": 28541,
                "bedrooms": 3,
                "bathrooms": 2,
                "floor_area": {
                    "value": 946,
                    "unit": "sqft"
                },
                "land_size": null,
                "address": {
                    "area": "Kahathuduwa",
                    "city": "Kahathuduwa",
                    "main_city": "Kahathuduwa",
                    "region": "Western",
                    "street": null
                },
                "coordinates": {
                    "latitude": 6.782298,
                    "longitude": 79.994797
                },
                "images": [
                    {
                        "url": "https://www.lankapropertyweb.com/pics/5507299/5507299_1688647675_4007.jpeg",
                        "thumbnail_url": "https://www.lankapropertyweb.com/pics/5507299/thumb_5507299_1688647675_4007.jpeg",
                        "caption": "Exterior"
                    }
                ],
                "image_count": 10,
                "has_video": false,
                "has_360_view": false,
                "url": "https://www.lankapropertyweb.com/sale/property_details-5507299.html",
                "agent": {
                    "id": "17540",
                    "name": null,
                    "type": "Agent",
                    "logo": "https://www.lankapropertyweb.com/images/pics/profiles/17540_1717819717_3402.jpeg"
                },
                "flags": {
                    "verified": false,
                    "hot_deal": false,
                    "trending": false,
                    "sponsored": false,
                    "new": false,
                    "luxury": false
                },
                "tags": [],
                "availability": null,
                "sold": false,
                "below_average_percent": -20,
                "investment": null
            }
        ],
        "pagination": {
            "page": 1,
            "per_page": 25,
            "total": 114,
            "total_pages": 5,
            "returned": 1,
            "dropped_by_filter": 0,
            "has_more": true
        },
        "query": {
            "type": "sale",
            "location": "Colombo 7",
            "property_type": "Apartment",
            "max_price": 100000000,
            "min_bedrooms": 2
        }
    },
    "meta": {
        "endpoint_family": "search",
        "billable": true
    }
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 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)
