# Salla Store Price Monitor (`mohamedbr/my-actor-6`) Actor

Watches any Salla store (60,000+ Saudi stores) and reports only what changed: new products, price drops and rises, sales starting/ending, stock flips — with previous prices. Also for Zid stores. Part of Mohamed Bourim's 12 MENA monitors on Apify.

- **URL**: https://apify.com/mohamedbr/my-actor-6.md
- **Developed by:** [Mohamed Bourim](https://apify.com/mohamedbr) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $20.00 / 1,000 salla store price monitors

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

## Salla Store Price Monitor

**Watch any store on Salla — Saudi Arabia's largest store platform, home to more than 60,000 stores — and receive only what changed: new products, price drops and increases, sales starting and ending, and stock flips.** Every record is labelled with its change type and carries the previous prices next to the current ones, so a price history builds itself run after run.

This is a monitor, not a bulk catalog scraper. A scraper sells you the same thousands of catalog rows again every run; this Actor keeps a persistent baseline per store and, in monitor mode, returns **only the new products and the price/sale/availability changes** — the records worth paying for. Run it once for a full snapshot, then schedule it daily and pay only for changes.

Prices are read from Salla's own public storefront API — the same data the storefront itself serves. No login, no store account, no cooperation from the store needed: give it any store's address and it watches that store.

### What you get

One record per product update, including:

| Field | Description |
|---|---|
| `storeDomain` | The store being watched, as given (e.g. `funky.byroro`) |
| `productId` | Salla's own product ID — the record identity |
| `productName` / `productUrl` | Product name and its page on the store |
| `changeType` | What happened — see the table below |
| `price` / `regularPrice` / `salePrice` | The product's prices as published (SAR or the store's currency) |
| `effectivePrice` | The price a customer actually pays: `salePrice` while a sale is active, otherwise `price` |
| `previousPrice` / `previousSalePrice` / `previousEffectivePrice` | The same figures at the previous run (`null` for a new product) |
| `discountPercent` | Discount of the effective price vs the regular price while a sale is active |
| `currency` | e.g. `SAR` |
| `categoryName` / `brandName` | As published by the store |
| `soldQuantity` | Units sold, as published |
| `isOnSale` / `discountStarts` / `discountEnds` | Sale state and its window when the store sets one |
| `status` | The product's status as published |
| `capturedAt` | When this run read the store (UTC) |

#### Change types

| `changeType` | Meaning |
|---|---|
| `new_product` | First time this monitor sees the product |
| `price_drop` | The effective price went down |
| `price_increase` | The effective price went up |
| `sale_started` | A sale became active (`salePrice` is now the effective price) |
| `sale_ended` | A sale ended (the effective price is `price` again) |
| `availability_change` | Stock/status flipped (e.g. out of stock) with no price move |
| `snapshot` | Unchanged since the previous run — emitted only with monitor mode off |

One label per product per run: a sale starting is reported as `sale_started`, not also as a price drop.

A note on prices: a store can carry a configured `salePrice` before the sale is live. The monitor reports it (you can see a sale being armed before it starts), but the `effectivePrice` follows the sale state exactly as the storefront displays it — `salePrice` counts only while `isOnSale` is true.

### Example

First run against the Riyadh mirror store `funky.byroro` (real data):

```json
{
  "storeDomain": "funky.byroro",
  "productId": "1539727317",
  "productName": "Graduate Mirror",
  "productUrl": "https://salla.sa/funky.byroro/graduate-mirror/p1539727317",
  "changeType": "new_product",
  "price": 125,
  "regularPrice": 125,
  "salePrice": 110,
  "effectivePrice": 125,
  "previousPrice": null,
  "previousSalePrice": null,
  "previousEffectivePrice": null,
  "discountPercent": null,
  "currency": "SAR",
  "categoryName": "Funky mirrors",
  "soldQuantity": 35,
  "isOnSale": false,
  "status": "sale",
  "capturedAt": "2026-11-20T21:16:00Z"
}
```

