# Zid Store Price Monitor (`mohamedbr/my-actor-10`) Actor

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

- **URL**: https://apify.com/mohamedbr/my-actor-10.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 product price updates

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

## Zid Store Price Monitor

**Watch any store on Zid — one of Saudi Arabia's largest store platforms, home to more than 12,000 merchants — 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 Zid'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 (e.g. `raseel.gift`) |
| `productId` | Zid'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` / `salePrice` | The product's list and sale prices as published (SAR or the store's currency) |
| `effectivePrice` | The price a customer actually pays — Zid's own `effective_price`: `salePrice` while a sale is live, otherwise `price` |
| `previousPrice` / `previousSalePrice` / `previousEffectivePrice` | The same figures at the previous run (`null` for a new product) |
| `discountPercent` | The platform's discount percentage while a sale is live |
| `currency` | e.g. `SAR` |
| `brandName` / `sku` | As published by the store |
| `quantity` | Stock quantity as published |
| `isOnSale` | Whether a sale is live right now (effective price below list price) |
| `status` | `available` / `out_of_stock` / `unknown` |
| `imageUrl` | The product's main image |
| `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 live (`salePrice` is now the effective price) |
| `sale_ended` | A sale ended (the effective price is `price` again) |
| `availability_change` | Stock 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 Zid's own computation exactly as the storefront displays it — a `salePrice` counts only while it is actually the price a customer pays.

### Example

First run against the Riyadh gifting store `raseel.gift` (real data):

```json
{
  "storeDomain": "raseel.gift",
  "productId": "5e0bea86-66db-47ae-9f37-5ec0c90fde0f",
  "productName": "عضاضة للأطفال - وردي",
  "productUrl": "https://raseel.gift/products/عضاضة-للأطفال-وردي",
  "changeType": "new_product",
  "price": 68,
  "salePrice": null,
  "effectivePrice": 68,
  "previousPrice": null,
  "previousSalePrice": null,
  "previousEffectivePrice": null,
  "discountPercent": null,
  "currency": "SAR",
  "sku": "13571",
  "quantity": 31,
  "isOnSale": false,
  "status": "available",
  "capturedAt": "2026-11-21T17:56:00Z"
}
```

The day this product goes on sale, the next run emits it with `changeType: "sale_started"`, `previousEffectivePrice: 68`, the new `effectivePrice` and the platform's `discountPercent` — 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 (`zid-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

Zid publishes a documented storefront search API (`{store}/api/v1/products/search`) 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: the store's own domain (`raseel.gift`) or its free `*.zid.store` address, with or without `https://`. 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 Zid stores to watch, in any address form (pre-filled with one live store 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 Zid stores to watch: the store's own domain (raseel.gift) or its free \*.zid.store address, with or without https://. Prefilled with one live store so a first run returns real data immediately.

## Actor input object example

```json
{
  "maxResults": 10,
  "onlyNew": false,
  "storeUrls": [
    "https://raseel.gift"
  ]
}
```

# 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": [
        "https://raseel.gift"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("mohamedbr/my-actor-10").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": ["https://raseel.gift"],
}

# Run the Actor and wait for it to finish
run = client.actor("mohamedbr/my-actor-10").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": [
    "https://raseel.gift"
  ]
}' |
apify call mohamedbr/my-actor-10 --silent --output-dataset

```

## MCP server setup

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

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/7PbFeuqaCiub9TgMY/builds/oRuUpcbPVA6Na0lLq/openapi.json
