# Magazine Luiza Seller Scraper (`yasmany.casanova/magalu-seller-scraper`) Actor

Read Magazine Luiza (Magalu) store pages: legal name and CNPJ, address, selling since, score, sales, followers, delivery and answer rates, and products listed by category and brand. Store IDs, store links or product links, up to 1000 stores per run.

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

## Pricing

from $4.00 / 1,000 store checkeds

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

Read **Magazine Luiza (Magalu)** store pages and get who is behind each marketplace store: **the legal name and the CNPJ** (with its check digits verified), **the address**, since when it sells on Magalu, its **reputation** (score, sales, followers, delivery and answer rates) and **its catalogue**: how many products it lists, by category and brand. Up to 1000 stores 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 list the stores and run it. No login, no browser.

***

### Quick Start

```json
{
  "sellers": [
    "whirlpool",
    "samsung",
    "https://www.magazineluiza.com.br/lojista/123comprou/"
  ]
}
```

> **Tip**: The **Magazine Luiza Search Scraper** and **Magazine Luiza Product Scraper** return each offer's `seller_id`. Paste those IDs, or the product links that carry `?seller_id=`, to learn which company is behind every store in a search.

***

### Features

| Feature | Description |
|---------|-------------|
| **Company** | The store's **legal name and CNPJ**, with the check digits verified (the new alphanumeric CNPJ too) |
| **Address** | The registered address, whole and in parts: street, number, complement, district, city, state, postal code |
| **Reputation** | Score, total sales, followers, delivery and answer rates, and whether it is an official store |
| **Catalogue** | How many products the store lists, split by category (with subcategories) and by brand |
| **Any Entry** | The store's ID, its page or any product link with `?seller_id=` |
| **Fair Billing** | You pay per store read, residential proxy included. Stores not found and errors are free |

***

### Use Cases

- **Seller Identification**: Tie each store name on Magalu to a company and its CNPJ
- **Lead Generation**: Build lists of the companies selling a brand or a category on Magalu
- **Brand Protection**: Find out who the stores selling your brand are, and how big each one is
- **Due Diligence**: Check a store's reputation, how long it has sold there and its registered address
- **Market Mapping**: Compare the catalogues of the stores in a category

***

### Input Parameters

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `sellers` | array | none | Stores, one per line (**required**): the store's ID, its page or a product link with `?seller_id=`. 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) |

The store's ID is the part after `/lojista/` in the address of its page: `whirlpool` in `https://www.magazineluiza.com.br/lojista/whirlpool/`. It is also the `seller_id=` in the product links of the search results, so any such link works too. Links from the mobile site (`m.magazineluiza.com.br`) work as well. An entry that names no store 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-store 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 store (shortened here: the store has 16 categories, each with its subcategories):

```json
{
  "record_type": "seller",
  "seller_id": "whirlpool",
  "store_name": "Brastemp",
  "store_url": "https://www.magazineluiza.com.br/lojista/whirlpool/",
  "legal_name": "BUD COMERCIO DE ELETRODOMESTICOS LTDA",
  "cnpj": "62058318000776",
  "cnpj_valid": true,
  "is_official_store": true,
  "seller_since": "2016-11-11",
  "score": 4.1,
  "total_sales": 834279,
  "total_followers": 3729,
  "delivery_rate": "No prazo",
  "delivery_rate_status": "success",
  "answer_rate": "Responde rápido",
  "answer_rate_status": "success",
  "chat_enabled": true,
  "address": "Rua Olympia Semeraro, 675, Jardim Santa Emília, São Paulo - SP, 04183090",
  "street": "Rua Olympia Semeraro",
  "street_number": "675",
  "complement": null,
  "district": "Jardim Santa Emília",
  "city": "São Paulo",
  "state": "SP",
  "postal_code": "04183090",
  "country": "Brasil",
  "anvisa_registrations": [],
  "mapa_registrations": [],
  "logo_url": null,
  "products_listed": 1337,
  "categories": [
    {
      "id": "ED",
      "name": "Eletrodomésticos",
      "count": 1158,
      "subcategories": [
        { "id": "PEED", "name": "Peças para Eletrodomésticos", "count": 816 },
        { "id": "ACRF", "name": "Peças para Geladeira", "count": 338 },
        { "id": "APML", "name": "Peças para Máquina de Lavar", "count": 220 }
      ]
    },
    {
      "id": "CJ",
      "name": "Casa e Construção",
      "count": 58,
      "subcategories": [
        { "id": "MAEL", "name": "Materiais Elétricos", "count": 16 },
        { "id": "CSFE", "name": "Ferragem", "count": 15 }
      ]
    }
  ],
  "brands": [
    { "id": "brastemp", "name": "Brastemp", "count": 1244 },
    { "id": "consul", "name": "Consul", "count": 48 },
    { "id": "consul-brastemp", "name": "Consul Brastemp", "count": 11 }
  ],
  "scraped_at": "2026-10-26T21:12:40.118206+00:00"
}
```