The merchant has a 110 SAR sale price configured on this 125 SAR product. The day that sale goes live, the next run emits the same product with `changeType: "sale_started"`, `previousEffectivePrice: 125`, `effectivePrice: 110` and `discountPercent: 12.0` — no other record, no catalog dump.

### Monitor mode

Set **onlyNew** and the Actor returns only changes since your last run — the baseline is kept in a persistent store (`salla-prices-state`), one store's state is written only after that store was read completely, and a failed store never marks products as seen. With **onlyNew** off you get the store's full catalog, every record still labelled against the previous run (`snapshot` when unchanged), and the baseline still refreshes.

**Scheduling:** daily is the natural cadence for price watching (hourly works too — runs take seconds). Point the schedule at your competitors' stores and the change feed accumulates in your datasets, ready for alerts, sheets or a price-history database.

### How it works

Salla publishes a documented storefront API (`api.salla.dev/store/v1`) that serves every store's catalog to its own storefront; this Actor reads it directly in guest mode — no browser, no proxy, no credentials — paging through the catalog until your per-store limit is reached. Any store address form works: a slug (`funky.byroro`), a platform path (`salla.sa/funky.byroro`), a subdomain (`demo.salla.sa`) or the store's own custom domain. If one store in a list fails, it is logged with the API's own error and skipped; the run fails only if every store fails. A store with an empty catalog returns zero records — a valid result, not an error.

### Inputs

| Input | Description |
|---|---|
| `storeUrls` | One or more Salla stores to watch, in any address form (pre-filled with two small live stores so a first run returns real data immediately) |
| `maxResults` | Maximum products to read per store (default 100; the console pre-fills 10 so a first test run finishes in seconds — raise it for a full sweep) |
| `onlyNew` | Monitor mode: only new products and price/sale/availability changes since the previous run |

### Pricing

Pay per event: **$0.05 per run start + $0.02 per product price update record** ($20 / 1,000 records). Platform usage is included. In monitor mode you pay only for records that changed — a quiet day costs the run start and nothing else.

# Actor input Schema

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

Maximum number of products to read per store (1-5000). Prefilled with 10 so a first run finishes in seconds; the default for API runs is 100.

## `onlyNew` (type: `boolean`):

Monitor mode: return only new products and price/sale/availability changes since the previous run of this monitor. Turn it on and schedule the Actor (e.g. daily) to receive a change feed instead of catalog snapshots.

## `storeUrls` (type: `array`):

One or more Salla stores to watch. Every address form works: a store slug (funky.byroro), a salla.sa path (salla.sa/funky.byroro), a subdomain (demo.salla.sa) or the store's own custom domain (shop.example.com). Prefilled with two small live stores so a first run returns real data immediately.

## Actor input object example

```json
{
  "maxResults": 10,
  "onlyNew": false,
  "storeUrls": [
    "funky.byroro",
    "brownz-store"
  ]
}
```

# Actor output Schema

## `results` (type: `string`):

The product price updates from this run.

# 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 = {
    "maxResults": 10,
    "onlyNew": false,
    "storeUrls": [
        "funky.byroro",
        "brownz-store"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("mohamedbr/my-actor-6").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 = {
    "maxResults": 10,
    "onlyNew": False,
    "storeUrls": [
        "funky.byroro",
        "brownz-store",
    ],
}

# Run the Actor and wait for it to finish
run = client.actor("mohamedbr/my-actor-6").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 '{
  "maxResults": 10,
  "onlyNew": false,
  "storeUrls": [
    "funky.byroro",
    "brownz-store"
  ]
}' |
apify call mohamedbr/my-actor-6 --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,mohamedbr/my-actor-6"
        }
    }
}
```

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/yjN2Rm2sXhl2Cs8Ri/builds/mVdgg9twM8md7pAzo/openapi.json
