# Miravia Scraper (`chartedsea/miravia-scraper`) Actor

Scrape Miravia search results, categories, products, reviews, sellers, and
marketplace discovery feeds without maintaining anti-bot headers, signatures,
cookies, browser sessions, or mobile API behavior.

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

## Pricing

from $0.01 / 1,000 dataset results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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 Scraper

Scrape Miravia search results, categories, products, reviews, and sellers
without maintaining anti-bot headers, signatures, cookies, or browser sessions.

The Actor accepts Miravia page URLs and backend API URLs for Spain. Each request
is processed independently and produces one row in the default dataset.

### Quick start

```json
{
  "requests": [
    {
      "url": "https://www.miravia.es/catalog/?q=tshirt"
    }
  ]
}
```

A run accepts 1 to 100 requests. The Actor waits for every request to reach a
terminal state before publishing results and charging finalized events.

### Input

Shared options apply to every request. A value inside an individual request
overrides the shared value for that request.

- `requests` - Required array containing 1 to 100 Miravia requests.
- `emulateMobileDevice` - Emulate mobile web traffic. Default: `false`.
- `language` - Optional request language.

Per-request fields:

- `url` - Required Miravia page or backend API URL.
- `method` - `GET`. Default: `GET`.
- Any shared option above - Overrides that option for this request.

`cleanResponseBody` is not supported. Unknown request options are passed to the
backend for forward compatibility.

#### Product search and Seller products options

These options affect only Product search and Seller products requests, whether
supplied at the input or request level:

- `productListing_crawlNextPages` - Crawl subsequent listing pages.
- `productListing_crawlNextPages_maxPages` - Maximum listing pages.
- `productListing_crawlNextPages_maxUniqueProducts` - Maximum unique products.
- `productListing_crawlNextPages_stopWhenNewPageOnlyContainsDuplicates` - Stop
  on a page containing only products already collected. Default: `true`.
- `productListing_crawlNextPages_stopWhenNoMorePagesIsTrue` - Stop when Miravia
  reports no more pages. Default: `true`.

### Supported Miravia APIs

#### Product search by keyword, category, or seller

```text
https://www.miravia.es/catalog/?q=${keyword}
https://www.miravia.es/c/${categorySlug}-${categoryId}/
https://www.miravia.es/${sellerKey}/?q=All-Products&from=wangpu&langFlag=en-ES&pageTypeId=2&search_scenario=store&src=store_allproducts&sellerKey=${sellerKey}
```

Avoid adding `page` directly. Miravia requires sequential navigation from the
first page. Use `productListing_crawlNextPages` for multi-page crawling.

```json
{
  "requests": [
    { "url": "https://www.miravia.es/catalog/?q=tshirt" },
    { "url": "https://www.miravia.es/c/camisetas-para-mujer-100195/" },
    { "url": "https://www.miravia.es/inside/?q=All-Products&from=wangpu&langFlag=en-ES&pageTypeId=2&search_scenario=store&src=store_allproducts&sellerKey=inside" }
  ]
}
```

Examples:

