# Kapruka Scraper (`aboo.script/kapruka-scraper`) Actor

⚡ Fast Kapruka scraper that works on Cloudflare-protected pages. No login, no API key. Get Sri Lanka products by keyword, category, seller or product URL: prices, discounts, stock, ratings, reviews, sellers, brands, specifications and images. Perfect for price monitoring and market research.

- **URL**: https://apify.com/aboo.script/kapruka-scraper.md
- **Developed by:** [Aboo Script](https://apify.com/aboo.script) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.10 / 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/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

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

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Kapruka Scraper

![Kapruka Scraper](https://i.ibb.co/C5zNNkwC/kapruka-banner.png)

**Kapruka Scraper** extracts product listings from [Kapruka](https://www.kapruka.com/), Sri Lanka's largest online marketplace, into clean, structured data you can download as JSON, CSV, Excel, or HTML. Paste a Kapruka category, seller, or search URL, or type a few keywords, and get the title, price, discount, stock status, rating, seller, specifications, and images of every product. No account or login required.

### Introduction

[Kapruka](https://www.kapruka.com/) is a leading e-commerce site in Sri Lanka, selling gifts, cakes, flowers, groceries, electronics, fashion, cosmetics, and more from Kapruka itself and from hundreds of partner sellers, with islandwide and worldwide delivery. Its catalog is a rich source of Sri Lankan retail prices, brands, and seller data.

This actor collects the same public information you see in your browser and turns it into a ready-to-use dataset. You can run it once, schedule it to run daily, or connect it to your own tools.

### What data can you extract from Kapruka?

- 🏷️ Product title, product ID (SKU), brand, and description
- 🗂️ Category, full category path, and category URL
- 💲 Current price, original price, discount percentage, savings amount, and currency
- 📦 Stock status, shipping cost, shipping country, and price validity date
- ⭐ Rating and number of reviews
- 🏢 Seller name and seller page URL
- 📋 Product specifications (model, size, warranty, and more when listed)
- 🖼️ Main image and all product images
- 🔗 Direct URL to each product

### Use Cases

- 📈 **Market research**: track Sri Lankan retail prices and discounts across categories such as groceries, electronics, and gifts.
- 🕵️ **Competitor monitoring**: follow what partner sellers and brands list on Kapruka, and at what price.
- 🤝 **Lead generation**: build a list of Kapruka partner sellers and the brands they carry.
- 🗂️ **Database building**: create your own searchable product catalog with images and specifications.
- 🤖 **AI and automation**: feed clean, structured data into spreadsheets, dashboards, or AI workflows.

### How to scrape Kapruka step by step

1. Paste one or more Kapruka URLs into **Start URLs**, or type keywords into **Search queries**.
2. Set **Maximum number of results** to how many products you want per URL or per query.
3. Click **Start** and wait for the run to finish.
4. Download your data in JSON, CSV, Excel, or HTML from the **Output** tab.

### Input

- **Start URLs**: Kapruka URLs to scrape. Supported pages: category and subcategory pages (for example `https://www.kapruka.com/online/chocolates` or `https://www.kapruka.com/online/chocolates/price/java`), keyword pages (`/find_online/...`), seller pages (`/partner/...`), search result pages (including the subcategory filter), and single product pages (`/buyonline/...`). The subcategory or filter you picked on the website is kept in the results.
- **Search queries**: keywords to search on Kapruka, one per line. Each query is scraped separately.
- **Maximum number of results**: how many products to collect for each start URL or search query. Set `0` for no limit.
- **Proxy configuration**: Apify Proxy settings. The default datacenter proxy keeps larger runs stable, because Kapruka limits how many pages one connection can open.

You can use start URLs, search queries, or both in the same run.

### Input Examples

Scrape a category page from Kapruka:

```json
{
  "startUrls": [{ "url": "https://www.kapruka.com/online/chocolates" }],
  "maxResults": 5,
  "proxyConfiguration": { "useApifyProxy": true }
}
```

Search by keywords:

```json
{
  "searchQueries": ["perfume"],
  "maxResults": 5,
  "proxyConfiguration": { "useApifyProxy": true }
}
```

### Output

Each product is saved as one item in the dataset. Here is an example of a single item:

```json
{
  "url": "https://www.kapruka.com/buyonline/horizon-premium-ceylon-gunpowd/kid/ef_pc_groc0v4510p00003",
  "id": "ef_pc_groc0v4510p00003",
  "title": "Horizon Premium Ceylon Gunpowder Green Tea Single Origin 200g",
  "brand": "horizon-tea",
  "category": "Grocery",
  "categories": ["Grocery", "Beverages"],
  "categoryUrl": "https://www.kapruka.com/online/grocery/price/beverages",
  "sellerName": "Horizon-tea",
  "sellerUrl": "https://www.kapruka.com/partner/horizon-tea",
  "price": 4.45,
  "priceText": "US$4.45",
  "originalPrice": 5.93,
  "originalPriceText": "US$5.93",
  "discountPercent": 25,
  "discountAmount": 1.48,
  "currency": "USD",
  "availability": "In Stock",
  "inStock": true,
  "rating": 4.9,
  "reviewCount": 47,
  "shippingCost": 0,
  "shippingCountry": "LK",
  "priceValidUntil": "2026-11-24",
  "description": "Experience the pure essence of Ceylon with Horizon Premium Ceylon Gunpowder Green Tea. Sourced from the misty highlands of Sri Lanka...",
  "specifications": [],
  "image": "https://static2.kapruka.com/product-image/width=700,quality=93,f=auto/https://partnercentral.kapruka.com/kapruka-pc/assets/images/product/pc01517/groc0v4510p00003/groc0v4510p00003_1.jpg",
  "images": [
    "https://static2.kapruka.com/product-image/width=700,quality=93,f=auto/https://partnercentral.kapruka.com/kapruka-pc/assets/images/product/pc01517/groc0v4510p00003/groc0v4510p00003_1.jpg",
    "https://static2.kapruka.com/product-image/width=700,quality=93,f=auto/https://partnercentral.kapruka.com/kapruka-pc/assets/images/product/pc01517/groc0v4510p00003/groc0v4510p00003_2.jpg"
  ]
}
```

You can download the dataset in JSON, CSV, Excel, XML, or HTML, or access it through the Apify API.

### Notes

- Prices are shown in US dollars (`USD`), the same currency Kapruka shows to visitors outside Sri Lanka.
- `originalPrice`, `discountPercent`, and `discountAmount` are only filled for products that are on sale; otherwise they are `null`.
- `specifications` is empty for products that have no Specs tab on Kapruka (most gifts and food items).
- Products sold by Kapruka itself have `sellerName` set to `Kapruka` and no `sellerUrl`; partner products link to the seller page.
- Kapruka has no sort or price filters, so results follow the site's own order. Use a subcategory or seller URL to narrow a list.
- Other Kapruka pages (home page, help pages, custom cake builders) are not supported and are skipped.

### Why use the Kapruka Scraper?

- ✅ **No login needed**: works with public data only, so there is no account to manage.
- 🎯 **Keeps your filters**: paste any category, seller, or search URL and get exactly the products you see there.
- 🧹 **Clean data**: prices are real numbers, descriptions are plain text, and specifications are neat name-value pairs.
- 💸 **Pay for what you need**: set a result limit per URL or query and keep every run small and cheap.
- 🔄 **Ready for automation**: schedule runs, export to Google Sheets, or connect to Make, Zapier, and n8n.

### FAQ

#### How many results can I scrape?

You can set any number in **Maximum number of results**, or `0` for no limit. The actor keeps going until it reaches your limit or the list runs out of products.

#### Do I need a Kapruka account?

No. The actor only collects publicly available data. You do not need to log in or provide any account details.

#### Can I scrape data on a schedule?

Yes. Use Apify Schedules to run the actor every hour, day, or week, and get fresh prices automatically.

#### Can I request a new feature or filter?

Yes. Right now the actor supports start URLs and search queries. If you need other inputs, such as product reviews or delivery options, get in touch and they can be added.

#### Can I get a custom or private version?

Yes. The actor can be customized for your workflow, delivered as a private version, or a new scraper can be built for a different website. Use the contact details below.

### Need to scrape other product platforms?

- [Cobone Deals Scraper](https://apify.com/aboo.script/cobone-scraper): deals in the UAE and Saudi Arabia with prices, discounts, and merchants.
- [Fragrantica Scraper](https://apify.com/aboo.script/fragrantica-scraper): perfumes with notes, ratings, and designers.

***

**Need help or want a custom solution?**

- 📧 Email: aboo.script@gmail.com
- 🧩 More scrapers: [Apify profile](https://apify.com/aboo.script)

### Image Credit

Image credit: [Kapruka](https://www.kapruka.com/)

# Actor input Schema

## `startUrls` (type: `array`):

Kapruka category (e.g. https://www.kapruka.com/online/chocolates), subcategory, keyword, seller (/partner/...), search or product (/buyonline/...) URLs. Subcategory filters in the URL are kept.

## `searchQueries` (type: `array`):

Keywords to search on Kapruka. Each query is scraped separately.

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

Maximum number of products to scrape per start URL or search query. Set 0 for no limit.

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

Apify Proxy settings. Kapruka limits how many pages one connection can open, so the default datacenter proxy keeps larger runs stable.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://www.kapruka.com/online/chocolates"
    }
  ],
  "searchQueries": [
    "perfume"
  ],
  "maxResults": 5,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `overview` (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 = {
    "startUrls": [
        {
            "url": "https://www.kapruka.com/online/chocolates"
        }
    ],
    "searchQueries": [
        "perfume"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("aboo.script/kapruka-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 = {
    "startUrls": [{ "url": "https://www.kapruka.com/online/chocolates" }],
    "searchQueries": ["perfume"],
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("aboo.script/kapruka-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 '{
  "startUrls": [
    {
      "url": "https://www.kapruka.com/online/chocolates"
    }
  ],
  "searchQueries": [
    "perfume"
  ],
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call aboo.script/kapruka-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,aboo.script/kapruka-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/If0r6MDMlgXZmAYPP/builds/FcEsEguvr3hYeeiJc/openapi.json
