{
  "openapi": "3.0.1",
  "info": {
    "title": "Carrefour MAF Scraper",
    "description": "Scrape Carrefour UAE, KSA, Egypt, Qatar and 6 more MAF stores: prices, discounts, stock, brand, seller, ratings and categories. Search, category, product ID or URL, with change tracking.",
    "version": "1.0",
    "x-build-id": "jXMXrG88i8gj2fM0l"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/parsebird~carrefour-maf-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-parsebird-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/parsebird~carrefour-maf-scraper/runs": {
      "post": {
        "operationId": "runs-sync-parsebird-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/parsebird~carrefour-maf-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-parsebird-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": {
          "queries": {
            "title": "Search queries",
            "type": "array",
            "description": "Enter product keywords, the same as typing in the store's search box (e.g. milk, rice, iphone). Each keyword is a separate search.",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "Start URLs",
            "type": "array",
            "description": "Paste Carrefour MAF search, category or product URLs, e.g. https://www.carrefouruae.com/mafuae/en/search?keyword=rice or https://www.carrefouruae.com/mafuae/en/c/F21600000. Search URLs keep their sort and filters. The market and language come from the URL.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "productIds": {
            "title": "Product IDs",
            "type": "array",
            "description": "Track a basket: enter product IDs (e.g. 1872989) or product URLs. IDs are looked up in the selected market(s); each market has its own IDs, while product URLs carry their own market. Pair with Quantities for line totals.",
            "items": {
              "type": "string"
            }
          },
          "categoryIds": {
            "title": "Category IDs",
            "type": "array",
            "description": "Scrape whole categories, e.g. F21600000 (Dairy & Eggs on Carrefour UAE). Category names such as Dairy & Eggs also work. With search queries, each query is searched inside each category. Every result has a categoryIds field you can reuse here.",
            "items": {
              "type": "string"
            }
          },
          "market": {
            "title": "Market",
            "enum": [
              "mafuae",
              "mafsau",
              "mafegy",
              "mafqat",
              "maflbn",
              "mafpak",
              "mafken",
              "mafbhr",
              "mafjor",
              "mafomn"
            ],
            "type": "string",
            "description": "Choose the store. Use Markets below to scrape several stores in one run.",
            "default": "mafuae"
          },
          "markets": {
            "title": "Markets",
            "type": "array",
            "description": "Optional. Pick several stores to run the same queries, categories and product IDs in each. Overrides Market.",
            "items": {
              "type": "string",
              "enum": [
                "mafuae",
                "mafsau",
                "mafegy",
                "mafqat",
                "maflbn",
                "mafpak",
                "mafken",
                "mafbhr",
                "mafjor",
                "mafomn"
              ],
              "enumTitles": [
                "Carrefour UAE (AED)",
                "Carrefour Saudi Arabia (SAR)",
                "Carrefour Egypt (EGP)",
                "Carrefour Qatar (QAR)",
                "Carrefour Lebanon (LBP)",
                "Carrefour Pakistan (PKR)",
                "Carrefour Kenya (KES)",
                "HyperMax Bahrain (BHD)",
                "HyperMax Jordan (JOD)",
                "HyperMax Oman (OMR)"
              ]
            }
          },
          "language": {
            "title": "Language",
            "enum": [
              "en",
              "ar"
            ],
            "type": "string",
            "description": "Language of product titles and category names. Pasted /en/ or /ar/ URLs use their own language.",
            "default": "en"
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "relevance",
              "price_asc",
              "price_desc"
            ],
            "type": "string",
            "description": "Order of search results.",
            "default": "relevance"
          },
          "brands": {
            "title": "Brands",
            "type": "array",
            "description": "Only products of these brands, e.g. Almarai. Spelling is matched to the store's brand list.",
            "items": {
              "type": "string"
            }
          },
          "minPrice": {
            "title": "Min price",
            "minimum": 0,
            "type": "integer",
            "description": "Only products priced at or above this amount, in the market's currency."
          },
          "maxPrice": {
            "title": "Max price",
            "minimum": 0,
            "type": "integer",
            "description": "Only products priced at or below this amount, in the market's currency."
          },
          "dealsOnly": {
            "title": "Deals only",
            "type": "boolean",
            "description": "Only products in the store's Today's Deals.",
            "default": false
          },
          "fulfilledByCarrefour": {
            "title": "Fulfilled by Carrefour only",
            "type": "boolean",
            "description": "Only products stocked and shipped by Carrefour, including marketplace items it fulfils.",
            "default": false
          },
          "inStockOnly": {
            "title": "In-stock products only",
            "type": "boolean",
            "description": "Leave out products the store shows as out of stock.",
            "default": false
          },
          "categories": {
            "title": "Category name filter",
            "type": "array",
            "description": "Keep only products whose category path contains one of these words, e.g. Dairy, Electronics, Baby. Applied after the search, so prefer Category IDs to scrape a category.",
            "items": {
              "type": "string"
            }
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum number of products for the whole run, shared between queries, categories and markets. 0 = everything in the selected scope.",
            "default": 100
          },
          "compact": {
            "title": "Compact output",
            "type": "boolean",
            "description": "Return only the core fields (ID, title, brand, prices, stock, category, seller, URL). Smaller rows for AI agents and spreadsheets.",
            "default": false
          },
          "quantities": {
            "title": "Quantities",
            "type": "object",
            "description": "Optional basket quantities by product ID, e.g. {\"1872989\": 2}. Each row gets quantity and linePrice (price × quantity). Products not listed count as 1."
          },
          "incrementalMode": {
            "title": "Incremental mode",
            "type": "boolean",
            "description": "Output only products that are new or changed (price, regular price, stock, seller or discount) since the previous run with the same State key. The first run outputs everything and saves the baseline.",
            "default": false
          },
          "stateKey": {
            "title": "State key",
            "type": "string",
            "description": "Name of the saved baseline, e.g. milk-tracker. Use a different key for each tracked scope.",
            "default": "default"
          },
          "emitUnchanged": {
            "title": "Include unchanged products",
            "type": "boolean",
            "description": "In incremental mode, also output products that did not change (changeType UNCHANGED).",
            "default": false
          },
          "emitExpired": {
            "title": "Include expired products",
            "type": "boolean",
            "description": "In incremental mode, also output tracked products that are no longer listed (changeType EXPIRED). Only detected when the run reads the whole scope, so set Max results to 0.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Apify Proxy spreads requests over several IPs, which avoids the store's rate limit on large runs.",
            "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}