# Magazine Luiza Search Scraper (`yasmany.casanova/magalu-search-scraper`) Actor

Search Magazine Luiza (Magalu) and get every product with price, Pix price, installments, coupon, rating and the store selling it, plus the stores and brands of the whole result set. Up to 1000 results per search, sponsored cards flagged.

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

## Pricing

from $3.00 / 1,000 product founds

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 Search Scraper

Search **Magazine Luiza (Magalu)** and get every product in the results: **price, Pix price, installments, discount, coupon, rating** and **the store selling it**, in the order the site lists them. Each run also returns **the stores and brands of the whole result set**, with how many products each one has. Up to 1000 results per search, sponsored products flagged.

[![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 type a search term and run it. No login, no browser.

***

### Quick Start

```json
{
  "query": "geladeira brastemp",
  "maxResults": 50
}
```

> **Tip**: Schedule the same search every day to follow prices, Pix discounts and which store holds each product over time.

#### More examples

<details>
<summary>The first 500 results, organic only</summary>

```json
{
  "query": "smart tv samsung 55",
  "maxResults": 500,
  "includeSponsored": false
}
```

</details>

<details>
<summary>A whole category, up to the site's limit</summary>

```json
{
  "query": "air fryer",
  "maxResults": 1000
}
```

</details>

***

### Features

| Feature | Description |
|---------|-------------|
| **Prices** | Price, list price and discount, the **Pix price** and the best installment plan (count, value, interest free) |
| **Store** | Who sells each product, its ID and SKU, whether it is Magalu itself, and the store's coupon |
| **Ranking** | Page, position among all cards and rank among the organic results, with sponsored cards flagged |
| **Market Census** | Every store and brand in the result set with its product count, from the site's own filters |
| **Product** | Title, brand, category, image, rating and review count, availability and the site's tags |
| **Fair Billing** | You pay per product returned, residential proxy included. The summary and errors are free |

***

### Use Cases

- **Price Monitoring**: Track the price, the Pix price and the installments of your products and your competitors'
- **Seller Mapping**: See which stores sell a brand or a category on Magalu, and how many products each one lists
- **Buy Box Tracking**: Follow which store's offer the search shows for each product over time
- **Assortment Research**: Measure how crowded a category is and which brands lead it
- **Ad Monitoring**: See which products are sponsored for a search term and where they appear

***

### Input Parameters

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `query` | string | none | What to search for, as you would type it on the site (**required**) |
| `maxResults` | integer | `50` | Products to return, 1 to 1000. Magalu lists 40 per page |
| `includeSponsored` | boolean | `true` | Keep the sponsored cards mixed into the results. `false` returns organic results only |
| `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) |

***

### 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, in the order Magalu lists them:

```json
{
  "record_type": "product",
  "query": "geladeira brastemp",
  "page": 1,
  "position": 45,
  "organic_rank": 35,
  "is_sponsored": false,
  "product_id": "236161400",
  "title": "Geladeira/Refrigerador Brastemp Frost Free French Door 554L BRO85",
  "brand": "Brastemp",
  "url": "https://www.magazineluiza.com.br/geladeira-refrigerador-brastemp-frost-free-french-door-554l-bro85/p/236161400/ed/refr/?seller_id=magazineluiza",
  "image_url": "https://a-static.mlcdn.com.br/420x420/geladeira-refrigerador-brastemp-frost-free-french-door-554l-bro85/magazineluiza/236161400/f0eab0b0e9e87f72fedb9c74a72f8f8b.jpg",
  "category": "Eletrodomésticos",
  "subcategory": "Geladeira / Refrigerador",
  "price": 6807.45,
  "list_price": 8503.32,
  "discount_percentage": 19.9,
  "pix_price": 6399.0,
  "installment_count": 10,
  "installment_value": 680.74,
  "installment_interest_free": true,
  "currency": "BRL",
  "seller_id": "magazineluiza",
  "seller_name": "Magalu",
  "seller_sku": "236161400",
  "sold_by_magalu": true,
  "coupon_discount": null,
  "coupon_discount_type": null,
  "rating": 4.72,
  "review_count": 2469,
  "is_available": true,
  "tags": ["is_magalu_indica"],
  "scraped_at": "2026-10-26T16:02:11.482913+00:00"
}
```

And one summary row per run, with the stores and brands of the whole result set (shortened here):

```json
{
  "record_type": "summary",
  "query": "geladeira brastemp",
  "include_sponsored": true,
  "pages_fetched": 1,
  "results_reported": 1000,
  "products_found": 52,
  "products_returned": 50,
  "sponsored_returned": 10,
  "complete": true,
  "stopped_at_spending_limit": false,
  "sellers": [
    { "id": "magazineluiza", "name": "Magalu", "count": 842 },
    { "id": "lojawebcontinentalmarketplace", "name": "Webcontinental Marketplace", "count": 735 },
    { "id": "gazinshop", "name": "Gazin", "count": 458 }
  ],
  "brands": [
    { "id": "brastemp", "name": "Brastemp", "count": 1866 },
    { "id": "consul", "name": "Consul", "count": 2159 },
    { "id": "electrolux", "name": "Electrolux", "count": 2660 }
  ],
  "reference_url": "https://www.magazineluiza.com.br/busca/geladeira+brastemp/?page=1",
  "scraped_at": "2026-10-26T16:02:11.482913+00:00"
}
```

The **Products** view on the **Output** tab shows both and exports to JSON, CSV or Excel. To keep only the products, filter on `record_type`.

***

### Data Fields

#### Per product

| Field | Type | Description |
|-------|------|-------------|
| `record_type` | string | `product`, `summary` or `error` |
| `query` | string | The search term |
| `page` | number | Results page the product was on |
| `position` | number | Place in the list across pages, sponsored cards counted |
| `organic_rank` | number | Place among the organic results only. Null for a sponsored card |
| `is_sponsored` | boolean | A sponsored card |
| `product_id` | string | Magalu's product ID |
| `title`, `brand` | string | Product title and brand |
| `url` | string | Product page with this store's offer |
| `image_url` | string | Main product image |
| `category`, `subcategory` | string | Magalu's category and subcategory |
| `price` | number | Price on the card |
| `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 whose offer the card shows, its ID and display name |
| `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_discount`, `coupon_discount_type` | number, string | The store's coupon on this product: an amount (`absolute`, in reais) or a `percentage` |
| `rating`, `review_count` | number | Average rating (1 to 5) and number of reviews |
| `is_available` | boolean | Available to buy |
| `tags` | array | The site's tags, such as `is_magalu_indica` |
| `scraped_at` | string | ISO 8601 timestamp (UTC) |

#### Summary

| Field | Type | Description |
|-------|------|-------------|
| `include_sponsored` | boolean | Whether sponsored cards were kept |
| `pages_fetched` | number | Results pages read |
| `results_reported` | number | Result count the site shows. It changes from page to page and is not where the results end |
| `products_found`, `products_returned` | number | Products read, and products returned within `maxResults` |
| `sponsored_returned` | number | Sponsored cards among them |
| `complete` | boolean | The search was read to its end or to `maxResults`. False when a later page could not be read or the spending limit stopped the run |
| `stopped_at_spending_limit` | boolean | Your spending limit cut the products short |
| `sellers`, `brands` | array | Every store and brand of the result set with its product count (`id`, `name`, `count`) |
| `reference_url` | string | The search on magazineluiza.com.br |
| `error` | object | On `error` rows: `error_code`, `message` and `details` |

***

### 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>Why does the site say 25 pages but the run read more?</strong></summary>

Magalu's pager stops at 25 pages, but the results go on a little past it, so the run keeps reading until the pages come back empty. Past roughly 1000 results they do; to cover more, split the search into narrower terms.

</details>

<details>
<summary><strong>Why did my search return no products?</strong></summary>

Magalu has nothing for that term. For a term it does not know, the site often fills the page with popular products of every category instead of saying so; the run recognises that page and returns no products for it, so you are not charged for unrelated items. Once in a while the site answers such a term with a whole category instead, and the run returns it as Magalu showed it. A misspelled term is corrected by the site and returns results as usual.

</details>

<details>
<summary><strong>Why is <code>organic_rank</code> missing some numbers?</strong></summary>

Magalu's relevance order moves slightly between pages, so a product from page 1 can show up again on page 2. It keeps its place in the numbering, as a shopper would see it, but it is not returned twice.

</details>

<details>
<summary><strong>Why is <code>results_reported</code> different from what I get?</strong></summary>

The count Magalu shows changes from one page of the same search to the next, so it is reported as the site gives it and not used to decide where the results end.

</details>

<details>
<summary><strong>What do <code>pix_price</code> and the installments mean?</strong></summary>

`pix_price` is the price paying with Pix, often a few percent below `price`. `installment_count` and `installment_value` are the best plan the card shows, such as 10 installments, and `installment_interest_free` says whether it has interest.

</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 the run end with an error?</strong></summary>

Magalu sometimes does not return a page on the first request. Each page is tried several times, each time from another address, before the run gives up. If the first page cannot be read the run fails with an `error` row, which is not charged; run it again later. If a later page fails, the products already read are kept and the summary says `complete: false`.

</details>

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

A few seconds per page of 40 products: 50 results take under half a minute, 1000 results a few minutes.

</details>

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

One event per product row, with Apify's residential proxy and the compute included: there is no separate charge for platform usage. The summary row and error rows are not charged. 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

## `query` (type: `string`):

What to search for, as you would type it on magazineluiza.com.br (e.g. geladeira brastemp, smart tv samsung 55).

## `maxResults` (type: `integer`):

Products to return, from 1 to 1000. Magazine Luiza lists 40 products per page, so 1000 is 25 pages.

## `includeSponsored` (type: `boolean`):

Keep the sponsored cards Magazine Luiza mixes into the results, flagged with is_sponsored. Turn off for organic results only.

## `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
{
  "query": "geladeira brastemp",
  "maxResults": 50,
  "includeSponsored": true,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

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

One row per product card, plus a summary row

# 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 = {
    "query": "geladeira brastemp",
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("yasmany.casanova/magalu-search-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 = {
    "query": "geladeira brastemp",
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("yasmany.casanova/magalu-search-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 '{
  "query": "geladeira brastemp",
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call yasmany.casanova/magalu-search-scraper --silent --output-dataset

```

## MCP server setup

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