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.
Run this endpoint
Endpoint
Parameters
Start with the required fields, then add optional filters only when your use case needs them.
Runnable path
1 required parameter needed before sending a request.
11 optional filters available.
string
Required
sale, rent or land.
sale
string
Optional
Place name from autocomplete, for example Colombo 7 or Kandy.
Colombo 7
string
Optional
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.
Apartment
integer
Optional
Minimum price in Sri Lankan rupees. For rent this is the monthly price.
10
integer
Optional
Maximum price in Sri Lankan rupees. For rent this is the monthly price.
100000000
integer
Optional
Minimum number of bedrooms. Not available for land.
2
integer
Optional
Minimum land size in perches. Land only.
10
integer
Optional
Maximum land size in perches. Land only.
10
integer
Optional
Minimum floor area in square feet. Not available for land.
10
integer
Optional
Maximum floor area in square feet. Not available for land.
10
string
Optional
Free text matched against the listing text.
running shoes
integer
Optional
Result page, 1 to 400.
1
Request Examples
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://scrappa.co/api/lankapropertyweb/search?type=sale&location=Colombo+7&property_type=Apartment&max_price=100000000&min_bedrooms=2",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: YOUR_API_KEY_HERE"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
<?php
use Illuminate\Support\Facades\Http;
$response = Http::timeout(30)
->withHeaders(['x-api-key' => 'YOUR_API_KEY_HERE'])
->get('https://scrappa.co/api/lankapropertyweb/search?type=sale&location=Colombo+7&property_type=Apartment&max_price=100000000&min_bedrooms=2');
if ($response->successful()) {
echo $response->body();
} else {
echo "Error: " . $response->status();
}
const options = {
method: 'GET',
headers: {
'x-api-key': 'YOUR_API_KEY_HERE'
}
};
fetch('https://scrappa.co/api/lankapropertyweb/search?type=sale&location=Colombo+7&property_type=Apartment&max_price=100000000&min_bedrooms=2', options)
.then(response => {
if (!response.ok) {
throw new Error(`HTTP error! status: ${response.status}`);
}
return response.text();
})
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
const axios = require('axios');
const options = {
method: 'GET',
url: 'https://scrappa.co/api/lankapropertyweb/search?type=sale&location=Colombo+7&property_type=Apartment&max_price=100000000&min_bedrooms=2',
headers: {
x-api-key: 'YOUR_API_KEY_HERE',
}
};
try {
const response = await axios(options);
console.log(response.data);
} catch (error) {
console.error('Error:', error.message);
}
require 'net/http'
require 'uri'
uri = URI.parse("https://scrappa.co/api/lankapropertyweb/search?type=sale&location=Colombo+7&property_type=Apartment&max_price=100000000&min_bedrooms=2")
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == 'https'
request = Net::HTTP::Get.new(uri.request_uri)
request['x-api-key'] = 'YOUR_API_KEY_HERE'
begin
response = http.request(request)
puts response.body
rescue => e
puts "Error: #{e.message}"
end
import http.client
import json
conn = http.client.HTTPSConnection("scrappa.co")
headers = {
'x-api-key': 'YOUR_API_KEY_HERE',
}
try:
conn.request("GET", "/api/lankapropertyweb/search?type=sale&location=Colombo+7&property_type=Apartment&max_price=100000000&min_bedrooms=2", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
except Exception as e:
print(f"Error: {e}")
finally:
conn.close()
import requests
headers = {
'x-api-key': 'YOUR_API_KEY_HERE',
}
try:
response = requests.get('https://scrappa.co/api/lankapropertyweb/search?type=sale&location=Colombo+7&property_type=Apartment&max_price=100000000&min_bedrooms=2', headers=headers)
response.raise_for_status()
print(response.text)
except requests.exceptions.RequestException as e:
print(f"Error: {e}")
import okhttp3.OkHttpClient;
import okhttp3.Request;
import okhttp3.Response;
import java.io.IOException;
public class ApiExample {
public static void main(String[] args) {
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://scrappa.co/api/lankapropertyweb/search?type=sale&location=Colombo+7&property_type=Apartment&max_price=100000000&min_bedrooms=2")
.addHeader("x-api-key", "YOUR_API_KEY_HERE")
.build();
try (Response response = client.newCall(request).execute()) {
if (response.isSuccessful()) {
System.out.println(response.body().string());
} else {
System.out.println("Error: " + response.code());
}
} catch (IOException e) {
System.out.println("Error: " + e.getMessage());
}
}
}
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
client := &http.Client{}
req, err := http.NewRequest("GET", "https://scrappa.co/api/lankapropertyweb/search?type=sale&location=Colombo+7&property_type=Apartment&max_price=100000000&min_bedrooms=2", nil)
if err != nil {
fmt.Println("Error creating request:", err)
return
}
req.Header.Set("x-api-key", "YOUR_API_KEY_HERE")
resp, err := client.Do(req)
if err != nil {
fmt.Println("Error making request:", err)
return
}
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
fmt.Println("Error reading response:", err)
return
}
fmt.Println(string(body))
}
#!/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"
using System;
using System.Net.Http;
using System.Threading.Tasks;
class Program
{
static async Task Main()
{
using var client = new HttpClient();
client.DefaultRequestHeaders.Add("x-api-key", "YOUR_API_KEY_HERE");
try
{
var response = await client.SendAsync(new HttpRequestMessage(HttpMethod.Get, "https://scrappa.co/api/lankapropertyweb/search?type=sale&location=Colombo+7&property_type=Apartment&max_price=100000000&min_bedrooms=2"));
var content = await response.Content.ReadAsStringAsync();
Console.WriteLine(content);
}
catch (Exception ex)
{
Console.WriteLine($"Error: {ex.Message}");
}
}
}
import axios from 'axios';
async function run(): Promise<void> {
try {
const response = await axios({
method: 'GET',
url: 'https://scrappa.co/api/lankapropertyweb/search?type=sale&location=Colombo+7&property_type=Apartment&max_price=100000000&min_bedrooms=2',
headers: {
'x-api-key': 'YOUR_API_KEY_HERE',
},
});
console.log(response.data);
} catch (error) {
console.error('Error:', error);
}
}
void run();
use reqwest::Client;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let client = Client::new();
let response = client
.get("https://scrappa.co/api/lankapropertyweb/search?type=sale&location=Colombo+7&property_type=Apartment&max_price=100000000&min_bedrooms=2")
.header("x-api-key", "YOUR_API_KEY_HERE")
.send()
.await?;
println!("{}", response.text().await?);
Ok(())
}
Response Schema
Example response fields are illustrative; inspect the JSON before integrating.
Example response fields
Scan these fields before integrating.
success
data
meta
{
"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
Handle these documented responses before retrying or showing customer-facing failures.
Validation Error
A query parameter is missing, unknown or unusable. Unknown parameters and unknown values are rejected before any lookup, never ignored. Non-billable.
{
"errors": {
"type": [
"The selected type is invalid."
]
},
"message": "The selected type is invalid."
}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.
{
"meta": {
"billable": false,
"retryable": true,
"endpoint_family": "search"
},
"error": {
"code": "UPSTREAM_UNAVAILABLE",
"message": "LankaPropertyWeb is temporarily unavailable. Please retry."
},
"success": false
}Generate Code with AI
Copy a ready-made prompt with all the endpoint details, parameters, and example responses. Paste it into ChatGPT, Claude, or any AI assistant to instantly generate working code.
Try It Live
Test this endpoint in our interactive playground with real data.