# Product Review Scraper - Avaliações de Produtos por EAN (`brasildados/product-review-scraper`) Actor

Consulte nota e avaliações de produtos brasileiros por EAN (código de barras) em Magalu, Kabum, Pão de Açúcar e outras lojas. | Query product ratings and reviews by EAN barcode from major Brazilian e-commerce stores.

- **URL**: https://apify.com/brasildados/product-review-scraper.md
- **Developed by:** [BrasilDados.org](https://apify.com/brasildados) (community)
- **Categories:** E-commerce, Lead generation, Automation
- **Stats:** 1 total users, 1 monthly users, 0.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

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

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

### Product Review Scraper - Avaliações de Produtos por EAN

Consulte **nota e avaliações de produtos brasileiros** por EAN (código de barras) em múltiplas lojas - Magalu, Kabum, Pão de Açúcar, Leroy Merlin e outras. Para cada EAN, receba nota geral ponderada, total de avaliações, tendência temporal (30/90/180/365 dias) e, opcionalmente, os textos das avaliações mais recentes por loja.

Disponível em duas formas de uso:

- **Execução tradicional** (job): envie sua lista de EANs e baixe o dataset (JSON, CSV, Excel, XML).
- **API REST (Standby)**: envie `POST /reviews` com o JSON de entrada e receba os resultados na resposta - pronto para integrar em qualquer pipeline.

### Para quem é

- **E-commerce e marketplace**: monitore a reputação dos seus produtos em múltiplas plataformas com uma única chamada.
- **Due diligence de fornecedor**: avalie a reputação dos produtos antes de incluir no catálogo.
- **Inteligência competitiva**: compare produtos concorrentes pelo EAN.
- **Pipelines de NLP e análise de sentimento**: colete reviews reais com `maxReviews > 0`.

### Diferenciais

- Cobertura de múltiplas lojas em uma consulta: Magazine Luiza, Kabum, Pão de Açúcar, Leroy Merlin e mais.
- Nota geral ponderada pelo volume de cada loja - mais justa do que simples média aritmética.
- Tendência temporal pré-calculada (30/90/180/365 dias) pronta para alertas e dashboards.
- Deduplicação automática de avaliações repetidas no upstream.
- Valores zero nos campos temporais convertidos para `null` - dados limpos sem ruído.

### Input

```json
{
  "eans": ["7891910000197", "7896004004018"],
  "maxReviews": 5
}
````

| Campo | Tipo | Default | Descrição |
|-------|------|---------|-----------|
| `eans` | string\[] | obrigatório | Lista de EANs (códigos de barras). Strings numéricas de 8 a 14 dígitos. Máximo 1.000 por execução. |
| `maxReviews` | integer | 5 | Quantos textos de avaliações retornar **por loja** no campo `avaliacoes[]`. Cada loja retorna até este número individualmente - não é o total geral. Use `0` para receber apenas dados agregados (nota, totais, tendência) sem textos. Máximo 50. |

EANs inválidos (não numéricos ou fora de 8–14 dígitos) retornam `{ "encontrado": false, "erro": "EAN inválido" }` sem custo.

### Output

Um registro por EAN no dataset:

```json
{
  "ean": "7891910000197",
  "encontrado": true,
  "consultadoEm": "2026-05-28T00:00:00Z",
  "totalAvaliacoes": 27,
  "notaGeral": 5.0,
  "fontes": {
    "MagazineLuiza": {
      "totalAvaliacoes": 27,
      "notaMedia": 5.0,
      "melhorNota": 5,
      "piorNota": 5,
      "primeiraAvaliacaoEm": null,
      "ultimaAvaliacaoEm": "2023-11-21",
      "topKeywords": [],
      "avaliacoes30dias": null,
      "avaliacoes90dias": null,
      "avaliacoes180dias": null,
      "avaliacoes365dias": null,
      "nota30dias": null,
      "nota90dias": null,
      "nota180dias": null,
      "nota365dias": null,
      "avaliacoes": []
    }
  }
}
```

#### Campos principais

| Campo | Descrição |
|-------|-----------|
| `ean` | EAN consultado. |
| `encontrado` | True se o produto foi encontrado com ao menos uma avaliação. |
| `totalAvaliacoes` | Soma de avaliações em todas as fontes. |
| `notaGeral` | Nota média ponderada pelo volume de avaliações de cada fonte. |
| `fontes` | Objeto com dados por loja. Chave = nome da loja (ex: `MagazineLuiza`, `PaoDeAcucar`). |
| `fontes.*.avaliacoes` | Textos das avaliações mais recentes, deduplicados (só com `maxReviews > 0`). |

Valores zero nos campos temporais são convertidos para `null`. Datas sentinela `0001-01-01` são convertidas para `null`.

### Uso via API REST (Standby)

```bash
curl -X POST \
  -H "Authorization: Bearer SEU_APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Accept-Encoding: gzip" \
  --compressed \
  -d '{"eans":["7891910000197"],"maxReviews":5}' \
  "https://brasildados--product-review-scraper.apify.actor/reviews"
```

A documentação interativa (Swagger UI) fica na aba **Standby** do actor no Apify Console.

### Pricing

`$0,10` por EAN consultado. EANs inválidos (formato errado) não são cobrados.

| Uso | EANs | Custo |
|-----|------|-------|
| Triagem de produto | 10 | $1,00 |
| Monitoramento semanal | 100 | $10,00 |
| Varredura de catálogo | 1.000 | $100,00 |

### Casos de uso

- **Monitoramento de marca**: acompanhe nota e volume de avaliações dos seus produtos em múltiplas lojas com uma chamada semanal.
- **Due diligence de fornecedor**: avalie a reputação de produtos antes de incluir no catálogo.
- **Inteligência competitiva**: compare produtos concorrentes pelo EAN em todas as lojas de uma vez.
- **Análise de sentimento**: com `maxReviews > 0`, alimente pipelines de NLP com reviews reais de múltiplas lojas.

### Pipeline / Actors relacionados

| Actor | Quando usar no pipeline |
|-------|------------------------|
| [CNPJ Enrichment & Lead Search](https://apify.com/brasildados/cnpj-enrichment-lead-search) | Identifique o CNPJ do fabricante ou varejista pelo nome da marca |
| [Brazil Sanctions Check](https://apify.com/brasildados/sanctions-check) | Verifique se fabricantes ou distribuidores dos produtos têm sanções ativas |
| [Government Contracts Check](https://apify.com/brasildados/government-contracts-check) | Para produtos vendidos ao governo, consulte o histórico de contratos dos fornecedores |
| [DOU Monitor](https://apify.com/brasildados/dou-monitor) | Monitore publicações sobre fabricantes e marcas no Diário Oficial |

**Exemplo de pipeline de due diligence de produto:** product reviews → enrichment do fabricante → sanctions check.

***

### Product Review Scraper - EAN-Based Reviews (English)

Query **ratings and reviews for Brazilian products** by EAN (barcode) across multiple stores - Magalu, Kabum, Pão de Açúcar, Leroy Merlin and others. For each EAN, get a weighted overall score, total review count, time-based trends (30/90/180/365 days) and, optionally, the most recent review texts per store.

Available in two modes:

- **Traditional run** (job): submit your EAN list, download the dataset (JSON, CSV, Excel, XML).
- **REST API (Standby)**: send `POST /reviews` with JSON input and get results in the response - ready for any pipeline.

#### Who is it for

- **E-commerce and marketplace teams** monitoring product reputation across multiple platforms in one call.
- **Supplier due diligence**: assess product reputation before adding to catalog.
- **Competitive intelligence**: compare competing products by EAN across all stores at once.
- **NLP and sentiment analysis pipelines**: collect real reviews with `maxReviews > 0`.

#### Highlights

- Multi-store coverage in a single query: Magazine Luiza, Kabum, Pão de Açúcar, Leroy Merlin and more.
- Weighted overall score by store volume - fairer than a simple arithmetic average.
- Pre-computed time trends (30/90/180/365 days) ready for alerts and dashboards.
- Automatic deduplication of repeated reviews from upstream.
- Zero temporal values converted to `null` - clean data without noise.

#### Pricing

`$0.10` per EAN queried. Invalid EANs (wrong format) are not billed.

# Actor input Schema

## `eans` (type: `array`):

Lista de EANs (códigos de barras). Strings numéricas de 8 a 14 dígitos. Máximo 1.000 por execução. EANs inválidos retornam erro sem custo. | List of EANs (barcodes). Numeric strings of 8–14 digits. Max 1,000 per run. Invalid EANs return an error at no cost.

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

Quantos textos de avaliações retornar por loja no campo `avaliacoes[]`. Cada loja (MagazineLuiza, PaoDeAcucar, etc.) retorna até este número de avaliações individualmente — não é o total geral. Use 0 para receber apenas os dados agregados (nota, totais e tendência temporal) sem nenhum texto. Máximo 50. | How many review texts to return per store in the `avaliacoes[]` field. Each store returns up to this number independently — not a global total. Use 0 for aggregated data only (ratings, totals, trends) with no texts. Max 50.

## Actor input object example

```json
{
  "eans": [
    "7891910000197",
    "7896004004018"
  ],
  "maxReviews": 5
}
```

# Actor output Schema

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

Dataset com um registro por EAN consultado, contendo nota geral, total de avaliações, tendência temporal e textos de avaliações (quando maxReviews > 0). / Dataset with one record per queried EAN, containing overall rating, review count, time trends and review texts (when maxReviews > 0).

# 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 = {
    "eans": [
        "7891910000197",
        "7896004004018"
    ],
    "maxReviews": 5
};

// Run the Actor and wait for it to finish
const run = await client.actor("brasildados/product-review-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 = {
    "eans": [
        "7891910000197",
        "7896004004018",
    ],
    "maxReviews": 5,
}

# Run the Actor and wait for it to finish
run = client.actor("brasildados/product-review-scraper").call(run_input=run_input)

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

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

```

## CLI example

```bash
echo '{
  "eans": [
    "7891910000197",
    "7896004004018"
  ],
  "maxReviews": 5
}' |
apify call brasildados/product-review-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=brasildados/product-review-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Product Review Scraper - Avaliações de Produtos por EAN",
        "description": "Consulte nota e avaliações de produtos brasileiros por EAN (código de barras) em Magalu, Kabum, Pão de Açúcar e outras lojas. | Query product ratings and reviews by EAN barcode from major Brazilian e-commerce stores.",
        "version": "1.0",
        "x-build-id": "B9EMbYt9EfPZgKIdW"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/brasildados~product-review-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-brasildados-product-review-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/brasildados~product-review-scraper/runs": {
            "post": {
                "operationId": "runs-sync-brasildados-product-review-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/brasildados~product-review-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-brasildados-product-review-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "eans"
                ],
                "properties": {
                    "eans": {
                        "title": "EANs",
                        "minItems": 1,
                        "maxItems": 1000,
                        "type": "array",
                        "description": "Lista de EANs (códigos de barras). Strings numéricas de 8 a 14 dígitos. Máximo 1.000 por execução. EANs inválidos retornam erro sem custo. | List of EANs (barcodes). Numeric strings of 8–14 digits. Max 1,000 per run. Invalid EANs return an error at no cost.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "maxReviews": {
                        "title": "Textos de avaliações por loja (maxReviews)",
                        "minimum": 0,
                        "maximum": 50,
                        "type": "integer",
                        "description": "Quantos textos de avaliações retornar por loja no campo `avaliacoes[]`. Cada loja (MagazineLuiza, PaoDeAcucar, etc.) retorna até este número de avaliações individualmente — não é o total geral. Use 0 para receber apenas os dados agregados (nota, totais e tendência temporal) sem nenhum texto. Máximo 50. | How many review texts to return per store in the `avaliacoes[]` field. Each store returns up to this number independently — not a global total. Use 0 for aggregated data only (ratings, totals, trends) with no texts. Max 50.",
                        "default": 5
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
