{
  "openapi": "3.0.1",
  "info": {
    "title": "Marks & Spencer Scraper - Products, Prices, Stock & Reviews",
    "description": "Collect marksandspencer.com (M&S) products and individual reviews from keyword searches, categories or product links. Get prices, all colour galleries, size-level inventory, composition, care, ratings, and review responses, with filters, sorting, resume and recurring updates.",
    "version": "0.1",
    "x-build-id": "MPZ2RdTGBzjrkIqOd"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/abotapi~marksandspencer-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-abotapi-marksandspencer-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/abotapi~marksandspencer-scraper/runs": {
      "post": {
        "operationId": "runs-sync-abotapi-marksandspencer-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/abotapi~marksandspencer-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-abotapi-marksandspencer-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",
        "required": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "Input mode",
            "enum": [
              "search",
              "url"
            ],
            "type": "string",
            "description": "Choose keyword search or pasted links. Only the inputs in the selected mode are used.",
            "default": "search"
          },
          "searchTerms": {
            "title": "Search terms",
            "type": "array",
            "description": "Search each term separately. Defaults to cashmere jumper. Ignored when category is filled or mode is url.",
            "items": {
              "type": "string"
            }
          },
          "department": {
            "title": "Department",
            "type": "string",
            "description": "Optional clothing department: Womens or Mens. Applies the store department filter in search mode only."
          },
          "category": {
            "title": "Category",
            "type": "string",
            "description": "Optional category path, category link or SubCategory identifier. Browse this category instead of search terms. Search filters and sort still apply."
          },
          "brands": {
            "title": "Brands",
            "type": "array",
            "description": "Optional exact brand names shown in the store filters, such as Autograph or JAEGER. Search mode only.",
            "items": {
              "type": "string"
            }
          },
          "colours": {
            "title": "Colours",
            "type": "array",
            "description": "Optional colour filter names, such as Navy or Black. Search mode only.",
            "items": {
              "type": "string"
            }
          },
          "sizes": {
            "title": "Sizes",
            "type": "array",
            "description": "Optional exact size filter labels, such as S, M or 10. Search mode only.",
            "items": {
              "type": "string"
            }
          },
          "facet": {
            "title": "Additional filters",
            "type": "array",
            "description": "Optional native filter pairs, one per line, such as Fit=Regular fit or Neck Type=Crew neck. Use the exact filter name and value shown for your search. Search mode only.",
            "items": {
              "type": "string"
            }
          },
          "minPrice": {
            "title": "Minimum price",
            "minimum": 0,
            "type": "integer",
            "description": "Optional minimum price in GBP. Search mode only."
          },
          "maxPrice": {
            "title": "Maximum price",
            "minimum": 0,
            "type": "integer",
            "description": "Optional maximum price in GBP. Search mode only."
          },
          "minRating": {
            "title": "Minimum product rating",
            "minimum": 0,
            "maximum": 5,
            "type": "integer",
            "description": "Optional minimum average product rating from 0 to 5. Search mode only."
          },
          "sortBy": {
            "title": "Product sort",
            "enum": [
              "relevance",
              "new",
              "best_selling",
              "price_low",
              "price_high",
              "rating"
            ],
            "type": "string",
            "description": "Use the store ordering in search mode. URL mode preserves the ordering specified in each link.",
            "default": "relevance"
          },
          "urls": {
            "title": "Product, category or search links",
            "type": "array",
            "description": "Paste one or more M&S product, category or search links. Defaults to an example product. Search-mode fields are ignored. Results begin at the page specified in each link.",
            "items": {
              "type": "string"
            }
          },
          "outputType": {
            "title": "Output records",
            "enum": [
              "products",
              "reviews",
              "products_and_reviews"
            ],
            "type": "string",
            "description": "Products saves product rows. Reviews saves individual review rows. Products and reviews saves both, joined by productId. Saved products count toward Max items; saved reviews count toward Max reviews, a separate budget.",
            "default": "products"
          },
          "fetchDetails": {
            "title": "Include product details",
            "type": "boolean",
            "description": "Add full descriptions, composition, care, all colour galleries and size-level inventory. Each successfully saved enriched product adds one detail-enrichment charge. Reviews are separate saved items. Suppressed, skipped and failed rows do not add this charge.",
            "default": true
          },
          "reviewSort": {
            "title": "Review sort",
            "enum": [
              "recent",
              "ratingHigh",
              "ratingLow",
              "helpful"
            ],
            "type": "string",
            "description": "Ordering for individual review rows in Reviews or Products and reviews output.",
            "default": "recent"
          },
          "reviewRatings": {
            "title": "Review stars",
            "type": "array",
            "description": "Optional exact star ratings to include, from 1 to 5. Empty includes all ratings. Applies to review output only.",
            "items": {
              "type": "string",
              "enum": [
                "1",
                "2",
                "3",
                "4",
                "5"
              ]
            }
          },
          "maxReviewsPerProduct": {
            "title": "Maximum reviews per product",
            "minimum": 0,
            "type": "integer",
            "description": "Optional limit on individual review rows per product. Blank or 0 collects all available reviews for that product until Max reviews is reached. No separate default per-product cap."
          },
          "maxPages": {
            "title": "Maximum pages per source",
            "minimum": 0,
            "type": "integer",
            "description": "Optional limit on result or review pages per source. Blank or 0 means unlimited pages until the source ends or Max items is reached. No default page cap."
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum saved product rows across the run, including recurring update rows. Default 20. Set 0 for unlimited products. Reviews use the separate Max reviews budget and never count against this.",
            "default": 20
          },
          "maxReviews": {
            "title": "Max reviews",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum saved review rows across the run, independent of Max items. Default 20. Set 0 for unlimited reviews (still bounded by Maximum reviews per product and Maximum pages per source, if set).",
            "default": 20
          },
          "resumeFromRunId": {
            "title": "Resume from a run or dataset",
            "type": "string",
            "description": "Optional previous run or dataset ID. Skip previously saved product and review IDs. Combine datasets to continue a collection. Resumed runs do not emit expired rows. For recurring collection, use incrementalMode instead."
          },
          "incrementalMode": {
            "title": "Recurring updates",
            "type": "boolean",
            "description": "Remember this exact collection scope between runs. Return NEW, UPDATED or REAPPEARED rows. Use stateKey to name the collection, emitUnchanged to include unchanged rows and emitExpired for missing rows.",
            "default": false
          },
          "stateKey": {
            "title": "Collection state key",
            "type": "string",
            "description": "Optional name for a recurring collection. The selected mode, terms or links, filters, detail setting and review options also identify its baseline. Different scopes never share a baseline."
          },
          "emitUnchanged": {
            "title": "Include unchanged rows",
            "type": "boolean",
            "description": "Incremental mode only. Also save unchanged products or reviews marked UNCHANGED. Each saved row is charged as an item; saved enriched products can add the detail charge.",
            "default": false
          },
          "emitExpired": {
            "title": "Include missing rows",
            "type": "boolean",
            "description": "Incremental mode only. Save EXPIRED rows after a complete collection. No expiration after a cap, resumed run or incomplete source. Expired rows count as saved items and do not add a detail charge.",
            "default": false
          },
          "proxy": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Standard Apify connection configuration."
          },
          "mcpConnectors": {
            "title": "Pipe results into your apps (optional)",
            "type": "array",
            "description": "Optionally send results into the apps you already use, via Model Context Protocol (MCP) connectors. Authorize one under Apify, Settings, API & Integrations, then select it here. Notion gets a page per record; other connectors get a best-effort write or digest. Each connector receives a condensed summary per record, not the full record; the complete record always stays in the dataset. Leave empty to skip; this never changes the dataset output. Supported: Notion (https://mcp.notion.com/mcp), Linear (https://mcp.linear.app/sse), Airtable (https://mcp.airtable.com/mcp), Apify (https://mcp.apify.com)."
          },
          "notionParentPageUrl": {
            "title": "Notion parent page (Notion connector only)",
            "type": "string",
            "description": "URL or id of the Notion page under which record pages are created. Required to enable the Notion export; ignored by other connectors."
          },
          "maxNotifyListings": {
            "title": "Max items to export per connector",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum saved items to send to each selected connector. Does not limit or change the dataset.",
            "default": 50
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}