# Sharaf DG Scraper - Electronics, Prices, Stock & Offers (`abotapi/sharafdg-scraper`) Actor

Scrape Sharaf DG (sharafdg.com) products across the UAE, Saudi Arabia, Bahrain, Oman and Egypt in English and Arabic: prices, discounts, stock, specifications, images, ratings, seller offers and per-store availability. Search by keyword, category or brand, or paste links.

- **URL**: https://apify.com/abotapi/sharafdg-scraper.md
- **Developed by:** [Abot API](https://apify.com/abotapi) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.70 / 1,000 product 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

## Sharaf DG Scraper: Electronics, Prices, Stock & Offers

Sharaf DG Scraper turns sharafdg.com, the Gulf electronics and home retailer, into structured product data. Search by keyword, category or brand, or paste a market home, search, category, brand or product link, and get prices, discounts, stock, specifications, images, ratings, every seller offer and per-store availability for the UAE, Saudi Arabia, Bahrain, Oman and Egypt, in English and Arabic on every row. Export to JSON, CSV or Excel, or pull results straight into your app through the API.

### Why This Scraper?

- **All five Sharaf DG markets in one actor.** Pick the UAE, Saudi Arabia, Bahrain, Oman or Egypt; each row carries the price in that market's currency (AED, SAR, BHD, OMR, EGP). A pasted link keeps the market of its own domain.
- **English and Arabic on every row.** Title, description, brand, categories, tags, key specification and full specification groups come in both languages, with the English and Arabic product links.
- **Every way into the catalog.** Keyword searches, category and brand filters, price, rating, discount, stock, seller and tag filters, plus whole market homes, ticked-filter search links, category pages, brand pages and single product pages.
- **Price detail you can trust.** Price, regular price, sale price, discount percent and amount, savings and the store price, with an in-stock flag and free-shipping flag.
- **Every seller offer.** Each product lists its offers: seller name and code, platform, price, regular price, shipping fee, free shipping, handling time, promo text and any free gift items.
- **Store availability.** Per-store stock, store pickup and home delivery flags for every Sharaf DG store, plus the delivery methods per zone where the product has them.
- **Monitoring built in.** Label every product NEW, UPDATED, REAPPEARED or EXPIRED across scheduled runs, track price and stock only, resume an interrupted crawl, get a chat alert when a run finishes, and export through MCP connectors.

### Use Cases

- **Price and promotion monitoring:** track prices, regular prices and discount depth for phones, laptops, TVs and appliances, and get alerted only to what actually changed.
- **Cross-market price comparison:** run the same keyword in the UAE, Saudi Arabia, Bahrain, Oman and Egypt and compare prices in local currency.
- **Marketplace seller analysis:** study which sellers list a product, at what price and with which shipping terms.
- **Catalog enrichment:** match your own product list to Sharaf DG by model number or SKU and add specifications, images and Arabic text.
- **Stock tracking:** follow online stock and per-store availability across the Sharaf DG store network.

### Data You Get

> Sample shape: values are illustrative placeholders, not from a live record.

| Field | Example |
| --- | --- |
| `id` / `sku` / `main_sku` / `model_number` | `"000000"` / `"0000000"` / `"S000000000"` / `"SAMPLE-MODEL-1"` |
| `title` / `title_ar` | `"Sample Brand 65inch 4K QLED Television"` / the Arabic title |
| `url` / `url_ar` | the English and Arabic product pages on the row's market |
| `brand` / `brand_ar` | `"Sample Brand"` / the Arabic brand name |
| `categories` / `categories_ar` / `parent_category` | `["TV, Video & Audio", "TVs"]` / the Arabic names / `"TV, Video & Audio"` |
| `product_type` / `tags` / `tags_ar` | `"TV"` / `["New Launch"]` / the Arabic tags |
| `market` / `country` / `currency` | `"uae"` / `"United Arab Emirates"` / `"AED"` |
| `price` / `regular_price` / `sale_price` | `1999` / `2499` / `1999` |
| `discount_percent` / `discount_amount` / `savings` / `store_price` | `20` / `500` / `"Save 20%"` / `2499` |
| `in_stock` / `free_shipping` | `true` / `false` |
| `image` / `images` | main image / full gallery |
| `rating` / `review_count` | `4.4` / `42` |
| `description_html` / `description_ar` | the product copy as HTML, in English and Arabic |
| `key_specification` / `key_specification_ar` | `{"Screen Size": "65 in"}` / the Arabic labels |
| `specification` / `specification_ar` | `{"Main": {"Brand": "Sample Brand"}}` / the Arabic groups |
| `attributes` / `attributes_ar` | `{"Screen Size": ["65 in"]}` / the Arabic values |
| `offers` | one entry per seller offer: `seller_name`, `seller_code`, `price`, `regular_price`, `shipping_fee`, `free_shipping`, `handling_time`, `promo_text`, `promo` |
| `store_inventory` | per store: `store_id`, `name`, `in_stock`, `store_pickup`, `home_delivery` |
| `store_availability` / `delivery_options` | stores that have it / delivery methods per zone |
| `featured` / `is_promotion` / `created_at` / `updated_at` | `false` / `null` / `"2026-01-01 00:00:00"` / `"2026-01-02 00:00:00"` |
| `scraped_at` / `query` / `source_url` / `position` | when it was read / the keyword / the pasted link / its place in the results |
| `changeType` / `changedFields` / `firstSeenAt` / `lastSeenAt` | incremental mode only |

### How to Use

1. Keep the default **search** mode and add one or more keywords (or leave them empty to browse the whole market), or switch to **url** mode and paste home, search, category, brand or product links.
2. Pick the **Market** for keyword runs. A pasted link keeps its own market (a saudi.sharafdg.com link reads the Saudi store).
3. Narrow with categories, brands, tags, a price range, a minimum rating or discount, in-stock or on-sale only, or the seller type, and choose a sort order.
4. Set **Max items** to control run size and cost, then click **Start**.

**Quick keyword search:**

```json
{
  "mode": "search",
  "searchTerms": ["iphone"],
  "maxItems": 20
}
```

**Saudi store, filtered and sorted:**

```json
{
  "mode": "search",
  "searchTerms": ["laptop"],
  "market": "saudi",
  "brands": ["Lenovo", "HP"],
  "maxPrice": 3000,
  "inStockOnly": true,
  "sortBy": "price_low",
  "maxItems": 50
}
```

**Several links, a few products from each:**

```json
{
  "mode": "url",
  "urls": [
    "https://uae.sharafdg.com/all-televisions/",
    "https://uae.sharafdg.com/brand/samsung/",
    "https://uae.sharafdg.com/?q=acer&dFR[taxonomies.attr.Brand][0]=Acer&post_type=product",
    "https://oman.sharafdg.com/"
  ],
  "maxItemsPerSearch": 10,
  "maxItems": 30
}
```

#### Run it from your code

Python:

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_APIFY_TOKEN>")
run = client.actor("abotapi/sharafdg-scraper").call(run_input={"mode": "search", "searchTerms": ["iphone"], "maxItems": 20})
for product in client.dataset(run.default_dataset_id).iterate_items():
    print(product.get("title"), product.get("price"), product.get("currency"))
```

JavaScript:

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

const client = new ApifyClient({ token: '<YOUR_APIFY_TOKEN>' });
const run = await client.actor('abotapi/sharafdg-scraper').call({ mode: 'search', searchTerms: ['iphone'], maxItems: 20 });
const { items } = await client.dataset(run.defaultDatasetId).listItems();
```

Or connect it to Make, Zapier, n8n, Google Sheets or webhooks from the **Integrations** tab.

#### Caps and pagination

**Max items** stops the whole run once that many products have been returned (`0` = no cap). **Max items per keyword or link** caps each one on its own, so one large category cannot use up the whole run. **Max pages** limits how many result pages (100 products each) each keyword or link walks; it does not cap the run by itself. Without a cap, each keyword, brand or link is walked to its natural end, with duplicates dropped. A pasted link with `?page=N` starts at that page (48 products per page, as on the site) and never triggers EXPIRED detection.

#### Pasted links

A market home reads that market's whole catalog. A search link keeps the filters ticked on it (brand, category, price and discount ranges). A brand link reads that brand, and a category or campaign page link reads the same products the page lists. If a category page cannot be matched, the run says which link could not be resolved and still returns the rest. Search-mode fields (keywords, filters, sort) are not applied to pasted links.

#### Resume and recurring updates

- **Resume** (`resumeFromRunId`) skips products already collected by an earlier run: paste its run or dataset ID and those products are neither returned nor charged again.
- **Incremental mode** (`incrementalMode`) is for scheduled runs over the same search, link or brand. Each product is classified `NEW`, `UPDATED` (with `changedFields`), `UNCHANGED` (left out and not billed unless `emitUnchanged` is on), `REAPPEARED`, or `EXPIRED` (only after a run whose walks all reached their end, never after a capped, page-limited, resumed or maximum-cost-stopped run, and only with `emitExpired` on). A product the search service returns without its price or title is held back: it is not compared, saved, returned or billed, it is never marked EXPIRED, and the run status says how many were held; the next run checks it again. A row refused because the run reached its maximum cost is not saved either, so it is reported on a later run. The result position, scrape time, the keyword or link a product was found through, the site's own sort weight, the catalog's last-updated stamp, the other-retailer price comparison, the best-offer flag of each seller offer and the rotating image stamp never count as a change. `ignoreFieldsForChanges` defaults to the rating (`rating`) and the review count (`review_count`), which drift with every new review; remove names to be told about them, or add more. `changeScope: "priceAndStock"` compares only price, regular price, sale price, the in-stock flag and each seller offer's price and availability; `compactUpdates` returns slim rows with just what moved. `stateKey` names or shares the stored state; leave it empty and the actor derives one from the run's keyword, link, market, sort and filter setup.

#### Alerts

Fill in a Slack incoming webhook or a Discord channel webhook, and the actor posts one short summary when the run finishes: the number of rows (and, in incremental mode, how many are new, updated, reappeared or expired) followed by up to **Rows listed per alert** products. With **Alert on changes only** on and Incremental changes on, nothing is sent when nothing changed. Alerts are free and never change the run's result; leave every field empty to skip them.

### Send results into your apps (MCP connectors)

Optionally pipe the scraped results into the apps you already use, via Model Context Protocol (MCP) connectors. This is an extra delivery step **after** the scrape: the Apify dataset is never changed.

**What gets written to the connector:** a condensed, human-readable **summary** of each record, not the full JSON. Each item becomes one entry with a **title** and its key fields flattened to plain text. The **complete record always stays in the Apify dataset**.

1. Authorize a connector once under **Apify, Settings, Integrations** (Notion, Linear, Airtable, or Apify).
2. Select it in the **"Pipe results into your apps"** input field (`mcpConnectors`). (If the picker is empty, you haven't authorized a connector yet.)
3. For **Notion**, also set `notionParentPageUrl` to the page where items should be created.
4. Optionally set `maxNotifyListings` to cap how many items are written to each connector per run (default 50).

The connection is mediated by Apify's MCP proxy, so this actor never sees your third-party credentials. Leave the field empty to skip.

### Input Parameters

| Parameter | Type | Default | Description |
| --- | --- | --- | --- |
| `mode` | string | `search` | Choose 'search' to run keyword, category and brand searches or 'url' to paste links. |
| `searchTerms` | array | `["iphone"]` | One or more keywords to search on Sharaf DG, for example 'iphone', 'robot vacuum' or a brand and model. Each keyword is searched separately in the market picked below. Leave empty to list the market's whole catalog (narrowed by the filters below). |
| `market` | string | `uae` | The Sharaf DG store to search: its catalog and currency (AED, SAR, BHD, OMR, EGP). Every row carries both English and Arabic text. A pasted link keeps the market of its own domain. |
| `categories` | array | - | Only return products in these categories, written the way Sharaf DG shows them (for example 'TVs', 'Laptops', 'Mobiles'). A product matches when any of them is one of its categories. Leave empty for all categories. |
| `brands` | array | - | Only return products of these brands, written the way Sharaf DG shows them (for example 'Apple', 'Samsung'). Leave empty for all brands. |
| `tags` | array | - | Only return products carrying one of these site tags, written the way Sharaf DG shows them (for example 'Online Excl.', 'New Launch', 'Pre-order', 'DG Friday Deal', 'clearance'). Leave empty for all. |
| `sellerType` | string | `all` | Choose who sells the product: Sharaf DG itself, third-party marketplace sellers, or both. |
| `sortBy` | string | `relevance` | Order of the results. |
| `minPrice` | number | - | Lowest price in the market's currency. Leave empty for no lower bound. |
| `maxPrice` | number | - | Highest price in the market's currency. Leave empty for no upper bound. |
| `minRating` | number | - | Only products rated at least this many stars (1 to 5). Leave empty for all. |
| `minDiscount` | integer | - | Only products discounted by at least this percentage. Leave empty for all. |
| `inStockOnly` | boolean | false | Only products currently in stock online. |
| `onSaleOnly` | boolean | false | Only products with a markdown (a saving against the regular price). |
| `urls` | array | 15 sample links (one per link type) | Paste Sharaf DG links: a market home (the whole catalog), a search page (/?q=...) with any filters ticked on it, a category page (/all-televisions/), a brand page (/brand/samsung/, also with a category filter), or a product page (/product/<name>/, English or Arabic, any market). A link with ?page=N starts at that page. Tracking parameters are ignored. |
| `maxPages` | integer | - | Optional. Limits how many result pages (100 products each) every keyword or link walks. Empty or 0 means no page limit; it does NOT cap the run by itself, Max items below does. |
| `maxItems` | integer | `20` | THE cap on this run: the maximum number of product rows returned across the whole run. Defaults to 20 so a first run is fast and cheap. Use 0 for unlimited (a whole category or a whole market's catalog). |
| `maxItemsPerSearch` | integer | `0` | Optional. Caps how many products each keyword or pasted link may return, so one large category cannot use up the whole run. 0 (default) = no per-keyword cap; Max items still caps the run. |
| `proxy` | object | `{"useApifyProxy": true}` | Leave this on the default (Automatic) for most runs. Residential is recommended for the most reliable results on large or frequent runs, and is billed to your own Apify plan. |
| `resumeFromRunId` | string | - | Paste a previous run ID or dataset ID to continue a large crawl without returning or charging for products already collected there. For recurring monitoring of the same search, use Incremental mode below instead. |
| `incrementalMode` | boolean | false | Turn this on for daily or recurring monitoring. The first run returns every matching product as NEW. Later runs normally return only NEW, UPDATED and REAPPEARED products. A product counts as UPDATED when any of its fields changed, except the result position, the scrape time, the keyword or link it was found through, the site's own sort weight, the catalog's last-updated stamp, the other-retailer price comparison, the best-offer flag of each seller offer, the rotating image stamp, and by default its rating and review count (see Ignore fields below); with 'Price and stock only' just price, regular price, sale price, in-stock flag and each seller offer's price and availability are compared. State is kept separately for each keyword, link, market, sort and filter setup; use State key to name or deliberately share a monitoring campaign. |
| `stateKey` | string | - | Optional. Name this monitoring campaign to keep its state stable, or to deliberately share state across differently configured runs. Leave empty to derive a key automatically from this run's search and filter setup. |
| `changeScope` | string | `all` | 'Price and stock only' compares just price, regular price, sale price, the in-stock flag and each seller offer's price and availability; a description, image, specification or tag change is treated as UNCHANGED and is never returned or billed as UPDATED. 'All fields' compares the whole record (minus the fields listed under Incremental changes). |
| `compactUpdates` | boolean | false | When on, an UPDATED row carries only identifiers plus the price/stock fields that actually moved (priceChanges, variantChanges for seller offers), instead of the full record. Off by default. |
| `expireAfterMissedScans` | integer | `1` | A tracked product absent from this many consecutive complete scans in a row is marked EXPIRED; fewer misses are held over without being reported. 1 (default) expires on the first miss, matching this actor's previous behaviour. |
| `emitUnchanged` | boolean | false | Off by default. Turn on to also return products that have not changed since the last run, marked UNCHANGED. This returns, and bills, extra rows you already have. |
| `emitExpired` | boolean | false | Off by default. Turn on to also return products that were present in a previous run but are no longer found, marked EXPIRED. Only produced once a run has fully scanned the tracked search, never when Max items or Max pages capped it, when a pasted link started past page 1, or when Resume was used. This returns, and bills, extra synthetic rows. |
| `ignoreFieldsForChanges` | array | `["rating", "review_count"]` | Field names that must NOT count as a change in incremental mode. The default list leaves out the rating (rating) and the review count (review_count), which drift with every new review; remove names from the list to be told about them. A product whose only differences are in these fields is treated as UNCHANGED, so it is not returned or billed as UPDATED. Names match at any nesting depth. The fields still appear in the output of rows that are returned. |
| `mcpConnectors` | array | - | Optionally send results into the apps you already use, via Model Context Protocol (MCP) connectors. Authorize one under Apify, Settings, API & Integrations, then select it here. Notion gets a rich page-per-item export; other connectors get a best-effort write or digest. Leave empty to skip; this never changes the dataset output. Supported: Notion (https://mcp.notion.com/mcp), Linear (https://mcp.linear.app/sse), Airtable (https://mcp.airtable.com/mcp), Apify (https://mcp.apify.com). |
| `notionParentPageUrl` | string | - | URL or id of the Notion page under which item pages are created. Required to enable the Notion export; ignored by other connectors. |
| `maxNotifyListings` | integer | `50` | Cap on items written to each connector per run. Does not affect the dataset. |
| `notifyOnlyChanges` | boolean | false | Only send the alert when Incremental changes is on and at least one product is NEW, UPDATED, REAPPEARED or EXPIRED. Without Incremental changes every finished run sends its summary. |
| `notificationLimit` | integer | `5` | How many product rows the alert message lists (the run's totals are always in the first line). |
| `slackWebhookUrl` | string | - | Optional Slack incoming-webhook URL to post the summary to. |
| `discordWebhookUrl` | string | - | Optional Discord channel webhook URL to post the summary to. |

### Output Example

> Sample shape: values are illustrative placeholders, not from a live record.

**One product row (keyword run):**

```json
{
  "kind": "product",
  "id": "000000",
  "sku": "0000000",
  "main_sku": "S000000000",
  "model_number": "SAMPLE-MODEL-1",
  "title": "Sample Brand 65inch 4K QLED Television",
  "title_ar": "تلفزيون عينة 65 بوصة",
  "url": "https://uae.sharafdg.com/product/sample-brand-65inch-4k-qled-television/",
  "url_ar": "https://uae.sharafdg.com/ar/product/sample-brand-65inch-4k-qled-television/",
  "description_html": "<p>Sample description.</p>",
  "brand": "Sample Brand",
  "brand_ar": "علامة عينة",
  "categories": [
    "TV, Video & Audio",
    "TVs"
  ],
  "parent_category": "TV, Video & Audio",
  "product_type": "TV",
  "tags": [
    "New Launch"
  ],
  "market": "uae",
  "country": "United Arab Emirates",
  "currency": "AED",
  "price": 1999.0,
  "regular_price": 2499.0,
  "sale_price": 1999.0,
  "discount_percent": 20.0,
  "discount_amount": 500.0,
  "savings": "Save 20%",
  "store_price": 2499.0,
  "in_stock": true,
  "free_shipping": false,
  "images": [
    "https://example.com/sample-1.jpg"
  ],
  "image": "https://example.com/sample-1.jpg",
  "rating": 4.4,
  "review_count": 42,
  "key_specification": {
    "Screen Size": "65 in",
    "Resolution": "3840 x 2160"
  },
  "specification": {
    "Main": {
      "Brand": "Sample Brand",
      "Color": "Black"
    }
  },
  "attributes": {
    "Brand": [
      "Sample Brand"
    ],
    "Screen Size": [
      "65 in"
    ]
  },
  "featured": false,
  "is_promotion": null,
  "created_at": "2026-01-01 00:00:00",
  "updated_at": "2026-01-02 00:00:00",
  "offers": [
    {
      "offer_id": "000000",
      "tier": "base",
      "type": "base",
      "seller_code": "sdg",
      "seller_name": "Sample Seller",
      "seller_platform": "sdg",
      "price": 1999.0,
      "regular_price": 2499.0,
      "shipping_fee": 0.0,
      "free_shipping": true,
      "shipping_type": null,
      "handling_time": 1,
      "promo_text": null,
      "promo": [],
      "is_default": true,
      "is_best": false,
      "active": true
    }
  ],
  "store_inventory": [
    {
      "store_id": "0000",
      "name": "Sample Mall",
      "in_stock": true,
      "store_pickup": true,
      "home_delivery": true,
      "active": true,
      "seller_code": "sdg"
    }
  ],
  "store_availability": [
    "Sample Mall"
  ],
  "delivery_options": null,
  "scraped_at": "2026-01-02T00:00:00+00:00",
  "query": "tv",
  "source_url": null,
  "position": 1
}
```

### Plan Requirement

Pay per event: one unit per returned product row, plus an actor start event. Every row already carries the full product record (both languages, specifications, every seller offer and per-store availability), so there are no extra per-row units. Each unit is charged per row, as the row is delivered, never as a single total at the end, and an unchanged product left out in incremental mode is neither returned nor charged. On paid Apify plans the default Automatic connection reads every product on this actor's data path, so no residential proxy is needed; residential is optional and billed to your own Apify plan. Apify free plans include no Apify proxy (see "Which proxy should I use?" below).

### FAQ

#### How much does it cost?

You pay per product row returned, plus a small start fee per run. The **Pricing** tab shows the current rates. Use **Max items** to cap the cost of any run.

#### Is it legal to scrape sharafdg.com?

This actor collects only publicly available product data that Sharaf DG shows on its own storefront. You are responsible for how you use it: follow Sharaf DG's terms and the laws that apply to you, and get legal advice if you plan commercial redistribution. Prices and specifications are generally facts, but images and description text may be subject to third-party rights.

#### Which markets are covered?

The UAE (AED), Saudi Arabia (SAR), Bahrain (BHD), Oman (OMR) and Egypt (EGP). The catalogs differ: a product, its price and its stock can differ per market, so the same product read in two markets is two rows. The Bahrain and Oman catalogs include a large accessory long tail; use categories, brands or a minimum price to focus them.

#### Can I get only new or changed products on a schedule?

Yes. Schedule the actor from the **Schedules** tab and turn on **Incremental mode**. Each run then returns only new, updated and reappeared products; unchanged ones are not billed unless you turn `emitUnchanged` on. Use `changeScope: "priceAndStock"` to be told only about price and stock moves.

#### Why does a keyword return more or fewer products than the site shows?

The actor lists published, priced products, the same set the site lists, and a keyword matches words in titles, brands, categories and model numbers. Filters you set narrow the same result the site would show. Seller offers of the same product are inside one row, not separate rows.

#### Why are some fields empty?

Some products simply carry no rating, specification, key specification, tags, delivery methods or free gift items. Fields the site does not publish for a product stay empty rather than guessed.

#### Which proxy should I use?

On paid Apify plans the default (Automatic) works for keyword, brand and link runs. Apify free plans include no Apify proxy, so a free-plan run relies on the backup gateway or on your own proxy URLs, and some pages may stay unavailable. Residential is recommended for the most reliable results on large or frequent runs. A pasted category or campaign page link is matched through its own page, which may use a different connection tier than the rest of the run, billed to your own Apify plan. If the connection you selected is unavailable or keeps getting refused, the run automatically continues on a backup connection (the other Apify proxy tier, then a backup gateway) rather than stopping; that escalation is disclosed in the run log the first time it happens, and any residential traffic it uses is billed to your own Apify plan. Set `SHARAFDG_COM_ALTERNATE_CONNECTION=0` in the run's environment variables to disable the backup connection entirely. If you enter your own proxy URLs, they are used as-is with no backup connection; if your proxy re-signs HTTPS traffic, the run says so once in the log ("The custom proxy re-signs HTTPS traffic; retrying without certificate verification for it.") and continues on it.

#### Why did my run fail instead of returning an empty dataset?

If every search or link could not be read, the run stops with a clear message so "no products matched" is never confused with "nothing could be read". Run it again in a few minutes. The messages you may see in the run log:

- When the selected connection is unavailable to your account, the log says: "The selected connection is unavailable to this run. Apify free plans do not include residential proxies. Continuing on a backup connection; some pages may still be unavailable. For residential access, upgrade at https://apify.com/pricing or supply your own proxy URLs."
- When pages are then read over the backup connection: "Served over the backup connection (the default connection was unavailable)." Set `SHARAFDG_COM_ALTERNATE_CONNECTION=0` in the run's environment variables to disable the backup connection.
- If the proxy connection is refused for the account and no page could be read: "The proxy connection was refused for this account, so no page could be read. Your Apify plan does not include proxy access; a paid plan is required: https://apify.com/pricing. If you entered your own proxy URLs, check that their credentials are valid."
- If the run reaches the maximum cost per run you set, it stops and its status says: "Stopped early: the run reached the maximum cost per run you set, after N row(s). Nothing more was read, delivered or charged. Raise the maximum cost per run to collect more."
- If the run has no residential access and the backup connection still could not load a usable page: "No results: residential proxies are unavailable on this run (Apify free plans do not include them), and the backup connection could not load the requested Sharaf DG pages. Upgrade at https://apify.com/pricing or supply your own proxy URLs, then try again."
- If every request failed for another reason: "Could not load any results page (the requests failed), so nothing was collected. This is a connection problem, not an empty search. Please try again later."

Each of these failure messages ends with how many of your searches or links could not be read. A run with no supported links in URL mode fails at once with "Nothing to scrape: add search keywords, categories or brands in Search mode, or paste valid sharafdg.com links in URL mode." If only some keywords or links could be read, you still get what was found, and the run's status message says how many could not be read.

#### Can I use it with AI agents or MCP?

Yes. Call it from any Apify integration or MCP client, and use the connector field to push results into Notion, Linear or Airtable.

### 🔗 Want more electronics data?

Pair this actor with these related scrapers from the same team:

<table>
<tr><td>👗 <a href="https://apify.com/abotapi/fordeal-scraper"><b>Fordeal Scraper</b></a><br>Scrape Fordeal (fordeal.com) products across Saudi Arabia, the UAE, Kuwait, Qatar...</td><td>🔌 <a href="https://apify.com/abotapi/jarir-scraper"><b>Jarir Bookstore Scraper</b></a><br>Scrape Jarir Bookstore (jarir.com) across Saudi Arabia, UAE, Kuwait, Qatar and Bahrain in...</td></tr>
<tr><td>🔌 <a href="https://apify.com/abotapi/extra-com-scraper"><b>Danawa Scraper</b></a><br>Scrape Danawa (danawa.com), Korea's price comparison platform, by keyword, category or...</td><td>🔌 <a href="https://apify.com/abotapi/dienmayxanh-scraper"><b>Dienmayxanh Scraper</b></a><br>Scrape dienmayxanh.com home appliances and electronics with full specifications, current...</td></tr>
<tr><td>🔌 <a href="https://apify.com/abotapi/casasbahia-com-br-scraper"><b>Casas Bahia Brazil Electronics &amp; Home Goods Scraper</b></a><br>Scrape products from Casas Bahia Brazil by keyword, department, or URL. Filter by brand...</td><td>🔌 <a href="https://apify.com/abotapi/currys-co-uk"><b>Currys UK Scraper</b></a><br>Scrape Currys UK products, including electronics, home appliances, computers, TVs and...</td></tr>
</table>

👉 [Browse all abotapi scrapers](https://apify.com/abotapi)

### 💬 Support

- 🐞 **Found a bug or a missing field?** Open a ticket on the [Issues tab](https://apify.com/abotapi/sharafdg-scraper/issues/open). We usually reply within hours.
- 🛠️ **Need another site, extra fields or a private build?** Email <contact@abotapi.com>.
- ⭐ **Enjoying it?** A quick review on the actor page helps other users find it.

# Actor input Schema

## `mode` (type: `string`):

Choose 'search' to run keyword, category and brand searches or 'url' to paste links.

## `searchTerms` (type: `array`):

One or more keywords to search on Sharaf DG, for example 'iphone', 'robot vacuum' or a brand and model. Each keyword is searched separately in the market picked below. Leave empty to list the market's whole catalog (narrowed by the filters below).

## `market` (type: `string`):

The Sharaf DG store to search: its catalog and currency (AED, SAR, BHD, OMR, EGP). Every row carries both English and Arabic text. A pasted link keeps the market of its own domain.

## `categories` (type: `array`):

Only return products in these categories, written the way Sharaf DG shows them (for example 'TVs', 'Laptops', 'Mobiles'). A product matches when any of them is one of its categories. Leave empty for all categories.

## `brands` (type: `array`):

Only return products of these brands, written the way Sharaf DG shows them (for example 'Apple', 'Samsung'). Leave empty for all brands.

## `tags` (type: `array`):

Only return products carrying one of these site tags, written the way Sharaf DG shows them (for example 'Online Excl.', 'New Launch', 'Pre-order', 'DG Friday Deal', 'clearance'). Leave empty for all.

## `sellerType` (type: `string`):

Choose who sells the product: Sharaf DG itself, third-party marketplace sellers, or both.

## `sortBy` (type: `string`):

Order of the results.

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

Lowest price in the market's currency. Leave empty for no lower bound.

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

Highest price in the market's currency. Leave empty for no upper bound.

## `minRating` (type: `number`):

Only products rated at least this many stars (1 to 5). Leave empty for all.

## `minDiscount` (type: `integer`):

Only products discounted by at least this percentage. Leave empty for all.

## `inStockOnly` (type: `boolean`):

Only products currently in stock online.

## `onSaleOnly` (type: `boolean`):

Only products with a markdown (a saving against the regular price).

## `urls` (type: `array`):

Paste Sharaf DG links: a market home (the whole catalog), a search page (/?q=...) with any filters ticked on it, a category page (/all-televisions/), a brand page (/brand/samsung/, also with a category filter), or a product page (/product/<name>/, English or Arabic, any market). A link with ?page=N starts at that page. Tracking parameters are ignored.

## `maxPages` (type: `integer`):

Optional. Limits how many result pages (100 products each) every keyword or link walks. Empty or 0 means no page limit; it does NOT cap the run by itself, Max items below does.

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

THE cap on this run: the maximum number of product rows returned across the whole run. Defaults to 20 so a first run is fast and cheap. Use 0 for unlimited (a whole category or a whole market's catalog).

## `maxItemsPerSearch` (type: `integer`):

Optional. Caps how many products each keyword or pasted link may return, so one large category cannot use up the whole run. 0 (default) = no per-keyword cap; Max items still caps the run.

## `proxy` (type: `object`):

Leave this on the default (Automatic) for most runs. Residential is recommended for the most reliable results on large or frequent runs, and is billed to your own Apify plan.

## `resumeFromRunId` (type: `string`):

Paste a previous run ID or dataset ID to continue a large crawl without returning or charging for products already collected there. For recurring monitoring of the same search, use Incremental mode below instead.

## `incrementalMode` (type: `boolean`):

Turn this on for daily or recurring monitoring. The first run returns every matching product as NEW. Later runs normally return only NEW, UPDATED and REAPPEARED products. A product counts as UPDATED when any of its fields changed, except the result position, the scrape time, the keyword or link it was found through, the site's own sort weight, the catalog's last-updated stamp, the other-retailer price comparison, the best-offer flag of each seller offer, the rotating image stamp, and by default its rating and review count (see Ignore fields below); with 'Price and stock only' just price, regular price, sale price, in-stock flag and each seller offer's price and availability are compared. State is kept separately for each keyword, link, market, sort and filter setup; use State key to name or deliberately share a monitoring campaign.

## `stateKey` (type: `string`):

Optional. Name this monitoring campaign to keep its state stable, or to deliberately share state across differently configured runs. Leave empty to derive a key automatically from this run's search and filter setup.

## `changeScope` (type: `string`):

'Price and stock only' compares just price, regular price, sale price, the in-stock flag and each seller offer's price and availability; a description, image, specification or tag change is treated as UNCHANGED and is never returned or billed as UPDATED. 'All fields' compares the whole record (minus the fields listed under Incremental changes).

## `compactUpdates` (type: `boolean`):

When on, an UPDATED row carries only identifiers plus the price/stock fields that actually moved (priceChanges, variantChanges for seller offers), instead of the full record. Off by default.

## `expireAfterMissedScans` (type: `integer`):

A tracked product absent from this many consecutive complete scans in a row is marked EXPIRED; fewer misses are held over without being reported. 1 (default) expires on the first miss, matching this actor's previous behaviour.

## `emitUnchanged` (type: `boolean`):

Off by default. Turn on to also return products that have not changed since the last run, marked UNCHANGED. This returns, and bills, extra rows you already have.

## `emitExpired` (type: `boolean`):

Off by default. Turn on to also return products that were present in a previous run but are no longer found, marked EXPIRED. Only produced once a run has fully scanned the tracked search, never when Max items or Max pages capped it, when a pasted link started past page 1, or when Resume was used. This returns, and bills, extra synthetic rows.

## `ignoreFieldsForChanges` (type: `array`):

Field names that must NOT count as a change in incremental mode. The default list leaves out the rating (rating) and the review count (review_count), which drift with every new review; remove names from the list to be told about them. A product whose only differences are in these fields is treated as UNCHANGED, so it is not returned or billed as UPDATED. Names match at any nesting depth. The fields still appear in the output of rows that are returned.

## `mcpConnectors` (type: `array`):

Optionally send results into the apps you already use, via Model Context Protocol (MCP) connectors. Authorize one under Apify, Settings, API & Integrations, then select it here. Notion gets a rich page-per-item export; other connectors get a best-effort write or digest. Leave empty to skip; this never changes the dataset output. Supported: Notion (https://mcp.notion.com/mcp), Linear (https://mcp.linear.app/sse), Airtable (https://mcp.airtable.com/mcp), Apify (https://mcp.apify.com).

## `notionParentPageUrl` (type: `string`):

URL or id of the Notion page under which item pages are created. Required to enable the Notion export; ignored by other connectors.

## `maxNotifyListings` (type: `integer`):

Cap on items written to each connector per run. Does not affect the dataset.

## `notifyOnlyChanges` (type: `boolean`):

Only send the alert when Incremental changes is on and at least one product is NEW, UPDATED, REAPPEARED or EXPIRED. Without Incremental changes every finished run sends its summary.

## `notificationLimit` (type: `integer`):

How many product rows the alert message lists (the run's totals are always in the first line).

## `slackWebhookUrl` (type: `string`):

Optional Slack incoming-webhook URL to post the summary to.

## `discordWebhookUrl` (type: `string`):

Optional Discord channel webhook URL to post the summary to.

## Actor input object example

```json
{
  "mode": "search",
  "searchTerms": [
    "iphone"
  ],
  "market": "uae",
  "sellerType": "all",
  "sortBy": "relevance",
  "inStockOnly": false,
  "onSaleOnly": false,
  "urls": [
    "https://uae.sharafdg.com/?q=iphone&post_type=product",
    "https://uae.sharafdg.com/",
    "https://uae.sharafdg.com/ar/",
    "https://uae.sharafdg.com/?q=acer&dFR[taxonomies.attr.Brand][0]=Acer&post_type=product",
    "https://uae.sharafdg.com/all-televisions/",
    "https://uae.sharafdg.com/brand/samsung/",
    "https://uae.sharafdg.com/brand/sony/?dFR[taxonomies.product_cat][0]=Gaming",
    "https://uae.sharafdg.com/brand/samsung/?utm_source=x&gclid=1",
    "https://uae.sharafdg.com/product/apple-iphone-18-pro-max-256gb-burgundy-middle-east-version/",
    "https://uae.sharafdg.com/ar/product/apple-iphone-18-pro-max-256gb-burgundy-middle-east-version/",
    "https://saudi.sharafdg.com/en/product/huawei-nova-16s-5g-256gb-12gb-ram-breathing-crystal-dual-sim-smartphone/",
    "https://bahrain.sharafdg.com/",
    "https://oman.sharafdg.com/",
    "https://egypt.sharafdg.com/",
    "https://m.sharafdg.com/"
  ],
  "maxItems": 20,
  "maxItemsPerSearch": 0,
  "proxy": {
    "useApifyProxy": true
  },
  "incrementalMode": false,
  "changeScope": "all",
  "compactUpdates": false,
  "expireAfterMissedScans": 1,
  "emitUnchanged": false,
  "emitExpired": false,
  "ignoreFieldsForChanges": [
    "rating",
    "review_count"
  ],
  "maxNotifyListings": 50,
  "notifyOnlyChanges": false,
  "notificationLimit": 5
}
```

# Actor output Schema

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

No description

## `changes` (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 = {
    "mode": "search",
    "searchTerms": [
        "iphone"
    ],
    "market": "uae",
    "sortBy": "relevance",
    "urls": [
        "https://uae.sharafdg.com/?q=iphone&post_type=product",
        "https://uae.sharafdg.com/",
        "https://uae.sharafdg.com/ar/",
        "https://uae.sharafdg.com/?q=acer&dFR[taxonomies.attr.Brand][0]=Acer&post_type=product",
        "https://uae.sharafdg.com/all-televisions/",
        "https://uae.sharafdg.com/brand/samsung/",
        "https://uae.sharafdg.com/brand/sony/?dFR[taxonomies.product_cat][0]=Gaming",
        "https://uae.sharafdg.com/brand/samsung/?utm_source=x&gclid=1",
        "https://uae.sharafdg.com/product/apple-iphone-18-pro-max-256gb-burgundy-middle-east-version/",
        "https://uae.sharafdg.com/ar/product/apple-iphone-18-pro-max-256gb-burgundy-middle-east-version/",
        "https://saudi.sharafdg.com/en/product/huawei-nova-16s-5g-256gb-12gb-ram-breathing-crystal-dual-sim-smartphone/",
        "https://bahrain.sharafdg.com/",
        "https://oman.sharafdg.com/",
        "https://egypt.sharafdg.com/",
        "https://m.sharafdg.com/"
    ],
    "maxItems": 20,
    "proxy": {
        "useApifyProxy": true
    },
    "incrementalMode": false,
    "compactUpdates": false,
    "emitUnchanged": false,
    "emitExpired": false,
    "ignoreFieldsForChanges": [
        "rating",
        "review_count"
    ],
    "notifyOnlyChanges": false
};

// Run the Actor and wait for it to finish
const run = await client.actor("abotapi/sharafdg-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 = {
    "mode": "search",
    "searchTerms": ["iphone"],
    "market": "uae",
    "sortBy": "relevance",
    "urls": [
        "https://uae.sharafdg.com/?q=iphone&post_type=product",
        "https://uae.sharafdg.com/",
        "https://uae.sharafdg.com/ar/",
        "https://uae.sharafdg.com/?q=acer&dFR[taxonomies.attr.Brand][0]=Acer&post_type=product",
        "https://uae.sharafdg.com/all-televisions/",
        "https://uae.sharafdg.com/brand/samsung/",
        "https://uae.sharafdg.com/brand/sony/?dFR[taxonomies.product_cat][0]=Gaming",
        "https://uae.sharafdg.com/brand/samsung/?utm_source=x&gclid=1",
        "https://uae.sharafdg.com/product/apple-iphone-18-pro-max-256gb-burgundy-middle-east-version/",
        "https://uae.sharafdg.com/ar/product/apple-iphone-18-pro-max-256gb-burgundy-middle-east-version/",
        "https://saudi.sharafdg.com/en/product/huawei-nova-16s-5g-256gb-12gb-ram-breathing-crystal-dual-sim-smartphone/",
        "https://bahrain.sharafdg.com/",
        "https://oman.sharafdg.com/",
        "https://egypt.sharafdg.com/",
        "https://m.sharafdg.com/",
    ],
    "maxItems": 20,
    "proxy": { "useApifyProxy": True },
    "incrementalMode": False,
    "compactUpdates": False,
    "emitUnchanged": False,
    "emitExpired": False,
    "ignoreFieldsForChanges": [
        "rating",
        "review_count",
    ],
    "notifyOnlyChanges": False,
}

# Run the Actor and wait for it to finish
run = client.actor("abotapi/sharafdg-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 '{
  "mode": "search",
  "searchTerms": [
    "iphone"
  ],
  "market": "uae",
  "sortBy": "relevance",
  "urls": [
    "https://uae.sharafdg.com/?q=iphone&post_type=product",
    "https://uae.sharafdg.com/",
    "https://uae.sharafdg.com/ar/",
    "https://uae.sharafdg.com/?q=acer&dFR[taxonomies.attr.Brand][0]=Acer&post_type=product",
    "https://uae.sharafdg.com/all-televisions/",
    "https://uae.sharafdg.com/brand/samsung/",
    "https://uae.sharafdg.com/brand/sony/?dFR[taxonomies.product_cat][0]=Gaming",
    "https://uae.sharafdg.com/brand/samsung/?utm_source=x&gclid=1",
    "https://uae.sharafdg.com/product/apple-iphone-18-pro-max-256gb-burgundy-middle-east-version/",
    "https://uae.sharafdg.com/ar/product/apple-iphone-18-pro-max-256gb-burgundy-middle-east-version/",
    "https://saudi.sharafdg.com/en/product/huawei-nova-16s-5g-256gb-12gb-ram-breathing-crystal-dual-sim-smartphone/",
    "https://bahrain.sharafdg.com/",
    "https://oman.sharafdg.com/",
    "https://egypt.sharafdg.com/",
    "https://m.sharafdg.com/"
  ],
  "maxItems": 20,
  "proxy": {
    "useApifyProxy": true
  },
  "incrementalMode": false,
  "compactUpdates": false,
  "emitUnchanged": false,
  "emitExpired": false,
  "ignoreFieldsForChanges": [
    "rating",
    "review_count"
  ],
  "notifyOnlyChanges": false
}' |
apify call abotapi/sharafdg-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,abotapi/sharafdg-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/JNCs4MFsK5DjM03xp/builds/Fdugcj6UzvSTneIrm/openapi.json
