# Carrefour Grocery Price Scraper (UAE, KSA, Egypt) (`alfhar/carrefour-price-tracker-mena`) Actor

Extracts Carrefour grocery prices in UAE, Saudi Arabia and Egypt. Input: country (AE/SA/EG) plus category names, codes or product links. Output: one JSON item per product with local-currency price, discount, unit price, stock. Use for price tracking and deals feeds. $0.002 per product.

- **URL**: https://apify.com/alfhar/carrefour-price-tracker-mena.md
- **Developed by:** [Alfhar Development](https://apify.com/alfhar) (community)
- **Categories:** E-commerce, Business
- **Stats:** 1 total users, 0 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event

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

## Carrefour Price Tracker for Egypt, UAE and Saudi Arabia (EGP, AED, SAR)

**Carrefour price scraper for MENA.** Pick a country (`EG`, `AE`, `SA`) and categories by name, code or link, or a list of products, and get one JSON row per product: price in local currency, original price, discount %, promo labels, unit price per kg or litre, stock status. English or Arabic. Plain HTTP, no browser.

> Built by the author of this Actor. It is a paid Actor (pay per event), see Pricing below.

### What it does (spec)

| | |
|---|---|
| **Does** | Extracts public Carrefour grocery prices from carrefouregypt.com, carrefouruae.com, carrefourksa.com |
| **Input** | `country` (required: EG, AE, SA), plus `categoryKeywords`, `categoryUrls` or `productUrls`, optional `onlyDiscounted`, `maxProducts`, `language` |
| **Output** | Dataset, one item per product: `name`, `brand`, `price`, `originalPrice`, `currency`, `discountPercent`, `unitPrice`, `inStock`, `url`, `categoryPath` |
| **Use when** | Grocery price comparison, inflation tracking, deals feeds, price-drop alerts, FMCG competitor monitoring in Egypt, UAE or KSA |
| **Price** | $0.002 per product returned + $0.005 per run start (see the pricing panel for current rates) |

### Example input and output

| Input | Output |
|---|---|
| `{"country": "SA", "categoryKeywords": ["water", "juice"], "maxProducts": 300, "onlyDiscounted": true}` | Discounted water and juice products from Carrefour KSA, prices in SAR |
| `{"country": "AE", "categoryKeywords": ["milk"], "language": "ar"}` | Milk products from Carrefour UAE, Arabic names, prices in AED |
| `{"country": "EG", "productUrls": ["38158"]}` | One tracked product from Carrefour Egypt, prices in EGP (schedule daily for price history) |
| `{"country": "EG", "categoryUrls": ["FEGY1610000"]}` | The category with that code, plus subcategories |

Example item (Carrefour Saudi Arabia):

```json
{
  "productId": "345674",
  "name": "Aquafina Drinking Water Bottle 1.5L x 6",
  "brand": "aquafina",
  "price": 5.99,
  "originalPrice": 8.5,
  "currency": "SAR",
  "onSale": true,
  "discountPercent": 29.5,
  "size": "1.5Lx6",
  "unitPrice": 0.67,
  "unitPriceUnit": "SAR/l",
  "inStock": true,
  "url": "https://www.carrefourksa.com/mafsau/en/still-water/aquafina-water-1-5l-x6/p/345674",
  "country": "SA",
  "categoryPath": ["Beverages"],
  "sourceCategory": "FKSA1500000",
  "scrapedAt": "2026-10-07T11:20:41Z"
}
```

### Use from Python

```bash
pip install apify-client
```

```python
import os
from apify_client import ApifyClient

client = ApifyClient(os.environ["APIFY_TOKEN"])
run = client.actor("alfhar/carrefour-price-tracker-mena").call(run_input={
    "country": "AE",
    "categoryKeywords": ["milk", "rice"],
    "maxProducts": 200,
    "onlyDiscounted": True,
})
for p in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(p["name"], p["price"], p["currency"], p["discountPercent"])
```

A runnable example lives in the open-source repo: https://github.com/alf7ar/carrefour-uae-price-scraper (same author as this Actor).

### Features

- **Local currency**: EGP, AED or SAR with the right country site.
- **Unit price** per kg or litre, including multipacks such as `6 x 200 ml`, to compare pack sizes.
- **Category name search**: type `milk`, `rice`, `diapers` or `coffee` (English or Arabic) and every matching category is found.
- **Subcategory crawl** (`includeSubcategories`, `maxCategoryDepth`, `maxCategories`).
- **Only-discounted mode** for deals feeds.
- **Product tracking** by link or ID; schedule daily and keep the datasets for price history.

### How it respects Carrefour

Carrefour robots.txt disallows search pages (`keyword=`) and page-number parameters (`currentPage=`), so this Actor never uses them. It reads the first page of each category (up to 60 products) and walks the category tree for more. Public pages only, no login, polite pace.

### Input fields

| Field | Meaning | Example |
|---|---|---|
| `country` | `EG`, `AE` or `SA` | `"EG"` |
| `categoryKeywords` | Words in category names | `["milk", "rice"]` |
| `categoryUrls` | Category codes, promo pages or links | `["FEGY1610000", "promo-big-discounts"]` |
| `productUrls` | Product links or IDs | `["38158"]` |
| `includeSubcategories` / `maxCategoryDepth` | Visit subcategories, how many levels | `true` / `1` |
| `maxCategories` | Safety limit of category pages per run | `20` |
| `maxProducts` | Stop after this many products | `200` |
| `onlyDiscounted` | Keep only products on sale | `false` |
| `language` | `en` or `ar` | `"en"` |

A category code is the last part of a Carrefour category link, e.g. `.../c/FKSA1500000` has the code `FKSA1500000`.

### Pricing

Pay per event: $0.002 per product returned and $0.005 when a run starts. Example: 1,000 products is about $2.00 plus the start fee. Set a maximum cost per run and the Actor stops at your limit. The pricing panel on this page is authoritative.

### Limitations

- At most the first 60 products of each category page are read; use subcategories, category names or product links for wider coverage.
- Prices are the public online prices for Carrefour's default delivery area and can differ by store or slot.
- Promo labels appear only when Carrefour publishes them on the product card.

### Support

Need another country, field or category list? Use the **Issues** tab of this Actor.

# Actor input Schema

## `country` (type: `string`):

Which Carrefour website to read.

## `categoryKeywords` (type: `array`):

Words from Carrefour category names, for example milk, rice, coffee, diapers, laptops. Every category whose name contains one of the words is scraped. Carrefour's own search page is not used because its robots.txt disallows it.

## `categoryUrls` (type: `array`):

Category codes (FEGY1610000), promotion pages (promo-big-discounts) or full category links copied from the Carrefour site.

## `productUrls` (type: `array`):

Product page links (they contain /p/12345) or product IDs, to track a fixed list of products.

## `includeSubcategories` (type: `boolean`):

Carrefour shows the first 60 products of a category page to crawlers. Subcategory pages add more products, up to 60 each.

## `maxCategoryDepth` (type: `integer`):

How many levels below each start category to visit.

## `maxCategories` (type: `integer`):

Safety limit on the number of category pages opened.

## `maxProducts` (type: `integer`):

Stop after this many products.

## `onlyDiscounted` (type: `boolean`):

Keep only products that currently have a lower price than their original price.

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

Language of product names.

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

Requests go out directly first. If Carrefour blocks them, the Actor retries through this proxy.

## Actor input object example

```json
{
  "country": "EG",
  "categoryKeywords": [
    "dairy"
  ],
  "includeSubcategories": true,
  "maxCategoryDepth": 1,
  "maxCategories": 20,
  "maxProducts": 200,
  "onlyDiscounted": false,
  "language": "en",
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

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

All scraped items in the default dataset.

# 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 = {
    "categoryKeywords": [
        "dairy"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("alfhar/carrefour-price-tracker-mena").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 = {
    "categoryKeywords": ["dairy"],
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("alfhar/carrefour-price-tracker-mena").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 '{
  "categoryKeywords": [
    "dairy"
  ],
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call alfhar/carrefour-price-tracker-mena --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,alfhar/carrefour-price-tracker-mena"
        }
    }
}
```

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/Z1o5FRyNoVXjDIISk/builds/7OQZF8kM82XdTn5LS/openapi.json
