# Miravia Spain Scraper: Products, Prices, Stores (`abotapi/miravia-es-scraper`) Actor

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.

- **URL**: https://apify.com/abotapi/miravia-es-scraper.md
- **Developed by:** [Abot API](https://apify.com/abotapi) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.50 / 1,000 product records

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Miravia Spain Scraper: Products, Prices, Stores & Reviews

Miravia Spain Scraper turns Miravia Spain into a clean product data API. Get selling prices with original prices and discounts, brands, seller identities, ratings, sold counts and promotion flags for every product. Search by keyword or paste links (product, search, category, keyword and seller-store links), then enrich with descriptions, attribute tables, SKU variants, image galleries, store profiles, delivery options and customer reviews. Export to JSON, CSV or Excel, or pull the results straight into your app through the API.

### Why This Scraper?

- **Two ways in.** Search by keyword, or paste product, search, category, keyword and shop links (a shop link resolves to its seller and walks that assortment). No need to build URLs by hand.
- **The price pair is on every row.** Selling price, original price, discount percent, brand, seller, rating and promotion flags come from the search page itself, with no second request.
- **Store depth on demand.** Switch product details and reviews on or off per run, and pay only for what you use. Reviews bill per started block of 10.
- **Seller stores as first-class scopes.** Paste a seller-store link to walk that seller's assortment (resolved through the storefront search for the shop's own name), filter any walk to a single seller id, and read each store's rating, followers and on-time shipping.
- **Built for schedules.** Incremental mode returns only new and changed products on recurring runs, image galleries never mark a row changed on their own, and a refused run fails loudly instead of returning an empty dataset.

### Use Cases

- **Price monitoring and repricing:** track selling and original prices, discounts and stock signals across Miravia Spain on a schedule.
- **Assortment and seller research:** walk a seller store to audit its catalog, ratings and promotions, or compare sellers on the same keywords.
- **Deal discovery:** filter to discounted rows only, sort by price, and bound any run with minimum and maximum prices.
- **Catalog building and data science:** collect titles, attributes, variants, galleries and reviews for search, recommendations or analytics.
- **Review and reputation tracking:** follow rating distributions and recent customer reviews per product over time.

### Data You Get

> Sample shape: values are illustrative placeholders, not from a live record.

| Field | Example |
| --- | --- |
| `recordId` | `"miravia:1000000000000001"` |
| `productId` / `skuId` | `"1000000000000001"` / `"2000000000000001"` |
| `title` | `"Sample Building Set 500 Pieces"` |
| `brand` / `brandId` | `"Sample Brand"` / `"10000000001"` |
| `price` / `priceText` | `19.99` / `"19,99EUR"` (EUR) |
| `originalPrice` / `originalPriceText` | `29.99` / `"29,99EUR"` |
| `onSale` / `discountPercent` | `true` / `33.3` |
| `imageUrl` | first gallery image |
| `sellerId` / `sellerName` | `"4000000000001"` / `"Sample Store"` |
| `officialStore` | `true` |
| `rating` / `reviewCount` | `4.8` / `120` |
| `soldCount` / `soldText` | `350` / `"350 sold"` |
| `inStock` / `isSponsored` | `true` / `false` |
| `promotionTags` | `["Free shipping", "Top rated"]` |
| `description` | plain-text product description (with details) |
| `attributes` | name and value pairs (with details) |
| `skus` | per-variant prices, stock and sold counts (with details) |
| `imageUrls` / `photoCount` | full gallery (with details) |
| `store` | store profile, rating, followers (with details) |
| `deliveryOptions` | shipping methods and fees (with details) |
| `ratingBreakdown` | score, total and star distribution (with reviews) |
| `reviewTotal` / `reviews` | declared count plus review rows with rating, text, buyer, date, photos, likes and seller replies (with reviews) |
| `url` | Miravia link to the product |
| `changeType` / `changedFields` | incremental mode: `NEW`, `UPDATED`, `UNCHANGED`, `REAPPEARED`, `EXPIRED` |
| `firstSeenAt` / `lastSeenAt` | incremental mode timestamps |

Each review row carries its id, rating, title, text, buyer name, date, variant, photos, likes and any seller replies.

### How to Use

1. Pick a **mode**: `search` (by keyword) or `url` (paste links, including seller-store links).
2. Fill in the fields for that mode, set the ordering and price filters, and switch on the product details you need.
3. Set **Max items** to control run size and cost, then click **Start**.
4. Download the dataset as JSON, CSV or Excel, or read it through the API.

