# ikman.lk Scraper — Sri Lanka Ads, Prices & Sellers (`logiover/ikman-lk-scraper`) Actor

Scrape classifieds from ikman.lk, Sri Lanka's largest marketplace: title, price with a sortable numeric value, city, category, listing attributes, member-seller flag, photo count and the ad link. Keyless, no login. JSON, CSV or Excel.

- **URL**: https://apify.com/logiover/ikman-lk-scraper.md
- **Developed by:** [Logiover](https://apify.com/logiover) (community)
- **Categories:** E-commerce, Lead generation
- **Stats:** 2 total users, 2 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $9.50 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## ikman.lk Scraper — Sri Lanka Ads, Prices & Sellers

Export classifieds from **ikman.lk**, Sri Lanka's largest marketplace — price, city, category and seller type — to JSON, CSV or Excel. Keyless, no login.

### What does this Actor do?

ikman renders its listings server-side, so this Actor parses the result cards directly and walks the pagination. No API key, no account, no cookies.

Two things about ikman's markup decide whether a scraper keeps working. First, **every CSS class is build-hashed** — `heading--2eONR`, `price--3SnqI` — so any selector pinned to a full class name breaks on the next deploy. This Actor matches the stable prefix instead and finds the card container through the `gtm-normal-ad` analytics hook, which is not hashed at all. Second, ikman writes the city and the category into a **single cell** ("Colombo, Mobile Phones"). The Actor splits them on the last comma, so multi-word cities such as "Nuwara Eliya" stay intact and you can filter by city without string surgery.

Prices are kept twice: the label as displayed (`Rs 379,900`) and a numeric value for sorting and price-band filters.

### Who is it for?

- **Price and market analysts** tracking real asking prices across Sri Lanka.
- **Resellers and arbitrage buyers** hunting underpriced stock by city.
- **B2B sales teams** prospecting the MEMBER accounts — ikman's shops and dealers.
- **Automotive and property portals** benchmarking a competing inventory.
- **Researchers** measuring supply and regional price spread.

### Use cases

- Compare used iPhone asking prices between Colombo and Kurunegala.
- Pull every MEMBER-seller listing in a category to build a dealer list.
- Track weekly price movement for a vehicle model.
- Find listings under a price ceiling across the whole island.
- Export a category snapshot with images for a monitoring dashboard.

### Why use this Actor?

- **Keyless** — no account, no token, no login.
- **18 structured fields**, with city and category properly separated.
- **Sortable price** plus the original label.
- **Member-seller filter** to isolate shops and dealers.
- **Hash-proof selectors** — matches class prefixes and analytics hooks, not build hashes.
- **Price-band filters** applied at the source, not after download.

### What data can you extract?

| Field | Type | Description |
|---|---|---|
| `adId` | string | Numeric ad ID from the URL |
| `slug` | string | Full URL slug |
| `title` | string | Listing title |
| `adUrl` | string | Public ad page |
| `priceLabel` | string | Price as displayed |
| `priceAmount` | number | Numeric price for sorting |
| `currency` | string | LKR when a price is present |
| `location` | string | City or district |
| `category` | string | ikman category |
| `attributes` | string | Card attributes, e.g. `5G` |
| `isMember` | boolean | Seller is an ikman MEMBER account |
| `isFeatured` | boolean | Paid featured placement |
| `photoCount` | number | Photos on the listing |
| `imageUrl` | string | Primary image |
| `postedLabel` | string | Posting recency, when shown |
| `country` | string | Sri Lanka |
| `source` | string | Always `ikman_lk` |
| `scrapedAt` | string | Run timestamp (ISO 8601) |

#### Example output

```json
{
  "adId": "2187",
  "title": "Apple iPhone 17 Pro 256GB (Brand New)",
  "adUrl": "https://ikman.lk/en/ad/apple-iphone-17-pro-256gb-brand-new-for-sale-colombo-2187",
  "priceLabel": "Rs 379,900",
  "priceAmount": 379900,
  "currency": "LKR",
  "location": "Colombo",
  "category": "Mobile Phones",
  "attributes": "5G",
  "isMember": true,
  "photoCount": 2,
  "country": "Sri Lanka",
  "source": "ikman_lk"
}
```

### How to use it

1. Set a category path — `sri-lanka` for everything, or something narrower like `sri-lanka/cars`.
2. Optionally add a keyword and a price band.
3. Switch on **Member sellers only** to build a dealer list.
4. Set **Maximum results** and run, then export JSON, CSV or Excel.

### Input example

```json
{
  "categoryPath": "sri-lanka/mobile-phones",
  "query": "iphone",
  "maxPrice": 200000,
  "maxResults": 2000
}
```

### Notes and limits

- Seller phone numbers sit behind a click on ikman itself. This Actor returns the seller **type** (`isMember`) and the ad link rather than dialling through to a number.
- Listing text is written by sellers, so quality and language vary; Sinhala and Tamil appear alongside English.
- `photoCount` is derived from the card's "+N" overlay, so it reflects what the listing shows on the results page.
- Category paths follow ikman's own URL structure — copy one from the site's address bar for anything specific.
- You are responsible for how you use seller data.

### FAQ

**Do I need an ikman account?**
No. Listings are public and this Actor needs nothing from you.

**Can I filter to shops and dealers?**
Yes, switch on **Member sellers only** — MEMBER is ikman's badge for those accounts.

**Will it break when ikman restyles?**
It is built to survive that: selectors match class prefixes and the analytics hook rather than build-hashed class names.

**Is the price always numeric?**
`priceAmount` is numeric whenever a price is shown. Ads asking for an offer keep `priceLabel` and leave the number `null`.

**How am I charged?**
Pay per result — you pay for the listings delivered.

# Actor input Schema

## `query` (type: `string`):

Free-text search across ikman.lk, e.g. "iphone", "toyota" or "land". Leave empty to browse the category listing.

## `categoryPath` (type: `string`):

ikman category path segment, e.g. "sri-lanka" for everything, "sri-lanka/mobile-phones" or "sri-lanka/cars".

## `minPrice` (type: `integer`):

Only return listings at or above this price. 0 disables the filter.

## `maxPrice` (type: `integer`):

Only return listings at or below this price. 0 disables the filter.

## `membersOnly` (type: `boolean`):

Keep only listings from ikman MEMBER accounts — the shops and dealers worth prospecting.

## `maxResults` (type: `integer`):

Stop after this many listings. The Actor walks pages until the target is met.

## `proxyConfiguration` (type: `object`):

ikman serves plain HTML; the default datacenter proxy is enough.

## Actor input object example

```json
{
  "query": "iphone",
  "categoryPath": "sri-lanka/mobile-phones",
  "minPrice": 0,
  "maxPrice": 0,
  "membersOnly": false,
  "maxResults": 500,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `adId` (type: `string`):

No description

## `slug` (type: `string`):

No description

## `title` (type: `string`):

No description

## `adUrl` (type: `string`):

No description

## `priceLabel` (type: `string`):

No description

## `priceAmount` (type: `string`):

No description

## `currency` (type: `string`):

No description

## `location` (type: `string`):

No description

## `category` (type: `string`):

No description

## `attributes` (type: `string`):

No description

## `isMember` (type: `string`):

No description

## `isFeatured` (type: `string`):

No description

## `photoCount` (type: `string`):

No description

## `imageUrl` (type: `string`):

No description

## `postedLabel` (type: `string`):

No description

## `country` (type: `string`):

No description

## `source` (type: `string`):

No description

## `scrapedAt` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "query": "iphone",
    "categoryPath": "sri-lanka/mobile-phones",
    "minPrice": 0,
    "maxPrice": 0,
    "membersOnly": false,
    "maxResults": 500,
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("logiover/ikman-lk-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "query": "iphone",
    "categoryPath": "sri-lanka/mobile-phones",
    "minPrice": 0,
    "maxPrice": 0,
    "membersOnly": False,
    "maxResults": 500,
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("logiover/ikman-lk-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "query": "iphone",
  "categoryPath": "sri-lanka/mobile-phones",
  "minPrice": 0,
  "maxPrice": 0,
  "membersOnly": false,
  "maxResults": 500,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call logiover/ikman-lk-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,logiover/ikman-lk-scraper"
        }
    }
}

```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/76f8FCGoUbyAH3dNk/builds/AnuB35QMaxKsB5dir/openapi.json
