# Carrefour MAF Grocery Scraper (`blackfalcondata/carrefour-maf-scraper`) Actor

Scrape Carrefour MAF grocery products across all seven Majid Al Futtaim markets — UAE, Saudi Arabia, Egypt, Qatar, Pakistan, Lebanon and Kenya — in English or Arabic. Track live prices and availability, ingredient and nutrition detail, and incremental price changes as JSON.

- **URL**: https://apify.com/blackfalcondata/carrefour-maf-scraper.md
- **Developed by:** [Black Falcon Data](https://apify.com/blackfalcondata) (community)
- **Categories:** E-commerce, Lead generation, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

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

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

### What does Carrefour MAF Grocery Scraper do?

Carrefour MAF Scraper extracts structured product data from Carrefour Majid Al Futtaim markets such as [Carrefour UAE](https://www.carrefouruae.com/mafuae/en), including English or Arabic product text, current prices, currencies, categories, availability, product URLs, images, market metadata, optional detail fields, and basket line totals. It supports keyword search, pasted search/category/product URLs, price filters, sorting, controllable result limits, detail enrichment, incremental tracking, and notifications.

### How to use this actor

- 👉 **Register for a free Apify account** — no credit card required.
- 🎉 Just click **[Sign up free on Apify →](https://console.apify.com/sign-up?fpr=1h3gvi&fp_sid=ctarich)** and complete a quick signup.
- 💰 A free Apify account includes $5 in monthly credits — enough to test this actor.
- ⏳ Scrape during the free trial, with no commitment or upfront payment required.

### Key features

<!-- KEY_FEATURES:START -->
- **🔍 Keyword search** — search Carrefour MAF products with `query`; pass a JSON array to run several product searches in one dataset.
- **🌎 7-market coverage** — choose one market with `market` or pass several with `markets` to scrape multiple countries in one run. Pasted Carrefour URLs still define their own market, and `language` requests English or Arabic product text where available.
- **🔗 Paste-mode** — paste Carrefour MAF product, search or category URLs; search/category URLs are fetched with their original filters and paginated with `currentPage`.
- **🛍️ Shopping-basket monitor** — monitor a shopping basket by `productIds` or `productUrls` and optional `quantities`; output includes line totals for basket-level tracking.
- **💰 Current Carrefour MAF prices** — each row includes current price, currency, availability and purchase limits when Carrefour exposes them.
- **🛒 Category filters** — Scope discovery with category URLs, Carrefour MAF category IDs or category text filters.
- **🏷️ Product metadata** — rows include product ID, seller, brand, category path, image, product URL and market metadata when available.
- **📦 Compact product output** — keep only core product, price, availability, basket and image fields.
- **🔔 Notifications** — Send product alerts to Telegram, Discord, Slack, WhatsApp or a generic webhook, with optional change-only notifications.
- **♻️ Incremental mode** — track a product search over time and emit `changeType` rows.
<!-- KEY_FEATURES:END -->

### What data can you extract from carrefouruae.com?

Each result includes Core product fields (`listingId`, `productId`, `gtin`, `sku`, `mpn`, `cdbase`, `metiRef`, and `facilityId`, and more) and detail fields when enrichment is enabled (`description`, `descriptionText`, `descriptionHtml`, `descriptionMarkdown`, and `productBenefits`). In standard mode, all fields are always present — unavailable data points are returned as `null`, never omitted. In compact mode, only core fields are returned.

Enable detail enrichment in the input to get richer fields such as full descriptions where the source provides them.

### Input

The main inputs are a search keyword and a result limit. Additional filters and options are available in the input schema.

Key parameters:

- **`productIds`** — Track a basket by GTIN, product ID or product URL. Pair with quantities for line totals. (default: `[]`)
- **`productUrls`** — Carrefour MAF product URLs to scrape directly, e.g. https://www.carrefouruae.com/mafuae/en/p/1872989. (default: `[]`)
- **`categoryUrls`** — Carrefour MAF category or search URLs. Filters and sort parameters are preserved. (default: `[]`)
- **`startUrls`** — Paste product, search or category URLs. Product URLs are scraped directly; search/category URLs keep filters and sort parameters. (default: `[]`)
- **`query`** — Product search keywords. Use one term like "milk" or a JSON array such as ["milk","rice"]. (default: `""`)
- **`market`** — Single Carrefour MAF market. Use Markets below to scrape several markets in one run. (default: `"mafuae"`)
- **`markets`** — Optional list of markets to scrape in one run, e.g. mafuae, mafsau, mafegy. Overrides Market for generated query, category ID and basket scopes. (default: `[]`)
- **`language`** — Request English or Arabic product text. Pasted /en/ or /ar/ URLs override this per URL. (default: `"en"`)
- **`categories`** — Local category filter after fetch. Use terms such as "Dairy", "Electronics", "Fresh Food" or "Baby". (default: `[]`)
- **`rayonIds`** — Advanced MAF category IDs used as category routes, e.g. F21600000 for Dairy & Eggs on UAE. (default: `[]`)
- **`quantities`** — Optional per-product quantities, e.g. {"1872989": 2}. (default: `{}`)
- **`maxResults`** — Maximum product rows to push. Use 0 for all rows in the selected scope. (default: `50`)
- ...and 31 more parameters

### Input examples

**Basic search** — Keyword-driven search with a result cap.

→ Full payload per result — all standard fields populated where the source provides them.

```json
{
  "query": "milk",
  "maxResults": 50
}
````

**Incremental tracking** — Only emit products that changed since the previous run with this `stateKey`.

→ First run builds the baseline state. Subsequent runs emit only records that are new or whose tracked content changed. Set `emitUnchanged: true` to include unchanged records as well.

```json
{
  "query": "milk",
  "maxResults": 200,
  "incrementalMode": true,
  "stateKey": "milk-tracker"
}
```

**Compact output for AI agents** — Return only core fields for AI-agent and MCP workflows.

→ Small payload with the most important fields — ideal for piping into LLMs without token overhead.

```json
{
  "query": "milk",
  "maxResults": 50,
  "compact": true
}
```

### Output

Each run produces a dataset of structured product records. Results can be downloaded as JSON, CSV, or Excel from the Dataset tab in Apify Console.

### Example product record

```json
{
  "listingId": "f5886984a57d94d173613dde781b8af6ef3fb718cb4e754a9dbd5fc1f118b8bc",
  "productId": "1872989",
  "gtin": "1872989",
  "sku": "1872989",
  "facilityId": "0000",
  "facilityServiceId": "SLOTTED",
  "title": "Savushkin 1% Fat Cottage Cheese 200g",
  "name": "Savushkin 1% Fat Cottage Cheese 200g",
  "brand": "savushkin",
  "entityName": "savushkin",
  "breadcrumbs": [
    "Home",
    "Categories",
    "Savushkin 1% Fat Cottage Cheese 200g"
  ],
  "location": "mafuae",
  "description": "Shop Savushkin 1% Fat Cottage Cheese 200g online now at Carrefour UAE. Buy Fresh Food in Dubai, & more. Enjoy best prices, FREE & fast delivery, & easy returns",
  "descriptionText": "Shop Savushkin 1% Fat Cottage Cheese 200g online now at Carrefour UAE. Buy Fresh Food in Dubai, & more. Enjoy best prices, FREE & fast delivery, & easy returns",
  "price": 15.79,
  "priceText": "AED 15.79",
  "priceValue": 15.79,
  "regularPrice": 15.79,
  "regular_price": 15.79,
  "priceCurrency": "AED",
  "currency": "AED",
  "purchaseMin": 1,
  "quantity": 1,
  "linePrice": 15.79,
  "basketKey": "basket",
  "listingType": "FOOD",
  "url": "https://www.carrefouruae.com/mafuae/en/soft-cheese-cottage/savushkin-cottage-1-200g/p/1872989",
  "portalUrl": "https://www.carrefouruae.com/mafuae/en/soft-cheese-cottage/savushkin-cottage-1-200g/p/1872989",
  "canonical_url": "https://www.carrefouruae.com/mafuae/en/soft-cheese-cottage/savushkin-cottage-1-200g/p/1872989",
  "attributes": {
    "market": "mafuae",
    "countryCode": "AE",
    "countryName": "United Arab Emirates",
    "offerId": "offer_carrefour_",
    "sellerName": "Carrefour",
    "serviceTypes": [
      "SLOTTED"
    ],
    "isSoldByWeight": false,
    "brandCode": "04365"
  },
  "sellerName": "Carrefour",
  "searchQuery": "product-url",
  "contentQuality": "full",
  "detailFetched": true,
  "scrapedAt": "2026-07-01T22:57:27.477Z",
  "scraped_at": "2026-07-01T22:57:27.477Z",
  "source": "carrefour-maf",
  "contentHash": "3e4d0a37ce87c6d9bc015f69dbacc08d69896f3174a9617ea906a8c89835d754"
}
```

### Incremental fields

When incremental mode is on, each record also carries:

- `changeType` — one of `NEW`, `UPDATED`, `UNCHANGED`, `REAPPEARED`, `EXPIRED`. Default output covers `NEW` / `UPDATED` / `REAPPEARED`; set `emitUnchanged: true` or `emitExpired: true` to opt into the others.
- `isRepost`, `repostOfId`, `repostDetectedAt` — populated when a new listing matches the tracked content of a previously expired one. Set `skipReposts: true` to drop detected reposts from the output.

### How to scrape carrefouruae.com

1. Go to [Carrefour MAF Grocery Scraper](https://apify.com/blackfalcondata/carrefour-maf-scraper?fpr=1h3gvi) in Apify Console.
2. Enter a search keyword.
3. Set `maxResults` to control how many results you need.
4. Enable `includeDetails` if you need full descriptions.
5. Click **Start** and wait for the run to finish.
6. Export the dataset as JSON, CSV, or Excel.

### Use cases

- Extract product data from carrefouruae.com for market research and competitive analysis.
- Track pricing trends across regions and categories over time.
- Monitor new and changed products on scheduled runs without processing the full dataset every time.
- Feed structured data into AI agents, MCP tools, and automated pipelines using compact mode.
- Export clean, structured data to dashboards, spreadsheets, or data warehouses.
- Benchmark seller / dealer reputation using rating fields.

### How much does it cost to scrape carrefouruae.com?

Carrefour MAF Grocery Scraper uses [pay-per-event](https://docs.apify.com/platform/actors/paid-actors/pay-per-event) pricing. You pay a small fee when the run starts and then for each result that is actually produced.

- **Run start:** $0.01 per run
- **Per result:** $0.002 per product record

Example costs:

- 10 results: **$0.03**
- 25 results: **$0.06**
- 100 results: **$0.21**
- 200 results: **$0.41**
- 500 results: **$1.01**

#### Example: recurring monitoring savings

These examples compare full re-scrapes with incremental runs at different churn rates. Churn is the share of products that are new or whose tracked content changed since the previous run. Actual churn depends on your query breadth, source activity, and polling frequency — the scenarios below are examples, not predictions.

Example setup: 200 results per run, daily polling (30 runs/month). Event-pricing examples scale linearly with result count.

| Churn rate | Full re-scrape run cost | Incremental run cost | Savings vs full re-scrape | Monthly cost after baseline |
|---|---:|---:|---:|---:|
| 5% — stable niche query | $0.41 | $0.03 | $0.38 (93%) | $0.90 |
| 15% — moderate broad query | $0.41 | $0.07 | $0.34 (83%) | $2.10 |
| 30% — high-volume aggregator | $0.41 | $0.13 | $0.28 (68%) | $3.90 |

Full re-scrape monthly cost at daily polling: $12.30. First month with incremental costs $1.28 / $2.44 / $4.18 for the 5% / 15% / 30% scenarios because the first run builds baseline state at full cost before incremental savings apply.

Platform usage (compute and proxies) is billed separately by Apify based on actual consumption. Incremental runs consume less on result processing, though fixed per-run overhead stays the same.

### FAQ

#### How many results can I get from carrefouruae.com?

The number of results depends on the search query and available products on carrefouruae.com. Use the `maxResults` parameter to control how many results are returned per run.

#### Does Carrefour MAF Grocery Scraper support recurring monitoring?

Yes. Enable incremental mode to only receive new or changed products on subsequent runs. This is ideal for scheduled monitoring where you want to track changes over time without re-processing the full dataset.

#### Can I integrate Carrefour MAF Grocery Scraper with other apps?

Yes. Carrefour MAF Grocery Scraper works with Apify's [integrations](https://apify.com/integrations?fpr=1h3gvi) to connect with tools like Zapier, Make, Google Sheets, Slack, and more. You can also use webhooks to trigger actions when a run completes.

#### Can I use Carrefour MAF Grocery Scraper with the Apify API?

Yes. You can start runs, manage inputs, and retrieve results programmatically through the [Apify API](https://docs.apify.com/api/v2). Client libraries are available for JavaScript, Python, and other languages.

#### Can I use Carrefour MAF Grocery Scraper through an MCP Server?

Yes. Apify provides an [MCP Server](https://apify.com/apify/actors-mcp-server?fpr=1h3gvi) that lets AI assistants and agents call this actor directly. Use compact mode, `descriptionMaxLength`, a single `descriptionFormat`, and `excludeEmptyFields` to keep payloads manageable for LLM context windows.

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

This actor extracts publicly available data from carrefouruae.com. Web scraping of public information is generally considered legal, but you should always review the target site's terms of service and ensure your use case complies with applicable laws and regulations, including GDPR where relevant.

#### Your feedback

If you have questions, need a feature, or found a bug, please [open an issue](https://apify.com/blackfalcondata/carrefour-maf-scraper/issues?fpr=1h3gvi) on the actor's page in Apify Console. Your feedback helps us improve.

### You might also like

- [Bilka Scraper - Danish Grocery Products & Prices](https://apify.com/blackfalcondata/bilka-scraper?fpr=1h3gvi) — Scrape Bilka (Salling Group), Denmark's largest hypermarket chain. Get the full product catalog.
- [Carrefour Product Scraper](https://apify.com/blackfalcondata/carrefour-scraper?fpr=1h3gvi) — Scrape carrefour.fr for Carrefour France products with current prices, availability, GTINs,.
- [Coop365 Scraper - Danish Grocery Products & Prices](https://apify.com/blackfalcondata/coop365-scraper?fpr=1h3gvi) — Scrape current Coop365 leaflet rows from 365discount.coop.dk with structured names, prices, unit.
- [Føtex Scraper - Danish Grocery Products & Prices](https://apify.com/blackfalcondata/foetex-scraper?fpr=1h3gvi) — Scrape Føtex (Salling Group), one of Denmark's largest supermarket chains. Get the full product.
- [Kvickly Scraper - Danish Grocery Products & Prices](https://apify.com/blackfalcondata/kvickly-scraper?fpr=1h3gvi) — Scrape current Kvickly leaflet rows from www.kvickly.dk with structured names, prices, unit.
- [Lidl Scraper - European Grocery Products & Prices](https://apify.com/blackfalcondata/lidl-scraper?fpr=1h3gvi) — Scrape Lidl grocery products and prices across 28 European markets, each row tagged by country. Get.
- [Nemlig Scraper - Danish Online Grocery Products & Prices](https://apify.com/blackfalcondata/nemlig-scraper?fpr=1h3gvi) — Scrape Nemlig grocery products from nemlig.com as structured JSON with shelf prices, current.
- [Netto Scraper - Danish Grocery Products & Prices](https://apify.com/blackfalcondata/netto-scraper?fpr=1h3gvi) — Scrape Netto (Salling Group), Denmark's largest discount-grocery chain. Get the full product.

### Getting started with Apify

New to Apify? [Create a free account with $5 credit](https://console.apify.com/sign-up?fpr=1h3gvi\&fp_sid=ctarich) — no credit card required.

1. Sign up — $5 platform credit included
2. Open this actor and configure your input
3. Click **Start** — export results as JSON, CSV, or Excel

Need more later? [See Apify pricing](https://apify.com/pricing?fpr=1h3gvi).

# Actor input Schema

## `productIds` (type: `array`):

Track a basket by GTIN, product ID or product URL. Pair with quantities for line totals.

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

Carrefour MAF product URLs to scrape directly, e.g. https://www.carrefouruae.com/mafuae/en/p/1872989.

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

Carrefour MAF category or search URLs. Filters and sort parameters are preserved.

## `startUrls` (type: `array`):

Paste product, search or category URLs. Product URLs are scraped directly; search/category URLs keep filters and sort parameters.

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

Product search keywords. Use one term like "milk" or a JSON array such as \["milk","rice"].

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

Single Carrefour MAF market. Use Markets below to scrape several markets in one run.

## `markets` (type: `array`):

Optional list of markets to scrape in one run, e.g. mafuae, mafsau, mafegy. Overrides Market for generated query, category ID and basket scopes.

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

Request English or Arabic product text. Pasted /en/ or /ar/ URLs override this per URL.

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

Local category filter after fetch. Use terms such as "Dairy", "Electronics", "Fresh Food" or "Baby".

## `rayonIds` (type: `array`):

Advanced MAF category IDs used as category routes, e.g. F21600000 for Dairy & Eggs on UAE.

## `quantities` (type: `object,string`):

Optional per-product quantities, e.g. {"1872989": 2}.

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

Maximum product rows to push. Use 0 for all rows in the selected scope.

## `maxResultsPerScrape` (type: `integer`):

Compatibility alias for maxResults. If maxResults is not set, this value is used.

## `usePagination` (type: `boolean`):

Whether to fetch additional pages after the first page for query/category runs.

## `pageSize` (type: `integer`):

Products requested per page.

## `priceMin` (type: `number`):

Only emit products with price greater than or equal to this value.

## `priceMax` (type: `number`):

Only emit products with price less than or equal to this value.

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

Drop products flagged as unavailable.

## `ingredientFilter` (type: `string`):

Case-insensitive substring filter on detailed ingredient text. Use a single term or JSON array of terms that all must match.

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

Optional ordering before maxResults is applied.

## `includeDetails` (type: `boolean`):

Fetch each product page for extra metadata such as meta description and brand details. Disabled by default because MAF product detail pages are large; enable for smaller runs.

## `compact` (type: `boolean`):

Keep only the core product, price, availability, basket and image fields.

## `excludeEmptyFields` (type: `boolean`):

Drop null, empty-string and empty-array fields from each record before push.

## `descriptionFormat` (type: `string`):

Pick a single description representation.

## `descriptionMaxLength` (type: `integer`):

Truncate product description text after this many characters. Use 0 for no truncation.

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

Compare against previous runs for the same scope and emit changeType for new, updated, unchanged or expired products.

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

Optional stable ID for the tracked search/basket universe. Leave empty to auto-generate from search inputs.

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

Include products with no detected change in incremental output.

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

Include products that disappeared since the previous run for the same state key.

## `skipReposts` (type: `boolean`):

When incremental mode is enabled, skip products whose content matches a prior expired row.

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

When incremental mode is enabled, only send notifications for changed products.

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

Maximum number of products included in each notification message.

## `telegramToken` (type: `string`):

Telegram bot token from @BotFather.

## `telegramChatId` (type: `string`):

Telegram chat or channel ID.

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

Discord incoming webhook URL.

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

Slack incoming webhook URL.

## `whatsappAccessToken` (type: `string`):

WhatsApp Cloud API access token.

## `whatsappPhoneNumberId` (type: `string`):

WhatsApp Business phone-number ID.

## `whatsappTo` (type: `string`):

Recipient phone in E.164 format without +.

## `webhookUrl` (type: `string`):

Receives a JSON POST with {metadata, items} after each run.

## `webhookHeaders` (type: `object`):

Optional JSON object of custom headers.

## `appConnector` (type: `string`):

Optional. Pick a connected app under Settings -> API & Integrations to receive your results. Notion is supported today (a run-summary page); other MCP connectors are best-effort as Apify expands its catalog.

## `mcpIssueTeam` (type: `string`):

Only when the connected app is an issue tracker: the team (name or ID) the summary issue is created under, if that app requires one.

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

Network routing for all requests. Automatic routing is recommended and enabled by default; advanced users can select specific groups or a country, or supply their own endpoints.

## Actor input object example

```json
{
  "productIds": [],
  "productUrls": [],
  "categoryUrls": [],
  "startUrls": [],
  "query": "milk",
  "market": "mafuae",
  "markets": [],
  "language": "en",
  "categories": [],
  "rayonIds": [],
  "quantities": {},
  "maxResults": 5,
  "usePagination": true,
  "pageSize": 60,
  "inStockOnly": false,
  "includeDetails": false,
  "compact": false,
  "excludeEmptyFields": false,
  "descriptionFormat": "all",
  "descriptionMaxLength": 0,
  "incrementalMode": false,
  "emitUnchanged": false,
  "emitExpired": false,
  "skipReposts": false,
  "notifyOnlyChanges": false,
  "notificationLimit": 5,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `results` (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 = {
    "query": "milk",
    "market": "mafuae",
    "language": "en",
    "maxResults": 5,
    "excludeEmptyFields": false,
    "descriptionFormat": "all",
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("blackfalcondata/carrefour-maf-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 = {
    "query": "milk",
    "market": "mafuae",
    "language": "en",
    "maxResults": 5,
    "excludeEmptyFields": False,
    "descriptionFormat": "all",
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("blackfalcondata/carrefour-maf-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "query": "milk",
  "market": "mafuae",
  "language": "en",
  "maxResults": 5,
  "excludeEmptyFields": false,
  "descriptionFormat": "all",
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call blackfalcondata/carrefour-maf-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=blackfalcondata/carrefour-maf-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Carrefour MAF Grocery Scraper",
        "description": "Scrape Carrefour MAF grocery products across all seven Majid Al Futtaim markets — UAE, Saudi Arabia, Egypt, Qatar, Pakistan, Lebanon and Kenya — in English or Arabic. Track live prices and availability, ingredient and nutrition detail, and incremental price changes as JSON.",
        "version": "0.1",
        "x-build-id": "Ie6nuRGDofvPLFNRi"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/blackfalcondata~carrefour-maf-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-blackfalcondata-carrefour-maf-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/blackfalcondata~carrefour-maf-scraper/runs": {
            "post": {
                "operationId": "runs-sync-blackfalcondata-carrefour-maf-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/blackfalcondata~carrefour-maf-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-blackfalcondata-carrefour-maf-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "productIds": {
                        "title": "🛍️ Basket — GTINs / product IDs",
                        "type": "array",
                        "description": "Track a basket by GTIN, product ID or product URL. Pair with quantities for line totals.",
                        "items": {
                            "type": "string"
                        },
                        "default": []
                    },
                    "productUrls": {
                        "title": "🔗 Product URLs",
                        "type": "array",
                        "description": "Carrefour MAF product URLs to scrape directly, e.g. https://www.carrefouruae.com/mafuae/en/p/1872989.",
                        "items": {
                            "type": "string"
                        },
                        "default": []
                    },
                    "categoryUrls": {
                        "title": "📂 Category URLs",
                        "type": "array",
                        "description": "Carrefour MAF category or search URLs. Filters and sort parameters are preserved.",
                        "items": {
                            "type": "string"
                        },
                        "default": []
                    },
                    "startUrls": {
                        "title": "🔗 Start URLs",
                        "type": "array",
                        "description": "Paste product, search or category URLs. Product URLs are scraped directly; search/category URLs keep filters and sort parameters.",
                        "items": {
                            "type": "string"
                        },
                        "default": []
                    },
                    "query": {
                        "title": "🔍 Search term(s)",
                        "type": "string",
                        "description": "Product search keywords. Use one term like \"milk\" or a JSON array such as [\"milk\",\"rice\"].",
                        "default": ""
                    },
                    "market": {
                        "title": "🌍 Market",
                        "enum": [
                            "mafuae",
                            "mafsau",
                            "mafegy",
                            "mafqat",
                            "mafpak",
                            "maflbn",
                            "mafken"
                        ],
                        "type": "string",
                        "description": "Single Carrefour MAF market. Use Markets below to scrape several markets in one run.",
                        "default": "mafuae"
                    },
                    "markets": {
                        "title": "🌍 Markets",
                        "type": "array",
                        "description": "Optional list of markets to scrape in one run, e.g. mafuae, mafsau, mafegy. Overrides Market for generated query, category ID and basket scopes.",
                        "items": {
                            "type": "string"
                        },
                        "default": []
                    },
                    "language": {
                        "title": "🌐 Language",
                        "enum": [
                            "en",
                            "ar"
                        ],
                        "type": "string",
                        "description": "Request English or Arabic product text. Pasted /en/ or /ar/ URLs override this per URL.",
                        "default": "en"
                    },
                    "categories": {
                        "title": "🗂️ Category terms",
                        "type": "array",
                        "description": "Local category filter after fetch. Use terms such as \"Dairy\", \"Electronics\", \"Fresh Food\" or \"Baby\".",
                        "items": {
                            "type": "string"
                        },
                        "default": []
                    },
                    "rayonIds": {
                        "title": "🏷️ Carrefour MAF category IDs",
                        "type": "array",
                        "description": "Advanced MAF category IDs used as category routes, e.g. F21600000 for Dairy & Eggs on UAE.",
                        "items": {
                            "type": "string"
                        },
                        "default": []
                    },
                    "quantities": {
                        "title": "🔢 Basket quantities",
                        "description": "Optional per-product quantities, e.g. {\"1872989\": 2}.",
                        "default": {}
                    },
                    "maxResults": {
                        "title": "💯 Max results",
                        "minimum": 0,
                        "maximum": 50000,
                        "type": "integer",
                        "description": "Maximum product rows to push. Use 0 for all rows in the selected scope.",
                        "default": 50
                    },
                    "maxResultsPerScrape": {
                        "title": "💯 Max results per scrape",
                        "minimum": 0,
                        "maximum": 50000,
                        "type": "integer",
                        "description": "Compatibility alias for maxResults. If maxResults is not set, this value is used."
                    },
                    "usePagination": {
                        "title": "➡️ Use pagination",
                        "type": "boolean",
                        "description": "Whether to fetch additional pages after the first page for query/category runs.",
                        "default": true
                    },
                    "pageSize": {
                        "title": "📄 Page size",
                        "minimum": 1,
                        "maximum": 60,
                        "type": "integer",
                        "description": "Products requested per page.",
                        "default": 60
                    },
                    "priceMin": {
                        "title": "💰 Min price",
                        "minimum": 0,
                        "type": "number",
                        "description": "Only emit products with price greater than or equal to this value."
                    },
                    "priceMax": {
                        "title": "💰 Max price",
                        "minimum": 0,
                        "type": "number",
                        "description": "Only emit products with price less than or equal to this value."
                    },
                    "inStockOnly": {
                        "title": "📦 In stock only",
                        "type": "boolean",
                        "description": "Drop products flagged as unavailable.",
                        "default": false
                    },
                    "ingredientFilter": {
                        "title": "🥗 Ingredient filter",
                        "type": "string",
                        "description": "Case-insensitive substring filter on detailed ingredient text. Use a single term or JSON array of terms that all must match."
                    },
                    "sortBy": {
                        "title": "↕️ Sort by",
                        "enum": [
                            "price-asc",
                            "price-desc",
                            "line-asc",
                            "line-desc",
                            "name-asc",
                            "rating-desc"
                        ],
                        "type": "string",
                        "description": "Optional ordering before maxResults is applied."
                    },
                    "includeDetails": {
                        "title": "📋 Include product details",
                        "type": "boolean",
                        "description": "Fetch each product page for extra metadata such as meta description and brand details. Disabled by default because MAF product detail pages are large; enable for smaller runs.",
                        "default": false
                    },
                    "compact": {
                        "title": "📦 Compact output",
                        "type": "boolean",
                        "description": "Keep only the core product, price, availability, basket and image fields.",
                        "default": false
                    },
                    "excludeEmptyFields": {
                        "title": "🧹 Exclude empty fields",
                        "type": "boolean",
                        "description": "Drop null, empty-string and empty-array fields from each record before push.",
                        "default": false
                    },
                    "descriptionFormat": {
                        "title": "📝 Description format",
                        "enum": [
                            "all",
                            "text"
                        ],
                        "type": "string",
                        "description": "Pick a single description representation.",
                        "default": "all"
                    },
                    "descriptionMaxLength": {
                        "title": "✂️ Description max length",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Truncate product description text after this many characters. Use 0 for no truncation.",
                        "default": 0
                    },
                    "incrementalMode": {
                        "title": "♻️ Incremental mode",
                        "type": "boolean",
                        "description": "Compare against previous runs for the same scope and emit changeType for new, updated, unchanged or expired products.",
                        "default": false
                    },
                    "stateKey": {
                        "title": "🔑 State key",
                        "type": "string",
                        "description": "Optional stable ID for the tracked search/basket universe. Leave empty to auto-generate from search inputs."
                    },
                    "emitUnchanged": {
                        "title": "📤 Emit unchanged",
                        "type": "boolean",
                        "description": "Include products with no detected change in incremental output.",
                        "default": false
                    },
                    "emitExpired": {
                        "title": "🚮 Emit expired",
                        "type": "boolean",
                        "description": "Include products that disappeared since the previous run for the same state key.",
                        "default": false
                    },
                    "skipReposts": {
                        "title": "🚫 Skip reposts",
                        "type": "boolean",
                        "description": "When incremental mode is enabled, skip products whose content matches a prior expired row.",
                        "default": false
                    },
                    "notifyOnlyChanges": {
                        "title": "🔄 Notify only new/updated",
                        "type": "boolean",
                        "description": "When incremental mode is enabled, only send notifications for changed products.",
                        "default": false
                    },
                    "notificationLimit": {
                        "title": "📊 Max products per notification",
                        "minimum": 1,
                        "maximum": 20,
                        "type": "integer",
                        "description": "Maximum number of products included in each notification message.",
                        "default": 5
                    },
                    "telegramToken": {
                        "title": "🔑 Telegram bot token",
                        "type": "string",
                        "description": "Telegram bot token from @BotFather."
                    },
                    "telegramChatId": {
                        "title": "💬 Telegram chat ID",
                        "type": "string",
                        "description": "Telegram chat or channel ID."
                    },
                    "discordWebhookUrl": {
                        "title": "🎮 Discord webhook URL",
                        "type": "string",
                        "description": "Discord incoming webhook URL."
                    },
                    "slackWebhookUrl": {
                        "title": "💼 Slack webhook URL",
                        "type": "string",
                        "description": "Slack incoming webhook URL."
                    },
                    "whatsappAccessToken": {
                        "title": "📱 WhatsApp access token",
                        "type": "string",
                        "description": "WhatsApp Cloud API access token."
                    },
                    "whatsappPhoneNumberId": {
                        "title": "📞 WhatsApp phone number ID",
                        "type": "string",
                        "description": "WhatsApp Business phone-number ID."
                    },
                    "whatsappTo": {
                        "title": "📲 WhatsApp recipient",
                        "type": "string",
                        "description": "Recipient phone in E.164 format without +."
                    },
                    "webhookUrl": {
                        "title": "🪝 Generic webhook URL",
                        "type": "string",
                        "description": "Receives a JSON POST with {metadata, items} after each run."
                    },
                    "webhookHeaders": {
                        "title": "📋 Webhook headers",
                        "type": "object",
                        "description": "Optional JSON object of custom headers."
                    },
                    "appConnector": {
                        "title": "📤 Send results to Notion (or another connected app)",
                        "type": "string",
                        "description": "Optional. Pick a connected app under Settings -> API & Integrations to receive your results. Notion is supported today (a run-summary page); other MCP connectors are best-effort as Apify expands its catalog."
                    },
                    "mcpIssueTeam": {
                        "title": "🎫 Issue tracker team",
                        "type": "string",
                        "description": "Only when the connected app is an issue tracker: the team (name or ID) the summary issue is created under, if that app requires one."
                    },
                    "proxyConfiguration": {
                        "title": "🌐 Proxy configuration",
                        "type": "object",
                        "description": "Network routing for all requests. Automatic routing is recommended and enabled by default; advanced users can select specific groups or a country, or supply their own endpoints.",
                        "default": {
                            "useApifyProxy": true
                        }
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