**Search for building sets:**

```json
{
  "mode": "search",
  "searchTerms": ["lego"],
  "maxItems": 5
}
```

**Walk a seller store with details and reviews:**

```json
{
  "mode": "url",
  "urls": ["https://www.miravia.es/shop/lego-official/"],
  "fetchDetails": true,
  "fetchReviews": true,
  "maxItems": 20
}
```

**Cheapest first, inside a price band, discounted rows only:**

```json
{
  "mode": "search",
  "searchTerms": ["air fryer"],
  "sortBy": "priceasc",
  "minPrice": 20,
  "maxPrice": 100,
  "onSaleOnly": true,
  "maxItems": 20
}
```

**Paste links (product, search, category, keyword, shop):**

```json
{
  "mode": "url",
  "urls": [
    "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/"
  ]
}
```

Product links work in the short, SEO and variant forms. 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.

#### Run it from your code

Python:

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_APIFY_TOKEN>")
run = client.actor("abotapi/miravia-es-scraper").call(run_input={"mode": "search", "searchTerms": ["lego"], "maxItems": 5})
for product in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(product["title"], product["price"], product["originalPrice"])
```

JavaScript:

```javascript
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: '<YOUR_APIFY_TOKEN>' });
const run = await client.actor('abotapi/miravia-es-scraper').call({ mode: 'search', searchTerms: ['lego'], maxItems: 5 });
const { items } = await client.dataset(run.defaultDatasetId).listItems();
```

Or connect it to Make, Zapier, n8n, Google Sheets or webhooks from the **Integrations** tab.

#### How `maxItems` shapes a scheduled run

Search mode collects a scope page by page (40 products per page), most popular first, and stops once `maxItems` is reached. A capped run therefore returns the scope's top rows. To get the entire scope, raise `maxItems` or set it to `0`. Scopes are taken whole per source, so a run over several search terms can return slightly more than `maxItems` only when a term boundary lands mid-page: pages are never split across terms.

#### Resume and recurring updates

- **Resume** (`resumeFromRunId`) continues one interrupted run: paste its run or dataset ID and the actor skips everything already collected there, so you don't pay twice.
- **Incremental mode** (`incrementalMode`) is for scheduled runs over the same scope. Each record is classified `NEW`, `UPDATED` (with `changedFields`), `UNCHANGED` (suppressed and not billed unless `emitUnchanged` is on), `REAPPEARED` or `EXPIRED` (only after a run that scanned the whole scope, and only with `emitExpired`). 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. `stateKey` names or shares the stored state, and `ignoreFieldsForChanges` adds more fields to that guard. With incremental mode off, output is exactly as before.

### Send results into your apps (MCP connectors)

Optionally pipe the scraped results into the apps you already use, via Model Context Protocol (MCP) connectors. This is an extra delivery step **after** the scrape: the Apify dataset is never changed.

**What gets written to the connector:** a condensed, human-readable **summary** of each record, not the full JSON. Each item becomes one entry with a **title** and its key fields flattened to plain text. The **complete record always stays in the Apify dataset**.

1. Authorize a connector once under **Apify → Settings → Integrations** (Notion, Linear, Airtable, or Apify).
2. Select it in the **"Pipe results into your apps"** input field. (If the picker is empty, you haven't authorized a connector yet.)
3. For **Notion**, also set `notionParentPageUrl` to the page where items should be created.

The connection is mediated by Apify's MCP proxy, so this actor never sees your third-party credentials. Leave the field empty to skip.

### Input Parameters

| Parameter | Type | Default | Description |
| --- | --- | --- | --- |
| `mode` | string | `search` | `search` or `url`. |
| `searchTerms` | array | `["lego"]` | Keywords to look up (search mode). Empty browses everything. |
| `categoryId` | string | (none) | One storefront category id (search mode). |
| `sellerId` | string | (none) | Keep only rows from one seller id. |
| `urls` | array | sample | Miravia links: product, search, category, keyword and seller-store links (url mode). |
| `sortBy` | string | `relevance` | Server-side ordering: `relevance`, `bestselling`, `toprated`, `priceasc`, `pricedesc`. |
| `minPrice` | number | (none) | Keep rows priced at or above this (EUR). |
| `maxPrice` | number | (none) | Keep rows priced at or below this (EUR). |
| `onSaleOnly` | boolean | `false` | Keep only discounted rows. |
| `fetchDetails` | boolean | `false` | Product page enrichment, billed per record. |
| `fetchReviews` | boolean | `false` | Reviews enrichment, billed per record plus per 10 reviews. |
| `maxReviews` | integer | `20` | Cap on review rows per product. |
| `ignoreFieldsForChanges` | array | (none) | Extra fields that never mark a row UPDATED. |
| `maxItems` | integer | `20` | Stop after this many records (`0` = no limit). |
| `maxPages` | integer | `0` | Safety bound on pages per source (`0` = no limit). |
| `proxy` | object | Residential | Connection settings. Residential is recommended. |
| `resumeFromRunId` | string | (none) | Continue one interrupted run. |
| `incrementalMode` | boolean | `false` | Return only new and changed records on scheduled runs. |
| `stateKey` | string | (none) | Name or share an incremental-mode state. |
| `emitUnchanged` | boolean | `false` | Also return (and bill) unchanged records. |
| `emitExpired` | boolean | `false` | Also return (and bill) expired records. |
| `mcpConnectors` | array | (none) | Optional: send a summary of each record to apps you authorized under Integrations. |
| `notionParentPageUrl` | string | (none) | Notion connector only: page under which records are created. |
| `maxNotifyListings` | integer | `50` | Cap on items written to each connector per run. |

The ordering filter is sent to the storefront with every page in all modes. The price bounds, the sale flag and the seller scope are applied to the rows each run reads. A pasted product URL returns that single product in full either way.

### Output Example

> Sample shape: values are illustrative placeholders, not from a live record.

**A search row (no toggles):**

```json
{
  "recordId": "miravia:1000000000000001",
  "rowType": "product",
  "productId": "1000000000000001",
  "skuId": "2000000000000001",
  "title": "Sample Building Set 500 Pieces",
  "brand": "Sample Brand",
  "price": 19.99,
  "priceText": "19,99EUR",
  "originalPrice": 29.99,
  "onSale": true,
  "discountPercent": 33.3,
  "currency": "EUR",
  "sellerId": "4000000000001",
  "sellerName": "Sample Store",
  "rating": 4.8,
  "reviewCount": 120,
  "soldCount": 350,
  "url": "https://www.miravia.es/p/i1000000000000001.html",
  "description": "A 500-piece building set with... (with Fetch product details)",
  "attributes": [{ "name": "Pieces", "value": "500" }],
  "skus": [{ "skuId": "2000000000000001", "price": 19.99, "sold": 350 }],
  "imageUrls": ["https://img.mrvcdn.com/...jpg"],
  "photoCount": 8,
  "store": { "storeName": "Sample Store", "rating": 4.9, "followers": "10.2K" },
  "deliveryOptions": [{ "title": "Standard", "feeText": "Free shipping" }],
  "ratingBreakdown": { "score": 4.8, "totalReviews": 120 },
  "reviewTotal": 120,
  "reviews": [{ "reviewText": "Great set...", "reviewRating": 5.0, "reviewBuyer": "Sample Buyer" }]
}
```

Detail fields (`description` onwards) populate when Fetch product details is on; `ratingBreakdown` and `reviews` populate when Fetch reviews is on.

### Plan Requirement

Residential proxy access is recommended: product and store pages refuse ordinary shared connections, while search pages serve either pool. The default residential pool works on every paid plan, and the run escalates connections automatically when one is refused. Residential traffic from the automatic escalation is billed to your plan; a plan without residential continues on a backup connection. If your Apify plan does not include proxy access at all, the run fails with a clear message instead of returning an empty result; a paid plan with proxy access is required.

### FAQ

#### How much does it cost?

You pay per record returned, with product details and reviews billed only when you switch them on: one unit per enriched record plus one unit per started block of 10 reviews. The **Pricing** tab shows the current rates. Use **Max items** to cap the cost of any run.

#### Is it legal to scrape Miravia Spain?

This actor collects only publicly available storefront data. You are responsible for how you use it: follow the storefront terms and the laws that apply to you, and get legal advice if you plan commercial redistribution. Prices and ratings are generally facts, but photos, descriptions and reviews may be subject to third-party rights.

#### Can I get only new or changed products on a schedule?

Yes. Schedule the actor from the **Schedules** tab and turn on **Incremental mode**. Each run then returns only new and updated records, and unchanged ones are not billed. Image galleries never mark a row changed on their own.

#### Why did a run return fewer products than the storefront shows?

Search mode stops at **Max items**, most popular first. Set it higher, or to `0`, to collect the whole scope. Price bounds, the sale flag and the seller scope also narrow what is kept: widen them to get more rows.

#### Why did my run fail instead of returning an empty dataset?

If the storefront refuses every request, the run stops with a clear message so "no products today" is never confused with "nothing could be read". Run it again in a few minutes. If only some searches or URLs could be read, you still get what was found.

#### Can I use it with AI agents or MCP?

Yes. Call it from any Apify integration or MCP client, and use the connector field to push results into Notion, Linear or Airtable.

### 💬 Support & custom scrapers

- 🐞 **Found a bug or a missing field?** Open a ticket on the [Issues tab](https://apify.com/abotapi/miravia-es-scraper/issues/open). We usually reply within hours.
- 🛠️ **Need another site, extra fields or a private build?** Email <contact@abotapi.com> or message [Telegram @abotapi](https://t.me/abotapi).
- ⭐ **Enjoying it?** A quick review on the actor page helps other users find it.

# Actor input Schema

## `mode` (type: `string`):

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.

## `searchTerms` (type: `array`):

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.

## `categoryId` (type: `string`):

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` (type: `string`):

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` (type: `array`):

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.

## `sortBy` (type: `string`):

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.

## `minPrice` (type: `number`):

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` (type: `number`):

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` (type: `boolean`):

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.

## `fetchDetails` (type: `boolean`):

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.

## `fetchReviews` (type: `boolean`):

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.

## `maxReviews` (type: `integer`):

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).

## `maxItems` (type: `integer`):

The single cap on this run: stop after collecting this many records across all searches, stores and URLs. Set 0 for unlimited.

## `maxPages` (type: `integer`):

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.

## `proxy` (type: `object`):

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.

## `resumeFromRunId` (type: `string`):

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` (type: `boolean`):

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.

