# Magazine Luiza Product Scraper (`yasmany.casanova/magalu-product-scraper`) Actor

Read Magazine Luiza (Magalu) product pages: price, Pix price, installments, coupon code, the store with its legal name and CNPJ, ratings per aspect, full spec sheet, photos and variations. Any store's offer, up to 1000 products per run.

- **URL**: https://apify.com/yasmany.casanova/magalu-product-scraper.md
- **Developed by:** [Yasmany Grijalba Casanova](https://apify.com/yasmany.casanova) (community)
- **Categories:** E-commerce
- **Features:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $4.00 / 1,000 product reads

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

## Magazine Luiza Product Scraper

Read **Magazine Luiza (Magalu)** product pages and get everything they show: **price, Pix price, installments, discount and the coupon code**, **the store selling it with its legal name and CNPJ**, the rating per aspect, **the full spec sheet**, the photos in 1500 px and the variations (colour, voltage) with the ID of each. Any store's offer, up to 1000 products per run.

[![Apify Actor](https://img.shields.io/badge/Apify-Actor-blue?logo=apify)](https://apify.com)
[![Country](https://img.shields.io/badge/Country-Brazil-green)](https://www.magazineluiza.com.br)

***

> ⚠️ **A residential proxy is required**
> Apify Proxy's residential group comes pre-selected and is included in the price, so a run works as it is; or use your own proxy provider. See [Proxy setup](#proxy-setup). Then paste product links and run it. No login, no browser.

***

### Quick Start

```json
{
  "products": [
    "https://www.magazineluiza.com.br/geladeira-frost-free-duplex-415-litros-cor-inox-brastemp-brm51mk/p/ef6agd7970/ed/refr/?seller_id=whirlpool",
    "https://www.magazineluiza.com.br/geladeira-refrigerador-brastemp-frost-free-duplex-inox-512l-brm62ak-bivolt/p/241074500/ed/refr/"
  ]
}
```

> **Tip**: The links in the results of the **Magazine Luiza Search Scraper** already carry each store's `seller_id`, so its output can be pasted here as it is to read every offer in full.

#### More examples

<details>
<summary>One store's offer, and the offer the page shows</summary>

```json
{
  "products": [
    "https://www.magazineluiza.com.br/geladeira-frost-free-duplex-415-litros-cor-inox-brastemp-brm51mk/p/ef6agd7970/ed/refr/?seller_id=whirlpool",
    "https://www.magazineluiza.com.br/geladeira-frost-free-duplex-415-litros-cor-inox-brastemp-brm51mk/p/ef6agd7970/ed/refr/"
  ]
}
```

The first link reads the offer of the store `whirlpool`; the second, the one the page shows by default, which can be another store's. Each gets a row. If a store a link names does not sell the product, its row says `seller_not_selling` and carries no price.

</details>

***

### Features

| Feature | Description |
|---------|-------------|
| **Offer** | Price, list price and discount, the **Pix price**, the best installment plan and the active **coupon code** |
| **Store** | Who sells it, with the store's **legal name, CNPJ** and SKU, and whether it is Magalu itself |
| **Any Store** | Add `?seller_id=` to a link to read that store's offer; without it, the one the page shows |
| **Spec Sheet** | Every named value of the page's technical sheet, as `name: value` |
| **Ratings** | Average, review count and the rating per aspect (quality, value for money...) |
| **Media and Variations** | All photos at 1500 x 1500 and every variation (colour, voltage) with its product ID and availability |
| **Fair Billing** | You pay per product read with an offer, residential proxy included. Products not found or without an offer, and errors, are free |

***

### Use Cases

- **Price Monitoring**: Track the price, the Pix price and the coupon of each store's offer over time
- **Seller Identification**: Tie each offer to the company behind it, by CNPJ
- **Catalogue Enrichment**: Fill your catalogue with Magalu's spec sheets, photos and variations
- **Competitor Analysis**: Compare the same product across the stores that sell it
- **Review Insights**: Use the ratings per aspect to see what buyers value in each product

***

### Input Parameters

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `products` | array | none | Product links as copied from magazineluiza.com.br, one per line (**required**). Up to 1000; repeats are read once |
| `proxyConfiguration` | object | Apify Proxy, `RESIDENTIAL` | **Required.** Apify Proxy's residential group, included in the price, or your own provider's proxy URLs. See [Proxy setup](#proxy-setup) |

A product link has `/p/` followed by the product ID and two category codes, such as `/p/ef6agd7970/ed/refr/`; the product ID alone does not open a page on Magalu, so the link is what to paste. Links from the mobile site (`m.magazineluiza.com.br`) work too. A link with `?seller_id=` reads that store's offer, and a product asked for from two stores gets a row each. An entry that is not a product link is skipped, with an `error` row saying why, and the rest of the run goes on.

***

### Proxy setup

The Actor needs a **residential proxy**. Set it in the **Proxy** section of the input, in one of two ways.

**Apify Proxy (pre-selected).** Keep *Apify Proxy* with the **RESIDENTIAL** group; it is included in the per-product price, with nothing to set up on your side. Pages are read from an address in Brazil.

```json
{
  "proxyConfiguration": { "useApifyProxy": true, "apifyProxyGroups": ["RESIDENTIAL"] }
}
```

**Your own provider.** Choose *Own proxies* and enter your provider's residential proxy URLs in Brazil, such as `http://user:password@proxy.example.com:8000`. Your provider bills you for that traffic.

```json
{
  "proxyConfiguration": { "useApifyProxy": false, "proxyUrls": ["http://user:password@proxy.example.com:8000"] }
}
```

A run without a proxy stops at the start and says so. With datacenter proxies Magalu turns most requests away; the run's log and final status message point that out.

***

### Output Example

One row per product link (shortened here: the spec sheet had 48 values, the product 7 photos):

```json
{
  "record_type": "product",
  "product_id": "ef6agd7970",
  "served_product_id": null,
  "status": "available",
  "title": "Geladeira Frost Free Duplex 415 Litros cor Inox Brastemp - BRM51MK",
  "brand": "Brastemp",
  "url": "https://www.magazineluiza.com.br/geladeira-frost-free-duplex-415-litros-cor-inox-brastemp-brm51mk/p/ef6agd7970/ed/refr/?seller_id=whirlpool",
  "category": "Eletrodomésticos",
  "subcategory": "Geladeira / Refrigerador",
  "product_type": "Refrigerador",
  "price": 2899.0,
  "list_price": 3199.0,
  "discount_percentage": 9.4,
  "pix_price": 2899.0,
  "installment_count": 10,
  "installment_value": 289.9,
  "installment_interest_free": true,
  "currency": "BRL",
  "seller_id": "whirlpool",
  "seller_name": "Brastemp",
  "seller_legal_name": "BUD COMERCIO DE ELETRODOMESTICOS LTDA",
  "seller_cnpj": "62058318000776",
  "seller_sku": "326199549",
  "sold_by_magalu": false,
  "coupon_code": "ELETRO150",
  "coupon_discount": 150.0,
  "coupon_discount_type": "absolute",
  "rating": 4.74,
  "review_count": 31,
  "rating_aspects": [
    { "aspect": "Boa qualidade", "rating": 4.82 },
    { "aspect": "Ótimo custo-benefício", "rating": 4.75 },
    { "aspect": "Eficiente", "rating": 4.9 }
  ],
  "image_url": "https://a-static.mlcdn.com.br/1500x1500/geladeira-frost-free-duplex-415-litros-cor-inox-brastemp-brm51mk/whirlpool/326199549/f9c96ed8a5536c4abe8a981c3c257cdb.jpeg",
  "images": [
    "https://a-static.mlcdn.com.br/1500x1500/geladeira-frost-free-duplex-415-litros-cor-inox-brastemp-brm51mk/whirlpool/326199549/f9c96ed8a5536c4abe8a981c3c257cdb.jpeg",
    "https://a-static.mlcdn.com.br/1500x1500/geladeira-frost-free-duplex-415-litros-cor-inox-brastemp-brm51mk/whirlpool/326199549/c00d4577d027c924e2cc549805aa3a38.jpeg"
  ],
  "variations": [
    {
      "type": "voltage",
      "name": "Voltagem",
      "selected": "110V",
      "options": [
        { "value": "110V", "product_id": "ef6agd7970", "available": true, "url": "https://www.magazineluiza.com.br/geladeira-frost-free-duplex-415-litros-cor-inox-brastemp-brm51mk/p/ef6agd7970/ed/refr/" },
        { "value": "220V", "product_id": "bk4gk0h7ga", "available": true, "url": "https://www.magazineluiza.com.br/geladeira-frost-free-duplex-415-litros-cor-inox-brastemp-brm51mk/p/bk4gk0h7ga/ed/refr/" }
      ]
    }
  ],
  "specs": {
    "eficiência energética": "A",
    "capacidade total (l)": "Média - 375 a 450L / 415",
    "capacidade geladeira (l)": "415",
    "capacidade freezer (l)": "94",
    "peso com embalagem (kg)": "58"
  },
  "description": "A Geladeira Brastemp Frost Free BRM51 foi criada para quem busca refrigeração de alta performance, inteligência e organização em cada detalhe...",
  "tags": [],
  "input_url": "https://www.magazineluiza.com.br/geladeira-frost-free-duplex-415-litros-cor-inox-brastemp-brm51mk/p/ef6agd7970/ed/refr/?seller_id=whirlpool",
  "scraped_at": "2026-10-26T20:41:03.512334+00:00"
}
```

#### Two views of the same data

| View | Columns | Use it for |
|------|---------|------------|
| **Products** (default) | Everything the page shows | Catalogue, specs, photos, variations |
| **Offers** | Store, price, Pix price, installments and coupon | Price monitoring |

Both are on the **Output** tab and export to JSON, CSV or Excel. Through the API, add `?view=offers` to the dataset items URL.

***

### Data Fields

| Field | Type | Description |
|-------|------|-------------|
| `record_type` | string | `product`, `not_found` (no such product) or `error` |
| `product_id` | string | The product ID in the link |
| `served_product_id` | string | The product the page actually shows, when Magalu sent the link to another one. Null otherwise |
| `status` | string | `available`, `out_of_stock` (the store's offer is on the page but sold out, last price kept), `seller_not_selling` (the store the link names does not sell it; no price) or `no_offer` (no store offers it right now; no price) |
| `title`, `brand` | string | Product title and brand |
| `url` | string | The product page with this store's offer |
| `category`, `subcategory`, `product_type` | string | Magalu's category, subcategory and product type |
| `price` | number | Price of the offer |
| `list_price` | number | The "de" price the discount is measured from |
| `discount_percentage` | number | Discount from the list price, in %. Null when there is none |
| `pix_price` | number | Price paying with Pix |
| `installment_count`, `installment_value` | number | The best installment plan: number of installments and each one's value |
| `installment_interest_free` | boolean | That plan has no interest |
| `currency` | string | `BRL` |
| `seller_id`, `seller_name` | string | The store, its ID and display name |
| `seller_legal_name`, `seller_cnpj` | string | The store's legal name and CNPJ (14 digits), as Magalu holds them. The legal name is null when the store typed its own ID there |
| `seller_sku` | string | The store's own code for the product |
| `sold_by_magalu` | boolean | The offer is Magalu's own, not a marketplace store's |
| `coupon_code`, `coupon_discount`, `coupon_discount_type` | string, number, string | The active coupon: its code, and an amount (`absolute`, in reais) or a `percentage` |
| `rating`, `review_count` | number | Average rating (1 to 5) and number of reviews |
| `rating_aspects` | array | Rating per aspect, as `aspect` and `rating` |
| `image_url`, `images` | string, array | Main photo and every photo, at 1500 x 1500 |
| `variations` | array | Each variation (`type`, `name`, `selected`) with its `options`: `value`, `product_id`, `available`, `url` |
| `specs` | object | The spec sheet as `name: value`. A name Magalu gives twice keeps both values, joined by `/` |
| `description` | string | The product description, up to 5000 characters |
| `tags` | array | The site's tags, such as `is_magalu_indica` |
| `input_url` | string | The link as read |
| `error` | object | On `not_found` and `error` rows: `error_code`, `message` and `details` |
| `scraped_at` | string | ISO 8601 timestamp (UTC) |

***

### Integrations

Use the **API** tab on the Actor page to get ready-to-use code examples in **Python**, **JavaScript**, and **cURL**, generated with the correct parameters for immediate integration.

***

### FAQ

<details>
<summary><strong>Can I give the product ID instead of the link?</strong></summary>

No: Magalu only opens a product with its link, which carries two category codes after the ID (`/p/ef6agd7970/ed/refr/`); the ID alone answers "page not found". Paste the link as you copy it from the site, or take it from the **Magazine Luiza Search Scraper**'s output.

</details>

<details>
<summary><strong>How do I read a specific store's offer?</strong></summary>

Add `?seller_id=` and the store's ID to the link, as in the links of the search results. Without it you get the offer the page shows by default. If that store does not sell the product, the row says `seller_not_selling`, carries no price, and is not charged.

</details>

<details>
<summary><strong>Why is <code>served_product_id</code> filled in?</strong></summary>

Magalu sometimes answers a link with the page of another product, for example after merging two listings. The data in the row is then that product's, which `served_product_id` names.

</details>

<details>
<summary><strong>What does <code>out_of_stock</code> mean?</strong></summary>

The store still lists the product but has none to sell: the page says it is unavailable and has no buy button. The last price stays in the row so you can see where it stood.

</details>

<details>
<summary><strong>Do I need a proxy?</strong></summary>

Yes, a residential one. Apify Proxy's residential group comes pre-selected and is included in the price, so a run works as it is; or enter your own provider's proxy URLs. See [Proxy setup](#proxy-setup).

</details>

<details>
<summary><strong>Why did a product come back as an error?</strong></summary>

Magalu sometimes does not return a page on the first request. Each product is tried several times, each time from another address, and once more at the end of the run, before it is reported as an `error` row. Those rows are not charged; run them again later. An error with the code `PROXY_FAILED` means the proxy did not connect at all: check the proxy configuration.

If 10 products in a row fail that way, the proxy or Magalu is down for all of them, so the run stops there instead of trying the rest, and its status message says how many were left untried.

</details>

<details>
<summary><strong>How long does a run take?</strong></summary>

A few seconds per product, five products at a time: 100 products take about a minute. Rows are saved as each product finishes, so you can read the first results while the run continues.

</details>

<details>
<summary><strong>What am I charged for?</strong></summary>

One event per product read with an offer (`available` or `out_of_stock`), with Apify's residential proxy and the compute included: there is no separate charge for platform usage. Rows of type `not_found` and `error`, and products without an offer (`seller_not_selling`, `no_offer`), are not charged. A product asked for twice from the same store is read, and charged, once. If you use your own proxy URLs, your provider bills that traffic.

</details>

***

### Support

1. **Check the FAQ** above for common questions
2. **Test with the prefilled example** to confirm expected output
3. **Contact support** through [Apify](https://apify.com) for additional assistance

# Actor input Schema

## `products` (type: `array`):

One per line: the product's link as you copy it from magazineluiza.com.br. Add ?seller_id= with the store's ID (as in the links of the search results) to read that store's offer; without it, the offer the page shows. Up to 1000 per run; repeated products are read once.

## `proxyConfiguration` (type: `object`):

Required: a residential proxy. Apify Proxy with the RESIDENTIAL group is pre-selected and included in the price; pages are read from an address in Brazil. Or choose your own proxies and enter your provider's residential proxy URLs.

## Actor input object example

```json
{
  "products": [
    "https://www.magazineluiza.com.br/geladeira-frost-free-duplex-415-litros-cor-inox-brastemp-brm51mk/p/ef6agd7970/ed/refr/?seller_id=whirlpool",
    "https://www.magazineluiza.com.br/geladeira-refrigerador-brastemp-frost-free-duplex-inox-512l-brm62ak-bivolt/p/241074500/ed/refr/"
  ],
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

## `products` (type: `string`):

One row per product with everything the page shows

## `offers` (type: `string`):

Price, Pix price, installments and coupon of each store's offer

# 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 = {
    "products": [
        "https://www.magazineluiza.com.br/geladeira-frost-free-duplex-415-litros-cor-inox-brastemp-brm51mk/p/ef6agd7970/ed/refr/?seller_id=whirlpool",
        "https://www.magazineluiza.com.br/geladeira-refrigerador-brastemp-frost-free-duplex-inox-512l-brm62ak-bivolt/p/241074500/ed/refr/"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("yasmany.casanova/magalu-product-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 = {
    "products": [
        "https://www.magazineluiza.com.br/geladeira-frost-free-duplex-415-litros-cor-inox-brastemp-brm51mk/p/ef6agd7970/ed/refr/?seller_id=whirlpool",
        "https://www.magazineluiza.com.br/geladeira-refrigerador-brastemp-frost-free-duplex-inox-512l-brm62ak-bivolt/p/241074500/ed/refr/",
    ],
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("yasmany.casanova/magalu-product-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 '{
  "products": [
    "https://www.magazineluiza.com.br/geladeira-frost-free-duplex-415-litros-cor-inox-brastemp-brm51mk/p/ef6agd7970/ed/refr/?seller_id=whirlpool",
    "https://www.magazineluiza.com.br/geladeira-refrigerador-brastemp-frost-free-duplex-inox-512l-brm62ak-bivolt/p/241074500/ed/refr/"
  ],
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call yasmany.casanova/magalu-product-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,yasmany.casanova/magalu-product-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/EyRjWB4RRsVvueX5i/builds/66xu2165PtPGy4Q4H/openapi.json