- [Keyword products](https://www.chartedsea.com/assets/files/keyword_products-a3460c159f13dbbc9e63403074fd5bef.json)
- [Category products](https://www.chartedsea.com/assets/files/category_products-9059a09a100b0efb57d0c34ec56aa2bd.json)
- [Seller products](https://www.chartedsea.com/assets/files/seller_products-2eb08a632ec3a10228c60fe5b664b9b2.json)

#### Product details

```text
https://www.miravia.es/p/i${productId}.html
https://www.miravia.es/p/${productSlug}-i${productId}.html
```

```json
{
  "requests": [
    { "url": "https://www.miravia.es/p/i1374784873099279.html" }
  ]
}
```

[Product detail example](https://www.chartedsea.com/assets/files/product_detail-a383fad71771e4f907f5acb84adefefa.json)

#### Product reviews

```text
https://www.miravia.es/pdp/review/getReviewList?itemId=${productId}
```

Only the initial review page is supported.

[Product reviews example](https://www.chartedsea.com/assets/files/product_reviews-b97df766f9683689708f41eeb669806f.json)

#### Category navigation

```text
https://acs-m.miravia.es/h5/mtop.lazada.guided.shopping.categories.categorieslpcommon/1.0/
```

This endpoint extracts Miravia's category navigation, not a complete category
tree.

[Category navigation example](https://www.chartedsea.com/assets/files/category_tree-1327f00eb52ebaecd7e93fff3622f155.json)

#### Seller details

```text
https://www.miravia.es/shop/${sellerKey}/
```

[Seller detail example](https://www.chartedsea.com/assets/files/seller_detail-5e29dcee1278663016df91bcf81551ff.json)

#### Seller promoted products

```text
https://www.miravia.es/shop/site/api/shop/campaignTppProducts/query?shopId=${shopId}&sellerId=${sellerId}&itemId=${productId}
```

Use `offset=20` for the second 20-item page.

[Seller promoted products example](https://www.chartedsea.com/assets/files/seller_campaign_tpp_products-33d11debb8409b03da9e4b8fc011363c.json)

#### Keyword listing

```text
https://www.miravia.es/sitemap-d7df5b64df1181ef1d62d646a13aaa86.xml?limit=${limit}&offset=${offset}
```

[Keyword listing example](https://www.chartedsea.com/assets/files/keyword_listing-1f708b02eb5ab43c5515432b062ea490.json)

### Unsupported APIs

Miravia does not support:

- Product Reviews V2 at
  `https://acs-m.miravia.es/h5/mtop.lazada.review.item.getpcreviewlist/1.0/`.
- Seller listing at `https://www.miravia.es/sitemap-sellers.xml`.

Unsupported requests are rejected before execution and are not billed.

### Output

The default dataset contains one row per input request:

```json
{
  "marketplaceRunUuid": "...",
  "taskUuid": "...",
  "url": "https://www.miravia.es/catalog/?q=tshirt",
  "status": "SUCCESS",
  "responseBody": {}
}
```

Output fields:

- `marketplaceRunUuid` - Marketplace run ID.
- `taskUuid` - Task ID.
- `url` - Original requested URL.
- `status` - Terminal request status.
- `responseBody` - Native Miravia response for a successful request.
- `error` - Error description for an unsuccessful request.

Rows remain in the same logical request order. One failed request does not hide
successful rows from the same batch.

### Related Actors

- [AliExpress Scraper](https://apify.com/chartedsea/aliexpress-scraper) - Scrape AliExpress searches, products, reviews, sellers, and categories.

### Pricing and charging

Pay as you go with no subscription or monthly minimum:

- Successful Miravia request: $0.00272 per request, or $2.72 per 1,000
  successful requests.
- Proxy usage: $0.00013 per started block of 100 proxy units.
- Actor start: $0.00005 per GB of Actor memory, with a minimum of one event.
- Dataset result: $0.00001 per result written to the default dataset.

This is a PAY\_PER\_EVENT Actor. It charges one `csea-scrape-miravia` event per
successful Miravia request and finalized `csea-proxy-unit` events for proxy
usage. Failed or cancelled requests are not charged as successful Miravia
requests. Use Apify's maximum total charge setting to bound an execution's cost.

### Graceful aborts and retries

A graceful Apify abort cancels known scraping tasks and waits for backend
finalization. Interrupted Actor executions persist their marketplace-run,
charging, and output state so they can resume without intentionally duplicating
charges or dataset rows.

### Operational guidance

- Monitor success rates during major Miravia campaigns.
- Expect stricter anti-bot behavior during high-traffic sales.
- Prefer bounded listing crawls over unbounded multi-page requests.

# Actor input Schema

## `requests` (type: `array`):

One to 100 Miravia requests. URLs and scraper-specific options are validated before processing.

## `emulateMobileDevice` (type: `boolean`):

Whether to emulate mobile web traffic.

## `language` (type: `string`):

Language for this request.

## `productListing_crawlNextPages` (type: `boolean`):

Whether to crawl subsequent product-listing pages.

## `productListing_crawlNextPages_maxPages` (type: `integer`):

Maximum number of product-listing pages to crawl.

## `productListing_crawlNextPages_maxUniqueProducts` (type: `integer`):

Maximum number of unique products to collect.

## `productListing_crawlNextPages_stopWhenNewPageOnlyContainsDuplicates` (type: `boolean`):

Stop when a listing page contains only products already collected.

## `productListing_crawlNextPages_stopWhenNoMorePagesIsTrue` (type: `boolean`):

Stop when the marketplace reports that no more listing pages exist.

## Actor input object example

```json
{
  "requests": [
    {
      "url": "https://www.miravia.es/catalog/?q=tshirt"
    }
  ],
  "emulateMobileDevice": false,
  "language": "en",
  "productListing_crawlNextPages": false,
  "productListing_crawlNextPages_stopWhenNewPageOnlyContainsDuplicates": true,
  "productListing_crawlNextPages_stopWhenNoMorePagesIsTrue": true
}
```

# Actor output Schema

## `results` (type: `string`):

Complete result rows in the default dataset.

# 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 = {
    "requests": [
        {
            "url": "https://www.miravia.es/catalog/?q=tshirt"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("chartedsea/miravia-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 = { "requests": [{ "url": "https://www.miravia.es/catalog/?q=tshirt" }] }

# Run the Actor and wait for it to finish
run = client.actor("chartedsea/miravia-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 '{
  "requests": [
    {
      "url": "https://www.miravia.es/catalog/?q=tshirt"
    }
  ]
}' |
apify call chartedsea/miravia-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,chartedsea/miravia-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/MdI8OXyZktPCciHo9/builds/WDVCGtL7I4TdeVwnI/openapi.json