## `stateKey` (type: `string`):

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` (type: `boolean`):

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.

## `emitExpired` (type: `boolean`):

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.

## `ignoreFieldsForChanges` (type: `array`):

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.

## `mcpConnectors` (type: `array`):

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` (type: `string`):

URL or id of the Notion page under which record pages are created. Required to enable the Notion export; ignored by other connectors.

## `maxNotifyListings` (type: `integer`):

Cap on records written to each connector per run. Does not affect the dataset.

## Actor input object example

```json
{
  "mode": "search",
  "searchTerms": [
    "lego"
  ],
  "urls": [
    "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/"
  ],
  "sortBy": "relevance",
  "onSaleOnly": false,
  "fetchDetails": false,
  "fetchReviews": false,
  "maxReviews": 20,
  "maxItems": 20,
  "maxPages": 0,
  "proxy": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  },
  "incrementalMode": false,
  "emitUnchanged": false,
  "emitExpired": false,
  "ignoreFieldsForChanges": [],
  "maxNotifyListings": 50
}
```

# Actor output Schema

## `overview` (type: `string`):

No description

## `detail` (type: `string`):

No description

## `reviews` (type: `string`):

No description

## `changes` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "mode": "search",
    "searchTerms": [
        "lego"
    ],
    "categoryId": "",
    "sellerId": "",
    "urls": [
        "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/"
    ],
    "fetchDetails": false,
    "fetchReviews": false,
    "maxReviews": 20,
    "maxItems": 20,
    "proxy": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    },
    "incrementalMode": false,
    "emitUnchanged": false,
    "emitExpired": false,
    "ignoreFieldsForChanges": []
};

// Run the Actor and wait for it to finish
const run = await client.actor("abotapi/miravia-es-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "mode": "search",
    "searchTerms": ["lego"],
    "categoryId": "",
    "sellerId": "",
    "urls": [
        "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/",
    ],
    "fetchDetails": False,
    "fetchReviews": False,
    "maxReviews": 20,
    "maxItems": 20,
    "proxy": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
    "incrementalMode": False,
    "emitUnchanged": False,
    "emitExpired": False,
    "ignoreFieldsForChanges": [],
}

# Run the Actor and wait for it to finish
run = client.actor("abotapi/miravia-es-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "mode": "search",
  "searchTerms": [
    "lego"
  ],
  "categoryId": "",
  "sellerId": "",
  "urls": [
    "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/"
  ],
  "fetchDetails": false,
  "fetchReviews": false,
  "maxReviews": 20,
  "maxItems": 20,
  "proxy": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  },
  "incrementalMode": false,
  "emitUnchanged": false,
  "emitExpired": false,
  "ignoreFieldsForChanges": []
}' |
apify call abotapi/miravia-es-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,abotapi/miravia-es-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/ZUKmWhX7TPbJ0DX2G/builds/g1ogwnv69xjUE8472/openapi.json
