# Bazar Historias Peru Scraper — Products & Prices (`codemaker/pe-bazarhistorias-scraper`) Actor

Scrape products, prices, discounts, stock, EAN and categories from bazarhistorias.pe (Peru). Whole catalog, categories or keywords. Clean normalized output.

- **URL**: https://apify.com/codemaker/pe-bazarhistorias-scraper.md
- **Developed by:** [Daniel Mendoza](https://apify.com/codemaker) (community)
- **Categories:** E-commerce, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.50 / 1,000 product records

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

## Bazar Historias Peru Scraper — Products & Prices

**English** · [Español](#español)

Scrape the product catalog of **[bazarhistorias.pe](https://bazarhistorias.pe)** (Peru): names, prices, list prices, discounts,
stock status, brand, EAN barcode, category and image, as clean, normalized records (one per SKU; each variant of a
product, e.g. size or pack, is its own record).
No browser and no login: the Actor reads the store's public catalog API.

### Use cases

- **Price monitoring**: schedule the Actor daily or weekly and compare prices and discounts between runs.
- **Market and competitor research**: assortment, brands and price positioning of bazarhistorias.pe in Peru.
- **Retail analytics**: match products across stores by EAN and feed spreadsheets, dashboards or databases.

### What you get

- Whole catalog, specific categories, or keyword searches.
- Prices in **PEN** as numbers, discount computed from the regular price (only when the product is on sale).
- Only plain text: no HTML from the store reaches your dataset.
- The whole catalog is covered page by page, product variants included.

### How to use it

1. Paste one or more category URLs from bazarhistorias.pe into `categoryUrls`, or leave it empty to scrape the whole catalog.
2. Set `maxItems` to try it on a few products first.
3. Run it and download the results as JSON, CSV or Excel, or read them through the Apify API. Use Apify schedules
   and webhooks to keep a price history.

### Input

| Field | Description |
|---|---|
| `categoryUrls` | Category pages, e.g. `https://bazarhistorias.pe/artbook-japon/`. Empty = whole catalog. |
| `searchTerms` | Optional keywords. |
| `maxItems` | Maximum records. Empty = no limit. |
| `onlyAvailable` | Skip out-of-stock products (default `true`). |
| `includeDescription` | Add the product description as plain text (default `false`). |

### Output example

```json
{
  "site": "bazarhistorias.pe",
  "country": "PE",
  "currency": "PEN",
  "productId": "…",
  "skuId": "…",
  "name": "…",
  "brand": "…",
  "price": 0,
  "listPrice": 0,
  "discountPercent": null,
  "priceWithoutTaxes": null,
  "isAvailable": true,
  "category": "…",
  "categoryPath": [
    "…"
  ],
  "ean": "…",
  "url": "https://bazarhistorias.pe/…/p",
  "imageUrl": "…",
  "seller": null,
  "scrapedAt": "2026-10-29T12:00:00.000Z"
}
```

| Field | Meaning |
|---|---|
| `price`, `listPrice` | Sale price and regular price, in `currency`. |
| `discountPercent` | Discount over the regular price, or `null` if the product is not on sale. |
| `isAvailable` | In stock for online purchase. |
| `skuId`, `productId`, `ean`, `reference` | Store identifiers, barcode and the store's SKU code. |
| `name`, `productName` | Variant name (e.g. with the size) and the product name. |
| `category`, `categoryPath` | Deepest category and the full path. |
| `scrapedAt` | When the record was read (ISO 8601, UTC). |

### Pricing

Pay per event: **USD 1.50 per 1,000 products** (USD 0.0015 per record), plus Apify's small start fee per run (USD 0.00005). Example: 10,000 products cost about USD 15.00. You can cap the spend of each run in the run options; the Actor stops cleanly when the cap is reached.

### Limitations

- Prices are the ones the website shows to an anonymous visitor: no member, card or login-only prices.
- `searchTerms` uses the store's own search engine, so results are as good as the store's search.

### FAQ

**Is it legal to scrape bazarhistorias.pe?** The Actor only reads public product data, at a moderate pace and following
the site's robots.txt. It collects no personal data. How you use the data is your responsibility (see Notes).

**Can I get other stores?** Yes: look for our other Actors for Latin American stores on our
[Apify profile](https://apify.com/codemaker). All of them return the same record format.

**Something is broken or missing?** Open an issue on the Actor's Issues tab and we will look at it.

### Notes

- Uses the store's public catalog API at a moderate request rate; no login, no personal data.
- A run with `maxItems: 50` takes well under a minute.
- You are responsible for using the data in line with the store's terms and applicable law.

***

### Español

Extrae el catálogo de productos de **[bazarhistorias.pe](https://bazarhistorias.pe)** (Perú): nombre, precio, precio de lista,
descuento, disponibilidad, marca, código EAN, categoría e imagen, en registros normalizados (uno por SKU; cada
variante de un producto, p. ej. talla o presentación, es un registro aparte).
Sin navegador y sin login: lee la API pública de catálogo de la tienda.

#### Para qué sirve

- **Seguimiento de precios**: prográmelo a diario o cada semana y compare precios y descuentos entre corridas.
- **Estudios de mercado y competencia**: surtido, marcas y posicionamiento de precios de bazarhistorias.pe.
- **Análisis de retail**: cruce productos entre tiendas por EAN y lleve los datos a planillas, paneles o bases.

#### Qué entrega

- Catálogo completo, categorías concretas o búsquedas por palabra clave.
- Precios en **PEN** como números; el descuento se calcula sobre el precio normal (sólo si el producto está
  en oferta).
- Sólo texto plano: ningún HTML de la tienda llega al dataset.
- Recorre el catálogo completo página por página, variantes incluidas.

#### Cómo se usa

1. Pegue una o más URLs de categoría de bazarhistorias.pe en `categoryUrls`, o déjelo vacío para el catálogo completo.
2. Ponga un `maxItems` bajo para probar primero con pocos productos.
3. Ejecútelo y descargue los resultados en JSON, CSV o Excel, o léalos por la API de Apify. Con las
   programaciones y webhooks de Apify puede llevar un historial de precios.

#### Entrada

| Campo | Descripción |
|---|---|
| `categoryUrls` | Páginas de categoría, p. ej. `https://bazarhistorias.pe/artbook-japon/`. Vacío = catálogo completo. |
| `searchTerms` | Palabras clave opcionales. |
| `maxItems` | Máximo de registros. Vacío = sin límite. |
| `onlyAvailable` | Omitir productos sin stock (por defecto `true`). |
| `includeDescription` | Agregar la descripción como texto plano (por defecto `false`). |

#### Precio

Pago por evento: **USD 1,50 por 1.000 productos** (USD 0,0015 por registro), más el pequeño cargo de Apify por cada inicio (USD 0,00005). Ejemplo: 10.000 productos cuestan unos USD 15,00. Puede fijar un tope de gasto por ejecución; el Actor se detiene limpiamente al alcanzarlo.

#### Límites

- Los precios son los que ve un visitante anónimo de la web: sin precios de socio, de tarjeta ni con sesión.
- `searchTerms` usa el buscador de la propia tienda: los resultados son tan buenos como ese buscador.

#### Preguntas frecuentes

**¿Es legal extraer datos de bazarhistorias.pe?** El Actor sólo lee datos públicos de productos, a un ritmo moderado y
respetando el robots.txt del sitio. No recoge datos personales. El uso que haga de los datos es su responsabilidad
(ver Notas).

**¿Hay otras tiendas?** Sí: busque nuestros otros Actors de tiendas latinoamericanas en nuestro
[perfil de Apify](https://apify.com/codemaker). Todos entregan el mismo formato de registro.

**¿Algo falla o falta?** Abra un aviso en la pestaña Issues del Actor y lo revisamos.

#### Notas

- Usa la API pública de catálogo de la tienda a un ritmo moderado; sin login ni datos personales.
- Usted es responsable de usar los datos conforme a los términos de la tienda y la ley aplicable.

# Actor input Schema

## `categoryUrls` (type: `array`):

Category pages of bazarhistorias.pe to scrape (e.g. https://bazarhistorias.pe/artbook-japon/). Leave empty to scrape the whole catalog. / Páginas de categoría a recorrer; vacío = catálogo completo.

## `searchTerms` (type: `array`):

Optional keywords (store search). Combined with categories if both are given. / Palabras clave opcionales.

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

Maximum number of records (one per SKU). Leave empty for no limit. / Máximo de registros (uno por SKU); vacío = sin límite.

## `onlyAvailable` (type: `boolean`):

Skip out-of-stock products. / Omitir productos sin stock.

## `includeDescription` (type: `boolean`):

Add the product description as plain text. / Agrega la descripción del producto como texto plano.

## `maxConcurrency` (type: `integer`):

Parallel requests. Keep it low to be gentle with the store. / Peticiones en paralelo.

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

Usually not needed: the store's public catalog API answers without a proxy. / Normalmente no hace falta.

## Actor input object example

```json
{
  "categoryUrls": [
    "https://bazarhistorias.pe/artbook-japon/"
  ],
  "maxItems": 50,
  "onlyAvailable": true,
  "includeDescription": false,
  "maxConcurrency": 4,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

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

All product records of the run, from the default dataset.

# 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 = {
    "categoryUrls": [
        "https://bazarhistorias.pe/artbook-japon/"
    ],
    "maxItems": 50
};

// Run the Actor and wait for it to finish
const run = await client.actor("codemaker/pe-bazarhistorias-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 = {
    "categoryUrls": ["https://bazarhistorias.pe/artbook-japon/"],
    "maxItems": 50,
}

# Run the Actor and wait for it to finish
run = client.actor("codemaker/pe-bazarhistorias-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 '{
  "categoryUrls": [
    "https://bazarhistorias.pe/artbook-japon/"
  ],
  "maxItems": 50
}' |
apify call codemaker/pe-bazarhistorias-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,codemaker/pe-bazarhistorias-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/WFFTTWBw4zcFh7Rh5/builds/nxXsRFUUdr3bOIa8C/openapi.json
