{
  "openapi": "3.0.1",
  "info": {
    "title": "Marjane Mall Scraper",
    "description": "All Marjane Mall products from Morocco's official sitemaps: name, brand, price, previous price, discount, stock, seller, categories, specs and images. Prices are compared between runs, so a daily schedule reports only what moved. Example: leave the input empty for a 1,000-product sample.",
    "version": "1.1",
    "x-build-id": "GBB2Ye8yKpSKcr7sw"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/badr_xba~marjane-mall-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-badr_xba-marjane-mall-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/badr_xba~marjane-mall-scraper/runs": {
      "post": {
        "operationId": "runs-sync-badr_xba-marjane-mall-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/badr_xba~marjane-mall-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-badr_xba-marjane-mall-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": {
          "startUrls": {
            "title": "🔗 Marjane Mall links (optional)",
            "type": "array",
            "description": "Leave empty to read the whole catalogue (limited by Maximum products). Or paste Marjane Mall links, one per line — several links in one line, links without https://, tracking parameters (?utm_…) and duplicates are all fine.<br><br>• <b>Product page</b>: <code>https://www.marjanemall.ma/p/tapis-receveur-de-douche-anti-derapant-blanc-aaaaa32198</code> → that product is scraped directly (fast).<br>• <b>Category page</b>: <code>https://www.marjanemall.ma/electromenager</code> → products of that category are collected from the catalogue.<br>• <b>Official store</b>: <code>https://www.marjanemall.ma/boutique-officielle/dyson</code> → products of that brand.<br>• <b>Search</b>: <code>https://www.marjanemall.ma/search?q=airfryer</code> or just a keyword like <code>machine à café</code> → products whose name contains all the words.<br><br>Category, store and search links are matched while reading the catalogue sitemaps, so a very narrow one can take a while. Links that cannot be used are listed in FAILED_INPUTS (never billed).",
            "items": {
              "type": "string"
            }
          },
          "maxItems": {
            "title": "Maximum products",
            "minimum": 0,
            "type": "integer",
            "description": "Exact number of products saved (and billed). With filters, the Actor keeps reading product pages until this number of matching products is reached. Set 0 for no limit (the whole catalogue is around 380,000 product pages). It also caps a list of product links. Start with 100 to see the data quickly.",
            "default": 300
          },
          "minPrice": {
            "title": "Minimum price",
            "minimum": 0,
            "type": "integer",
            "description": "Keep only products at this price or above, in Moroccan dirhams (MAD)."
          },
          "maxPrice": {
            "title": "Maximum price",
            "minimum": 0,
            "type": "integer",
            "description": "Keep only products at this price or below, in MAD."
          },
          "minDiscountPercent": {
            "title": "Minimum discount (%)",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Keep only products discounted by at least this much."
          },
          "onlyInStock": {
            "title": "In stock only",
            "type": "boolean",
            "description": "Drops products marked as out of stock.",
            "default": false
          },
          "categoryKeywords": {
            "title": "Category contains",
            "type": "array",
            "description": "Keep only products whose category contains one of these words, for example électroménager, informatique, bébé. Accents and capitals are ignored.",
            "items": {
              "type": "string"
            }
          },
          "nameKeywords": {
            "title": "Name contains",
            "type": "array",
            "description": "Keep only products whose name contains one of these words.",
            "items": {
              "type": "string"
            }
          },
          "excludeKeywords": {
            "title": "Name excludes",
            "type": "array",
            "description": "Exclude products whose name contains one of these words.",
            "items": {
              "type": "string"
            }
          },
          "trackPriceChanges": {
            "title": "Track prices between runs",
            "type": "boolean",
            "description": "Remembers each price to report the previous price, the change and its percentage on the next run.",
            "default": true
          },
          "onlyChangedProducts": {
            "title": "Only changed products",
            "type": "boolean",
            "description": "Saves only products whose price or stock moved since the last run. Ideal for a daily watch: you pay for the changes, not the catalogue.",
            "default": false
          },
          "sendEmailAlerts": {
            "title": "Send e-mail alerts",
            "type": "boolean",
            "description": "Sends price drops and back-in-stock products to your Apify account e-mail. Requires full permissions — see the FAQ.",
            "default": false
          },
          "alertMinPriceDropPercent": {
            "title": "Minimum drop to alert (%)",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Only price drops of at least this size trigger an alert.",
            "default": 10
          },
          "alertBackInStock": {
            "title": "Alert on back in stock",
            "type": "boolean",
            "description": "Alerts when a product is available again.",
            "default": true
          },
          "alertNewProducts": {
            "title": "Alert on new products",
            "type": "boolean",
            "description": "Alerts when a product appears for the first time.",
            "default": false
          },
          "botContact": {
            "title": "Bot contact",
            "type": "string",
            "description": "A URL or e-mail put in the User-Agent so the site can identify the crawler. Left empty, the Actor's own page is used."
          },
          "maxRequestsPerMinute": {
            "title": "Requests per minute",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Crawling speed. Marjane Mall publishes no limit; 180 is brisk without being aggressive. Lower it if the site starts refusing.",
            "default": 180
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Marjane Mall refuses datacenter addresses: keep the RESIDENTIAL group with country Morocco (MA), or runs come back empty. A blocked request is retried from a new IP address automatically.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ],
              "apifyProxyCountry": "MA"
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}