{
  "openapi": "3.0.1",
  "info": {
    "title": "Miravia Spain Scraper: Products, Prices, Stores",
    "description": "Scrape Miravia Spain by keyword, seller store or URL. Every row carries the selling price and the original price, the discount, brand, seller and rating. Details, variants and reviews are toggles. Change tracking is first-class.",
    "version": "0.1",
    "x-build-id": "g1ogwnv69xjUE8472"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/abotapi~miravia-es-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-abotapi-miravia-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~miravia-es-scraper/runs": {
      "post": {
        "operationId": "runs-sync-abotapi-miravia-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~miravia-es-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-abotapi-miravia-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": "How to start the scrape. 'search' runs storefront searches. 'url' processes the Miravia URLs you paste: a product URL returns that single product in full, and a search, category, keyword or shop URL is walked like a search, its own scope deciding what is read. A shop URL is resolved to its seller identity then walked through the storefront search for the shop's own name, keeping only that seller's rows. The legacy 'shop' mode value still parses as 'url'. The filters below apply to every walk in both modes; a pasted product URL is the one exception and returns that single product in full.",
            "default": "search"
          },
          "searchTerms": {
            "title": "Search terms",
            "type": "array",
            "description": "One or more things to search Miravia Spain for, for example 'lego', 'air fryer', 'zapatillas running'. Each term is scraped independently. Search mode only: in URL mode the scope is read out of the pasted URL instead. Leave this empty and the run browses the whole storefront with only the filters applied.",
            "default": [
              "lego"
            ],
            "items": {
              "type": "string"
            }
          },
          "categoryId": {
            "title": "Category (search mode only)",
            "type": "string",
            "description": "Narrow every search walk to one Miravia category id, for example '19131' (Building Sets). The id is read from the storefront's own category facet on any search page. Search mode only: in URL mode the pasted link decides its own scope. Leave empty for all categories."
          },
          "sellerId": {
            "title": "Only this seller (minor filter)",
            "type": "string",
            "description": "Keep only rows sold by one seller id, for example '4000015456014'. The storefront has no parameter for this, so it is applied to the rows this run reads. Combine with a pasted shop URL or with a search to audit one seller's assortment. Leave empty for all sellers."
          },
          "urls": {
            "title": "Miravia URLs",
            "type": "array",
            "description": "Paste product URLs (https://www.miravia.es/p/i1374428537687072.html, the SEO https://www.miravia.es/p/lego-set-i1374428537687072.html and the variant https://www.miravia.es/p/lego-set-i1374428537687072-s2091201667636256.html forms all work), keyword URLs (https://www.miravia.es/kw/lego.html), search URLs (https://www.miravia.es/c/all/?q=lego), category URLs (https://www.miravia.es/c/juegos-de-construccion-19131/?q=lego) and seller-store URLs (https://www.miravia.es/shop/lego-official/, resolved to the seller and walked like a search keeping only that seller's rows). A pasted URL decides its own scope. Add &page=3 to a pasted search or category URL to start the walk further in; a product URL ignores paging and returns that one product in full. The filters below narrow what the walks read: the ordering filter is sent to the storefront with every page, and the price bounds, Discounted rows only and Only this seller are applied to the rows this run reads.",
            "default": [
              "https://www.miravia.es/p/i1374428537687072.html",
              "https://www.miravia.es/c/all/?q=lego",
              "https://www.miravia.es/c/juegos-de-construccion-19131/?q=lego",
              "https://www.miravia.es/kw/lego.html",
              "https://www.miravia.es/shop/lego-official/"
            ],
            "items": {
              "type": "string"
            }
          },
          "sortBy": {
            "title": "Sort the storefront results by",
            "enum": [
              "relevance",
              "bestselling",
              "toprated",
              "priceasc",
              "pricedesc"
            ],
            "type": "string",
            "description": "The storefront's own server-side ordering, sent with every page of every walk. This orders the walk itself (and therefore which rows a capped run keeps), not just the output. Applies in ALL modes.",
            "default": "relevance"
          },
          "minPrice": {
            "title": "Minimum price (EUR)",
            "minimum": 0,
            "type": "number",
            "description": "Only keep rows whose selling price is at least this many euros. The storefront has no parameter for this, so it is applied to the rows this run reads. Applies in ALL modes."
          },
          "maxPrice": {
            "title": "Maximum price (EUR)",
            "minimum": 0,
            "type": "number",
            "description": "Only keep rows whose selling price is at most this many euros. The storefront has no parameter for this, so it is applied to the rows this run reads. Applies in ALL modes."
          },
          "onSaleOnly": {
            "title": "Discounted rows only",
            "type": "boolean",
            "description": "Only keep rows whose selling price is below the original price, that is rows with a discount. The storefront has no parameter for this, so it is applied to the rows this run reads. Applies in ALL modes.",
            "default": false
          },
          "fetchDetails": {
            "title": "Fetch product details",
            "type": "boolean",
            "description": "Fetch each item's product page for the description, the attribute table, the SKU variants with per-variant prices and stock, the full image gallery, the seller store object (rating, followers, on-time shipping), delivery options, warranties and the promotion. Slower, and charged per record under the detail-enrichment surcharge. Leave off for a fast crawl: identity, prices, discount, brand and seller are included either way.",
            "default": false
          },
          "fetchReviews": {
            "title": "Fetch reviews",
            "type": "boolean",
            "description": "Fetch each item's customer reviews: the rating summary (score, count and the star breakdown) and the most recent reviews up to Max reviews per product. The storefront serves the first reviews page on the product page itself, so this is a cap, not a pagination promise: rows beyond it are not fetched. Charged under the same detail-enrichment surcharge (never twice, even with Fetch product details also on): one unit per record plus one unit per started block of 10 reviews. Leave off by default.",
            "default": false
          },
          "maxReviews": {
            "title": "Max reviews per product",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Cap on review rows returned per product when Fetch reviews is on. The storefront serves the first reviews page on the product page itself, so this is a cap, not a pagination promise: rows beyond it are not fetched. Billing follows the cap in blocks of 10 (up to 10 reviews bill 1 unit, 11 to 20 bill 2).",
            "default": 20
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 0,
            "type": "integer",
            "description": "The single cap on this run: stop after collecting this many records across all searches, stores and URLs. Set 0 for unlimited.",
            "default": 20
          },
          "maxPages": {
            "title": "Max pages per source",
            "minimum": 0,
            "type": "integer",
            "description": "Safety bound on how many result pages to walk per search term, store or URL. Leave empty (0) for no page limit: the run then stops at Max items, not here. Does not impose a separate cap below Max items.",
            "default": 0
          },
          "proxy": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Residential is recommended for the most reliable results: product and store pages refuse ordinary shared connections, while search pages serve either pool. The default residential pool works on every paid plan. Residential traffic from the automatic escalation is billed to your Apify plan; a plan without residential continues on a backup connection.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          },
          "resumeFromRunId": {
            "title": "Resume from a previous run",
            "type": "string",
            "description": "Paste a previous run ID or dataset ID to continue a large crawl without returning or charging for records already collected there. Use this after an interrupted or capped run. For recurring monitoring of the same search, use Incremental mode below instead."
          },
          "incrementalMode": {
            "title": "Incremental changes for scheduled runs",
            "type": "boolean",
            "description": "Turn this on for daily or weekly recurring monitoring of the same search or pasted URLs, for example a price watch. The first run returns everything matching as NEW. Later runs normally return only NEW, UPDATED and REAPPEARED records. Price moves and stock changes ARE reported as UPDATED: on a storefront they are the signal, not noise. Image galleries never mark a row UPDATED on their own. Turn on Emit unchanged or Emit expired only when you also want those rows returned (and billed). State is kept separately per search, URL and filter setup; use State key to name or deliberately share a monitoring campaign. To continue one specific interrupted run instead, use Resume from a previous run above.",
            "default": false
          },
          "stateKey": {
            "title": "State key (optional, incremental mode only)",
            "type": "string",
            "description": "Optional. Name this monitoring campaign to keep its state stable, or to deliberately share state across differently configured runs. Leave empty to let the actor derive a key automatically from the searches, URLs and filters, so two different scopes never mix state."
          },
          "emitUnchanged": {
            "title": "Emit unchanged records (incremental mode only)",
            "type": "boolean",
            "description": "Off by default. Turn on to also return records that have not changed since the last run, marked UNCHANGED. This returns, and bills, extra rows you already have, so leave it off unless you specifically want a full snapshot every run.",
            "default": false
          },
          "emitExpired": {
            "title": "Emit expired records (incremental mode only)",
            "type": "boolean",
            "description": "Off by default. Turn on to also return records that were present in a previous run but are no longer found, marked EXPIRED. Only produced once a run has fully scanned the tracked scope: not when Max items capped it, not when Resume was used, and not when the run was refused. This returns, and bills, extra synthetic rows, so leave it off unless you need expiry tracking.",
            "default": false
          },
          "ignoreFieldsForChanges": {
            "title": "Ignore these fields for change detection (incremental mode only)",
            "type": "array",
            "description": "Extra top-level record fields that must never mark a row UPDATED in incremental mode, on top of the built-in image URL guard. Use this when a field moves between runs without the product changing. Leave empty for the default behaviour.",
            "items": {
              "type": "string"
            }
          },
          "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 and 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": "Cap on records 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}