# Casas Bahia Products Scraper (`confidential_gnat/casasbahia-products-scraper`) Actor

No hidden charges - Scrapes product listings from Casas Bahia, including title, brand, price, availability, seller, rating and images.

- **URL**: https://apify.com/confidential_gnat/casasbahia-products-scraper.md
- **Developed by:** [ActorFlow](https://apify.com/confidential_gnat) (community)
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.80 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## Casas Bahia Products Scraper

Scrapes product listings from Casas Bahia, one of Brazil's largest retailers. For each product it collects the title, brand, price in reais, availability, seller, rating, review count, category breadcrumbs and images. Results are returned as a structured JSON dataset that can be exported to CSV or Excel.

**Target website:** [casasbahia.com.br](https://www.casasbahia.com.br)

### ⚖️ Legality of this actor

This actor only collects data that is already publicly visible on Casas Bahia product pages — it does not log in, add items to a cart, or access account-only areas. Scraping publicly available data is generally considered lawful (see *hiQ Labs v. LinkedIn* as precedent). You remain responsible for complying with Casas Bahia's Terms of Service and with any applicable laws, including the Brazilian LGPD if you process personal data.

### 💡 Use Case

Retail and pricing teams who need current Brazilian retail pricing, availability and assortment data without checking product pages by hand.

### 🏭 Industry

E-commerce, Retail, Market Research, Price Intelligence.

### 📤 Output

Structured JSON dataset (exportable to CSV/Excel) with one record per product, containing: `url`, `productId`, `title`, `brand`, `description`, `price`, `currency`, `availability`, `seller`, `rating`, `reviewCount`, `breadcrumbs`, `category`, `images` and `gtin`.

### 🌐 Domain

E-commerce retail product and price data (Brazil).

### 🏷️ Label

`casas-bahia`, `product-scraper`, `brazil`, `ecommerce`, `price-monitoring`, `retail`

### ✨ Features

- **Product extraction** — title, brand, price, availability, seller, rating, review count, category breadcrumbs and images.
- **Pagination support** — walks category listing pages automatically until the per-URL item limit is reached.
- **Proxy support** — Apify proxy configuration with sensible defaults.
- **Automatic URL detection** — listing and product URLs are told apart automatically, so you can mix both in Start URLs.
- **Whole-site mode** — one toggle crawls the main category pages instead of a hand-picked list.
- **Cross-run caching** — an optional project name skips products already scraped in an earlier run.

### 🔧 Input Configuration

| Field | Type | Required | Default | Description |
| ----- | ---- | -------- | ------- | ----------- |
| `startUrls` | array | ✅ | `[{"url": "https://www.casasbahia.com.br/celular-smartphone/b"}]` | Casas Bahia category/search listing URLs or direct product URLs. The type of each URL is detected automatically. |
| `maxItems` | integer | — | `5` | Maximum number of products to scrape for each start URL. |
| `scrapeWholeSite` | boolean | — | `false` | Ignore Start URLs and crawl the main Casas Bahia category pages instead. |
| `cacheProjectName` | string | — | — | Optional. When set, articles already scraped under this project name in a previous run are skipped instead of being scraped again. |
| `proxyConfiguration` | object | — | Apify Proxy (preset, Brazil) | Keep the default. |

**Supported URL types:**

- **Listing pages** — category and search pages ending in `/b` or `/c`, e.g. `https://www.casasbahia.com.br/celular-smartphone/b`, and keyword searches using a `q=` parameter.
- **Product pages** — URLs containing a `/p/{id}` segment, e.g. `https://www.casasbahia.com.br/smartphone-samsung-galaxy/p/55066162`.

### 📦 Output

The dataset has one view, **Overview**, a compact table of each product's title, brand, price, currency, availability, rating and URL. The full record contains every field listed above.

### 💡 Uses of This Data

- Monitoring competitor pricing across Brazilian retail
- Tracking price changes and stock availability over time
- Building product and assortment catalogues for market analysis
- Brand and marketplace-seller monitoring
- Feeding pricing dashboards and repricing tools

### ⚠️ Limitations & Known Issues

- **Rate limiting** — heavy usage may trigger additional bot checks; keep concurrency modest on large runs.

### 📝 Notes

- **API integration** — this actor can be called as an API from any automation platform (Zapier, Make, n8n, custom scripts).
- **Data consistency with proxies** — prices, availability and delivery options on Casas Bahia vary by region, so results may differ between proxy IPs.

### 🚀 How to Use

1. [Sign up](https://apify.com/sign-up) for a free Apify account — includes **$5 monthly credit**.
2. Open the actor page and click **Try for free**.
3. Fill in the **Input** fields (at least one start URL is required).
4. Click **Start** and wait for the run to complete.
5. Download results from the **Output** tab in JSON, CSV, or Excel format.

You can also run this actor via the [Apify API](https://docs.apify.com/api/v2) or integrate it directly into your workflows using [Zapier](https://zapier.com/apps/apify), [Make](https://www.make.com/), or [n8n](https://n8n.io/).

### 🔗 Other Actors

> *\[Developer: add links to your related actors here.]*

### 💬 Support & Contact

If you encounter any issues or have questions, please [open an issue](https://github.com/) or reach out via the [Apify Community Forum](https://community.apify.com/).

You can also find more of our actors on the [Apify Store](https://apify.com/store).

***

### 🇧🇷 Guia Rápido (Português)

Este actor extrai dados de produtos do **Casas Bahia** automaticamente.

**Como usar:**

1. Preencha **Start URLs** com páginas de categoria (por exemplo `https://www.casasbahia.com.br/celular-smartphone/b`) ou diretamente com URLs de produtos. O tipo de cada URL é detectado automaticamente.
2. Defina **Max items per start URL** para limitar a quantidade de produtos por URL.
3. Ative **Scrape the whole site** para percorrer as principais categorias do site.
4. Preencha **Cache project name** (opcional) para pular produtos já extraídos em execuções anteriores.
5. Clique em **Start** e baixe os resultados em JSON, CSV ou Excel.

**Dados coletados:** título, marca, preço (R$), disponibilidade, vendedor, avaliação, número de avaliações, categoria e imagens.

**Observação:** este actor coleta apenas dados publicamente visíveis no site, sem login.

# Actor input Schema

## `startUrls` (type: `array`):

Casas Bahia category/search listing URLs or direct product URLs. The type of each URL is detected automatically.

## `maxItems` (type: `integer`):

Maximum number of products to scrape for each start URL.

## `scrapeWholeSite` (type: `boolean`):

Ignore Start URLs and crawl the main Casas Bahia category pages instead.

## `cacheProjectName` (type: `string`):

Optional. When set, articles already scraped under this project name in a previous run are skipped instead of being scraped again.

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

Casas Bahia is protected by Akamai and blocks plain datacenter and non-Brazilian traffic. The default Apify Unblocker proxy gets through; a Brazilian residential proxy also works.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://www.casasbahia.com.br/celular-smartphone/b"
    }
  ],
  "maxItems": 5,
  "scrapeWholeSite": false,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "UNBLOCKER"
    ],
    "apifyProxyCountry": "BR"
  }
}
```

# Actor output Schema

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

No description

# 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 = {
    "startUrls": [
        {
            "url": "https://www.casasbahia.com.br/celular-smartphone/b"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("confidential_gnat/casasbahia-products-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 = { "startUrls": [{ "url": "https://www.casasbahia.com.br/celular-smartphone/b" }] }

# Run the Actor and wait for it to finish
run = client.actor("confidential_gnat/casasbahia-products-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 '{
  "startUrls": [
    {
      "url": "https://www.casasbahia.com.br/celular-smartphone/b"
    }
  ]
}' |
apify call confidential_gnat/casasbahia-products-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,confidential_gnat/casasbahia-products-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/riE42tsadDN2hHq2G/builds/RxIg4Nc3P0O6SbyRu/openapi.json
