{
  "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}