# 4Sale Kuwait Listings Scraper: Ads and Categories (`happyendpoint/4sale-kuwait-listings-scraper`) Actor

Search 4Sale, the Kuwait classifieds site, by keyword, category, district, price and attributes, or from a category page link. Get ads in English and Arabic with price, district, photos, category and seller contact numbers, plus promoted and popular ads, the category tree, filters and districts.

- **URL**: https://apify.com/happyendpoint/4sale-kuwait-listings-scraper.md
- **Developed by:** [Happy Endpoint](https://apify.com/happyendpoint) (community)
- **Categories:** E-commerce
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 83.3% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 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.

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

### What this Actor does

This Actor reads the public pages of 4Sale, the classifieds marketplace of Kuwait. Search ads across every category by keyword, or inside one category, and narrow them by district, price range, photos, video and category attributes. You can also start from a category page link. Each ad row carries its title and description in English and Arabic, price in dinars, district, category, photo links, posting dates and premium flags. Further operations list the latest, promoted and popular ads, walk the category tree and its attribute filters, list districts and return search suggestions and trending searches.

The data is what 4Sale shows to any visitor on its Kuwait listing, category and district pages, in English and Arabic.

### Use cases

- Following used car prices in Kuwait by model, year and district.
- Watching new property and rental ads in a chosen governorate.
- Collecting second-hand electronics prices to compare against other markets.
- Monitoring trending searches and popular ads to see what Kuwait is buying.
- Collecting the sellers and contact numbers behind ads in a category, to find stock to buy or compare who sells the most.
- Building a local copy of the category tree and attribute filters for a classifieds project.

### How to use

1. Open the Actor's input form in Apify Console, or prepare a JSON input for the API.
2. Pick an `operation`: each one is a different kind of request to 4Sale.
3. Set `maxItems` to the number of results you need. It is the only quantity setting; paging is handled for you.
4. Start the run. The results land in the run's dataset, where you can download them as JSON, CSV, Excel and
   other formats, or read them through the Apify API.

This is the example input, the one the input form starts with:

```json
{
  "operation": "searchListings",
  "maxItems": 10,
  "query": "prado"
}
```

### Input

| Field | Type | Description | Used by |
| --- | --- | --- | --- |
| `operation` | string | Which data to fetch. Each option is one kind of request. | all operations |
| `maxItems` | integer | The most results to return. The run stops once it has this many. | all operations |
| `query` | string | Search words, in Arabic or English. Search suggestions take the start of a phrase; Category tree and Districts match part of a name. | Search all categories, Search inside a category, Latest listings, Category tree, Districts, Search suggestions |
| `category` | integer | The number of one category, as Category tree returns it in category_id. | Browse a category, Search inside a category, Promoted listings, Category details, Category filters |
| `url` | string | Link to any 4Sale category page, as shown in your browser address bar. Filters in the link are kept. | Browse from a category link |
| `categoryIds` | string | Extra category numbers, separated by commas (20 at most). Ads in any of them are added to the main category ads. | Browse a category, Browse from a category link |
| `parentCategoryId` | integer | Shows the next level down under this category number. Leave it empty to see the main sections. | Category tree |
| `districtIds` | string | District numbers from Districts, separated by commas (30 at most). An ad in any of them is kept. | Browse a category, Search inside a category, Browse from a category link, Promoted listings |
| `parentDistrictId` | integer | Shows the areas or blocks one level under this district number. Leave it empty to see the governorates. | Districts |
| `serviceAreaId` | integer | A governorate number from Districts. Use it only with a service category, and not together with District IDs; otherwise the run stops with an input error. | Browse a category, Promoted listings |
| `latitude` | number | Degrees north or south of the equator for the centre of a nearby-ads search. Fill it together with Longitude. | Search all categories |
| `longitude` | number | Degrees east or west of the prime meridian for the same centre point. Fill it together with Latitude. | Search all categories |
| `minPrice` | number | Skip ads priced below this amount, in Kuwaiti dinars. | Search all categories, Browse a category, Search inside a category, Browse from a category link |
| `maxPrice` | number | Skip ads priced above this amount, in Kuwaiti dinars. | Search all categories, Browse a category, Search inside a category, Browse from a category link |
| `attributes` | string | Limit ads by features such as year or size. Each rule is an attribute number, a colon and a wanted option, number or range; join up to 12 rules with commas and an ad must meet all of them. Category filters lists the attribute numbers. | Search all categories, Browse a category, Search inside a category, Browse from a category link |
| `hasPhotos` | boolean | Return just the ads that come with photos. | Search all categories |
| `hasVideo` | boolean | Return just the ads that come with a video clip. | Search all categories |
| `filterableOnly` | boolean | Skip attributes the site does not let shoppers filter by. | Category filters |
| `language` | string | Pick Arabic to get the suggestion text in Arabic; English is used otherwise. | Search suggestions |
| `sort` | string | Pick an order when you plan to read many pages, so that the pages do not overlap. | Search all categories, Browse a category, Browse from a category link |

### Output

Every row holds the run's own fields first (`operation`, `scrapedAt` and `sourceUrl`),
then the core fields `id`, `url`, `title`, `price`, `currency`, `location`, which are empty when the source has no such value,
and then every field of the source item as 4Sale returns it. The dataset has an overview view and one view per
operation.

Run the Actor with the prefilled input to see a sample of the output.

### Pricing

This Actor uses pay-per-event pricing: a start fee of $0.002 for each run, plus
$0.002 for each result in the dataset. Every operation is priced the same way.

| Operation | Start fee per run | Price per result |
| --- | --- | --- |
| Search all categories | $0.002 | $0.002 |
| Browse a category | $0.002 | $0.002 |
| Search inside a category | $0.002 | $0.002 |
| Latest listings | $0.002 | $0.002 |
| Browse from a category link | $0.002 | $0.002 |
| Promoted listings | $0.002 | $0.002 |
| Popular listings | $0.002 | $0.002 |
| Category tree | $0.002 | $0.002 |
| Category details | $0.002 | $0.002 |
| Category filters | $0.002 | $0.002 |
| Districts | $0.002 | $0.002 |
| Search suggestions | $0.002 | $0.002 |
| Trending searches | $0.002 | $0.002 |

Worked examples for one run:

| Results | Total cost |
| --- | --- |
| 10 | $0.022 |
| 100 | $0.202 |
| 1,000 | $2.002 |

Invalid input, a not-found answer or an internal error adds no charge of its own: such a run pays the start
fee plus only the results it delivered before it stopped (none for invalid input). To cap what one run may
cost, set the maximum cost per run when you start it.

### Limits and tips

- One run returns at most 1,000 results; the input form allows no higher `maxItems`.
- Set `maxItems` to what you need: you pay per result, and a smaller run finishes sooner.
- A request that matches nothing ends with an empty dataset and costs only the start fee.
- A search reports at most 10,000 results, however many ads match. Split large collections by category, district or price range.
- Pick an order, such as Newest first, when you plan to read many pages, so that the pages do not overlap.
- Latest listings page in sets of 30, Search inside a category in sets of 50 and the other searches in sets of 100.
- The category ID is needed for browsing and for promoted ads. Run Category tree first and copy the IDs from there.
- Browse from a category link accepts 4Sale links only.

### Resume a run that stopped at your cost limit

If you set a maximum cost per run and a run reaches it, the run stops early. To get the rest, resurrect the
run in Apify Console, or through the API, with a higher limit. The Actor resumes where it stopped: results
already in the dataset are not fetched or charged again, and the run still ends at `maxItems`.
Resurrecting can charge the start fee again.

### Running without input

The example input above is also this Actor's example run input. Apify's API documents that a run started with
no input at all uses the example run input: Search all categories, at most 10 results,
which costs at most $0.022 (the start fee plus 10 results). For your own runs, always send an input with the fields you need.

### FAQ

#### Do I need an account on 4Sale?

No. The Actor reads public data, so an Apify account is all you need.

#### How do I get the data into my own tools?

Download the dataset from the run's page, or read it through the Apify API and its integrations.

#### How do I find a category ID?

Run Category tree. Each row is one category with its category_id. Leave Parent category ID blank to see the main sections, or fill it in to see what sits under one category.

#### How do I narrow ads by car or home details?

Run Category filters for the category. It lists each attribute with its number and its options. Then write clauses into Attribute filters, with commas between clauses.

#### Are the texts in Arabic or English?

Both. Ad rows carry description_en and description_ar, and categories and districts have an English name field (name_en) and an Arabic one (name_ar). Keywords work in either language.

#### Are seller names and phone numbers included?

Rows keep every field 4Sale shows, seller and contact fields included. Those are personal data, so read the section on legal use below before you store or share them.

### More 4Sale Actors

This is the only 4Sale Actor in this collection for now.

### Related Actors

- [gumtree-uk-listings-scraper](https://apify.com/happyendpoint/gumtree-uk-listings-scraper)
- [haraj-listings-search-scraper](https://apify.com/happyendpoint/haraj-listings-search-scraper)
- [motory-used-cars-scraper](https://apify.com/happyendpoint/motory-used-cars-scraper)

### Disclaimer

This Actor is an independent tool. It is not affiliated with, endorsed by or sponsored by 4Sale. All
trademarks belong to their owners.

### Is it legal to use this data?

This Actor collects data that 4Sale shows publicly.
Some fields can hold personal data about private people: `contact_numbers`, `contact_phone`, `description_ar`, `description_en`, `listings[] › contact_numbers`, `listings[] › contact_phone`, `listings[] › description_ar`, `listings[] › description_en`, `listings[] › reactions`, `listings[] › seller`, `listings[] › title`, `reactions`, `seller`, `title`.
Personal data is protected by laws such as the GDPR in the EU. Collect and use it only when you have a lawful
reason, keep only what you need, and do not use it for unsolicited messages. If you are unsure, ask a lawyer.

# Changelog

This Actor's version history is a separate document: https://apify.com/happyendpoint/4sale-kuwait-listings-scraper/changelog.md

# Actor input Schema

## `operation` (type: `string`):

Which data to fetch. Each option is one kind of request.

## `maxItems` (type: `integer`):

The most results to return. The run stops once it has this many.

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

Search words, in Arabic or English. Search suggestions take the start of a phrase; Category tree and Districts match part of a name. Used by: Search all categories, Search inside a category, Latest listings, Category tree, Districts, Search suggestions.

## `category` (type: `integer`):

The number of one category, as Category tree returns it in category_id. Used by: Browse a category, Search inside a category, Promoted listings, Category details, Category filters.

## `url` (type: `string`):

Link to any 4Sale category page, as shown in your browser address bar. Filters in the link are kept. Used by: Browse from a category link.

## `categoryIds` (type: `string`):

Extra category numbers, separated by commas (20 at most). Ads in any of them are added to the main category ads. Used by: Browse a category, Browse from a category link.

## `parentCategoryId` (type: `integer`):

Shows the next level down under this category number. Leave it empty to see the main sections. Used by: Category tree.

## `districtIds` (type: `string`):

District numbers from Districts, separated by commas (30 at most). An ad in any of them is kept. Used by: Browse a category, Search inside a category, Browse from a category link, Promoted listings.

## `parentDistrictId` (type: `integer`):

Shows the areas or blocks one level under this district number. Leave it empty to see the governorates. Used by: Districts.

## `serviceAreaId` (type: `integer`):

A governorate number from Districts. Use it only with a service category, and not together with District IDs; otherwise the run stops with an input error. Used by: Browse a category, Promoted listings.

## `latitude` (type: `number`):

Degrees north or south of the equator for the centre of a nearby-ads search. Fill it together with Longitude. Used by: Search all categories.

## `longitude` (type: `number`):

Degrees east or west of the prime meridian for the same centre point. Fill it together with Latitude. Used by: Search all categories.

## `minPrice` (type: `number`):

Skip ads priced below this amount, in Kuwaiti dinars. Used by: Search all categories, Browse a category, Search inside a category, Browse from a category link.

## `maxPrice` (type: `number`):

Skip ads priced above this amount, in Kuwaiti dinars. Used by: Search all categories, Browse a category, Search inside a category, Browse from a category link.

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

Limit ads by features such as year or size. Each rule is an attribute number, a colon and a wanted option, number or range; join up to 12 rules with commas and an ad must meet all of them. Category filters lists the attribute numbers. Used by: Search all categories, Browse a category, Search inside a category, Browse from a category link.

## `hasPhotos` (type: `boolean`):

Return just the ads that come with photos. Used by: Search all categories.

## `hasVideo` (type: `boolean`):

Return just the ads that come with a video clip. Used by: Search all categories.

## `filterableOnly` (type: `boolean`):

Skip attributes the site does not let shoppers filter by. Used by: Category filters.

## `language` (type: `string`):

Pick Arabic to get the suggestion text in Arabic; English is used otherwise. Used by: Search suggestions.

## `sort` (type: `string`):

Pick an order when you plan to read many pages, so that the pages do not overlap. Used by: Search all categories, Browse a category, Browse from a category link.

## Actor input object example

```json
{
  "operation": "searchListings",
  "maxItems": 10,
  "query": "prado"
}
```

# Actor output Schema

## `overview` (type: `string`):

No description

## `searchListings` (type: `string`):

No description

## `listCategoryListings` (type: `string`):

No description

## `searchCategoryListings` (type: `string`):

No description

## `listLatestListings` (type: `string`):

No description

## `listListingsByUrl` (type: `string`):

No description

## `listPromotedListings` (type: `string`):

No description

## `listPopularListings` (type: `string`):

No description

## `listCategories` (type: `string`):

No description

## `getCategoryDetails` (type: `string`):

No description

## `getCategoryFilters` (type: `string`):

No description

## `listDistricts` (type: `string`):

No description

## `getSearchSuggestions` (type: `string`):

No description

## `listTrendingSearches` (type: `string`):

No description

## `summary` (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 = {
    "operation": "searchListings",
    "maxItems": 10,
    "query": "prado"
};

// Run the Actor and wait for it to finish
const run = await client.actor("happyendpoint/4sale-kuwait-listings-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 = {
    "operation": "searchListings",
    "maxItems": 10,
    "query": "prado",
}

# Run the Actor and wait for it to finish
run = client.actor("happyendpoint/4sale-kuwait-listings-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 '{
  "operation": "searchListings",
  "maxItems": 10,
  "query": "prado"
}' |
apify call happyendpoint/4sale-kuwait-listings-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,happyendpoint/4sale-kuwait-listings-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/YyMYpkVwzbeVtvRhG/builds/1OzuWekB3TFgvu3E8/openapi.json