#### Two views of the same data

| View | Columns | Use it for |
|------|---------|------------|
| **Stores** (default) | Everything the page shows | Reputation, catalogue, the whole row |
| **Companies** | Legal name, CNPJ and the address in parts | Seller identification, CRM imports |

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

***

### Data Fields

| Field | Type | Description |
|-------|------|-------------|
| `record_type` | string | `seller`, `not_found` (no store with that ID) or `error` |
| `seller_id` | string | The store's ID, as in its address and in `seller_id=` |
| `store_name` | string | The name the store shows on Magalu |
| `store_url` | string | The store's page |
| `legal_name` | string | The company's legal name, as the store registered it. Null when the store typed its own ID there |
| `cnpj` | string | The CNPJ, 14 characters without punctuation |
| `cnpj_valid` | boolean | The CNPJ's check digits are right |
| `is_official_store` | boolean | Magalu marks it as an official store |
| `seller_since` | string | The date it started selling on Magalu (YYYY-MM-DD) |
| `score` | number | The store's score, 1 to 5 |
| `total_sales`, `total_followers` | number | Sales made on Magalu, and followers |
| `delivery_rate`, `answer_rate` | string | What the page says about its deliveries ("No prazo") and answers ("Responde rápido"). Null when the page shows none |
| `delivery_rate_status`, `answer_rate_status` | string | The same as a level: `success`, `default`... |
| `chat_enabled` | boolean | Buyers can chat with the store |
| `address` | string | The registered address on one line |
| `street`, `street_number`, `complement`, `district`, `city`, `state`, `postal_code`, `country` | string | The same address in parts; `state` as its two-letter code, `postal_code` as 8 digits |
| `anvisa_registrations`, `mapa_registrations` | array | The store's registrations with ANVISA (health) and MAPA (agriculture), when it shows them |
| `logo_url` | string | The store's image on its page (logo or banner), when it has one |
| `products_listed` | number | How many products the store lists |
| `categories` | array | The catalogue by category: `id`, `name`, `count`, and its `subcategories` with the same fields |
| `brands` | array | The catalogue by brand: `id`, `name`, `count` |
| `error` | object | On `not_found` and `error` rows: `error_code`, `message` and `details` |
| `scraped_at` | string | ISO 8601 timestamp (UTC) |

The categories add up to `products_listed`. Magalu's own product count stops at 10,000, so for a larger store `products_listed` is the sum of its categories (73,712 for MadeiraMadeira). Magalu lists at most 60 brands per store and 60 subcategories per category, so in a large catalogue those two can leave some products out, and a product can be in more than one subcategory.

***

### 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>Where do I find a store's ID?</strong></summary>

In the address of its page on Magalu, after `/lojista/`, or after `seller_id=` in a product link from the search results. You can also paste either link as it is.

</details>

<details>
<summary><strong>Why is Magazine Luiza itself not found?</strong></summary>

Magalu's own store (`magazineluiza`) has no store page: its address opens the home page. Its row comes back as `not_found` with that explanation, and is not charged. The products it sells, with its legal name and CNPJ, are in the **Magazine Luiza Product Scraper**.

</details>

<details>
<summary><strong>Why is <code>legal_name</code> empty when there is a CNPJ?</strong></summary>

The legal name is the text the store typed when it registered, and some typed their store ID there instead. That is no legal name, so the field is left empty; the CNPJ still identifies the company.

</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 store come back as an error?</strong></summary>

Magalu sometimes does not return a page on the first request. Each store 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 stores 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 store, five stores at a time: 100 stores take about a minute. Rows are saved as each store 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 store read, with Apify's residential proxy and the compute included: there is no separate charge for platform usage. Rows of type `not_found` and `error` are not charged. A store given twice, by its ID and by a link, 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

## `sellers` (type: `array`):

One per line: the store's ID (the part after /lojista/ in its address, such as whirlpool), its page (https://www.magazineluiza.com.br/lojista/whirlpool/), or any product link with ?seller_id= (as in the links of the search results). Up to 1000 per run; repeated stores 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
{
  "sellers": [
    "whirlpool",
    "samsung",
    "https://www.magazineluiza.com.br/lojista/123comprou/"
  ],
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

## `stores` (type: `string`):

One row per store with everything its page shows

## `companies` (type: `string`):

The company behind each store: legal name, CNPJ and address

# 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 = {
    "sellers": [
        "whirlpool",
        "samsung",
        "https://www.magazineluiza.com.br/lojista/123comprou/"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("yasmany.casanova/magalu-seller-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 = {
    "sellers": [
        "whirlpool",
        "samsung",
        "https://www.magazineluiza.com.br/lojista/123comprou/",
    ],
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("yasmany.casanova/magalu-seller-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 '{
  "sellers": [
    "whirlpool",
    "samsung",
    "https://www.magazineluiza.com.br/lojista/123comprou/"
  ],
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call yasmany.casanova/magalu-seller-scraper --silent --output-dataset

```

## MCP server setup

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