{
  "openapi": "3.0.1",
  "info": {
    "title": "MediaMarkt.es Scraper - Prices, Offers & Reviews",
    "description": "Scrape MediaMarkt Spain (mediamarkt.es) products: current price, strike-through original price + discount on offers, brand, EAN, category path, availability, image gallery, full spec sheet, other-seller offers, and reviews with ratings. Search keywords or paste links.",
    "version": "1.0",
    "x-build-id": "scpPFSBRUNpVvP8Kh"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/abotapi~mediamarkt-es-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-abotapi-mediamarkt-es-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~mediamarkt-es-scraper/runs": {
      "post": {
        "operationId": "runs-sync-abotapi-mediamarkt-es-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~mediamarkt-es-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-abotapi-mediamarkt-es-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": "Mode",
            "enum": [
              "search",
              "url"
            ],
            "type": "string",
            "description": "'search' finds products by keyword and/or a MediaMarkt category id, with the site's own brand/price filters and native sort. 'url' scrapes any product, category, or search listing page URL you paste, walking pagination forward automatically.",
            "default": "search"
          },
          "searchTerm": {
            "title": "Search keyword",
            "type": "string",
            "description": "Free-text keyword, e.g. 'portatil' or 'cafetera'. Leave empty if you set a Category id below."
          },
          "searchQueries": {
            "title": "Search keywords (several)",
            "type": "array",
            "description": "Several keywords in one run; each is searched in turn and results are de-duplicated. Added to Search keyword when both are set. maxItems caps the whole run.",
            "items": {
              "type": "string"
            }
          },
          "categoryId": {
            "title": "Category id",
            "type": "string",
            "description": "A MediaMarkt category: the numeric id (153), a pasted category URL (mediamarkt.es/es/category/portatiles-153.html), or a plain category name such as 'portatiles' (a plain name is searched as a keyword when the keyword field is empty). Combine with a keyword to search within a category, or leave the keyword empty to browse the whole category. Search mode only: URL mode reads this from the link you paste."
          },
          "urls": {
            "title": "URLs to scrape",
            "uniqueItems": true,
            "type": "array",
            "description": "Paste one or more MediaMarkt product pages (.../product/_<slug>-<id>.html), category pages (.../category/<slug>-<id>.html), or search listing pages (.../search.html?query=...). Pagination continues forward automatically from any ?page= already in the URL. Search-mode fields are ignored here. The fields in the Filters section still apply, including to a pasted product URL.",
            "default": [
              "https://www.mediamarkt.es/es/category/portatiles-153.html",
              "https://www.mediamarkt.es/es/category/portatiles-153.html?page=2",
              "https://www.mediamarkt.es/es/category/c-153.html",
              "https://www.mediamarkt.es/es/product/_portatil-lenovo-ideapad-slim-3-15arp10-153-wuxga-amd-ryzentm-7-170-16gb-ram-512gb-ssd-radeontm-680m-sin-sistema-operativo-sin-cargador-1625748.html",
              "https://www.mediamarkt.es/es/product/_p-1625748.html",
              "https://www.mediamarkt.es/es/search.html?query=portatil",
              "https://www.mediamarkt.es/es/search.html?query=portatil&page=2"
            ],
            "items": {
              "type": "string"
            }
          },
          "brands": {
            "title": "Brands",
            "uniqueItems": true,
            "type": "array",
            "description": "Only return products from these brands, e.g. 'APPLE', 'LENOVO', 'ASUS', 'HP'. Match the exact brand name as shown on the site. Leave empty for all brands. Applies in BOTH search mode and URL mode: the listing request is rebuilt for a pasted category or search URL, so the filter is sent with it.",
            "items": {
              "type": "string"
            }
          },
          "minRating": {
            "title": "Minimum rating",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "Only return products rated at or above this many stars, 1-5. Applies in BOTH search mode and URL mode: the listing request is rebuilt for a pasted category or search URL, so the filter is sent with it."
          },
          "minPrice": {
            "title": "Minimum price (EUR)",
            "type": "number",
            "description": "Only return products priced at or above this amount, in euros. Applies in BOTH search mode and URL mode: the listing request is rebuilt for a pasted category or search URL, so the filter is sent with it."
          },
          "maxPrice": {
            "title": "Maximum price (EUR)",
            "type": "number",
            "description": "Only return products priced at or below this amount, in euros. Applies in BOTH search mode and URL mode: the listing request is rebuilt for a pasted category or search URL, so the filter is sent with it."
          },
          "condition": {
            "title": "Condition",
            "enum": [
              "all",
              "new",
              "refurbished"
            ],
            "type": "string",
            "description": "new or refurbished, decided from the product's own offer (its default offer is the refurbished one, as marketplace refurbished units are), falling back to the site's 'reacondicionado' wording in the name or category path. Applied before rows are counted or billed.",
            "default": "all"
          },
          "sellerType": {
            "title": "Seller type",
            "enum": [
              "all",
              "mediamarkt",
              "marketplace"
            ],
            "type": "string",
            "description": "MediaMarkt itself or third-party marketplace sellers. Applied before rows are counted or billed.",
            "default": "all"
          },
          "sortBy": {
            "title": "Sort order",
            "enum": [
              "RELEVANCE",
              "PRICE_ASC",
              "PRICE_DESC",
              "RATING",
              "TOPSELLER",
              "NEWEST",
              "AVAILABILITY"
            ],
            "type": "string",
            "description": "MediaMarkt's own sort order, verified live by driving the site's sort dropdown -- reorders the full server-side result set, so it stays correct across pagination. Applies in BOTH search mode and URL mode: the listing request is rebuilt for a pasted category or search URL, so the filter is sent with it.",
            "default": "RELEVANCE"
          },
          "sortOrder": {
            "title": "Sort order (alias)",
            "type": "string",
            "description": "Alias of Sort order that also accepts lowercase tokens (relevant, price_asc, price_desc, rating, topseller, newest, availability). Sort order wins when both are set."
          },
          "fetchDetails": {
            "title": "Fetch full product detail",
            "type": "boolean",
            "description": "Adds the full flattened spec sheet (varies per category -- RAM/CPU for a laptop, panel type for a TV), delivery/pickup availability detail, energy efficiency label, promo badges, and marketplace/other-seller offers from the product page. Current price, was-price/discount, rating and main image are already included without this toggle.",
            "default": false
          },
          "fetchReviews": {
            "title": "Fetch reviews",
            "type": "boolean",
            "description": "Fetch each product's review summary (average rating, total count) and its most recent reviews (rating, title, text, date, verified-purchaser flag). MediaMarkt renders its newest review page server-side; it does not expose a plain paginated route for a product's entire review history, so this returns that first page, capped by 'Max reviews per product'. Products with no reviews simply return an empty list. The detail-enrichment charge is one unit for the product-page read plus one more for every 10 reviews the product carries (see the Pricing tab).",
            "default": true
          },
          "maxReviewsPerProduct": {
            "title": "Max reviews per product",
            "minimum": 0,
            "maximum": 1000,
            "type": "integer",
            "description": "Cap on reviews returned per product when 'Fetch reviews' is on (bounded by what the site's own product page renders, currently up to about 10). 0 = all available on that page. Values above 50 are capped at 50 in code.",
            "default": 20
          },
          "maxPages": {
            "title": "Max pages per search",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after this many result pages per search/category/URL entry. 0 = unlimited -- walk every page until the site stops returning new products or Max products total is hit.",
            "default": 0
          },
          "maxItems": {
            "title": "Max products total",
            "minimum": 0,
            "maximum": 1000000,
            "type": "integer",
            "description": "Hard cap on total products returned across every search/category/URL entry. 0 = unlimited (still bounded by Max pages per search).",
            "default": 20
          },
          "proxy": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "A residential connection is required for a reliable run on this site. The default below already selects a residential connection in Spain.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ],
              "apifyProxyCountry": "ES"
            }
          },
          "resumeFromRunId": {
            "title": "Resume from run/dataset id",
            "type": "string",
            "description": "Paste a previous run id (or its dataset id) to continue that run: products already collected there are skipped, so this run only returns new products (a delta). Leave empty for a normal run."
          },
          "incrementalMode": {
            "title": "Incremental mode (only changes since last run)",
            "type": "boolean",
            "description": "Remember products between runs and emit only what changed: each row gets changeType NEW, UPDATED, REAPPEARED or EXPIRED, plus changedFields (the names of the fields that differ), firstSeenAt and lastSeenAt. Compared fields: everything in the row except the scrape timestamp, the review list (a new review still shows through rating and reviewCount) and the day-relative delivery fields (deliveryStatus, deliveryDisplayStatus, delivery, fulfillmentEarliest, fulfillmentLatest), which move every day without the product changing; isAvailableForDelivery is still compared. Unchanged products are not emitted or billed unless you turn on the next option. EXPIRED (no longer listed) is only reported after a run that walked the whole result list, so combine with Max products total = 0 and Max pages = 0 for full tracking. Off by default: output is unchanged.",
            "default": false
          },
          "stateKey": {
            "title": "State key (incremental mode only)",
            "type": "string",
            "description": "Optional name for the remembered state. Leave empty to derive it from your search, filters and detail/review options, so a different search never shares a baseline. Set the same key on a task to keep one baseline when you edit its search."
          },
          "emitUnchanged": {
            "title": "Also emit unchanged products (incremental mode only)",
            "type": "boolean",
            "description": "Emit products that did not change, with changeType UNCHANGED. Off: they are skipped and not billed.",
            "default": false
          },
          "emitExpired": {
            "title": "Report products no longer listed (incremental mode only)",
            "type": "boolean",
            "description": "After a complete run, emit one EXPIRED row for each previously seen product that is no longer in the results. Each emitted row is a normal result row.",
            "default": true
          },
          "ignoreFieldsForChanges": {
            "title": "Ignore fields when detecting changes (incremental mode only)",
            "type": "array",
            "description": "Field names that must NOT count as a change, for example shippingCost or availabilityStatus. The scrape timestamp, the review list and the day-relative delivery fields (deliveryStatus, deliveryDisplayStatus, delivery, fulfillmentEarliest, fulfillmentLatest) are always ignored. Only used when incremental mode is on.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "mcpConnectors": {
            "title": "Pipe results into your apps (optional)",
            "type": "array",
            "description": "Optionally send the scraped results into the apps you already use, via Model Context Protocol (MCP) connectors. Authorize a connector once under Apify -> Settings -> Integrations, then select it here. The connector receives a condensed, human-readable summary per item (title + key fields), not the full JSON; the complete record stays in the dataset. Leave empty to skip. 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 item 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": "Cap on items written to each connector per run. Does not affect 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}