# Buscalibre Chile Product Scraper - Books, ISBN and Prices (`scraperschile/buscalibre`) Actor

Busca libros del catálogo público de Buscalibre Chile por título o ISBN usando sus sitemaps oficiales. Extrae nombre, autores, editorial, ISBN, precio CLP, disponibilidad, descripción, imagen, rating y URL.

- **URL**: https://apify.com/scraperschile/buscalibre.md
- **Developed by:** [Scrapers Chile](https://apify.com/scraperschile) (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 $3.00 / 1,000 buscalibre product results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — 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

## Buscalibre Chile Product Scraper - Books, ISBN and Prices

Busca libros del catálogo público de [Buscalibre Chile](https://www.buscalibre.cl/) por título o ISBN. Entrega datos listos para comparar precios, vigilar disponibilidad, enriquecer catálogos y alimentar automatizaciones mediante JSON, CSV, Excel o la API de Apify.

### Datos extraídos

- ID público del producto, título e ISBN.
- Autor o autores y editorial.
- Precio y moneda publicados.
- Disponibilidad, stock y condición.
- Descripción e imagen pública.
- Rating agregado y cantidad de valoraciones.
- URL canónica del producto, sitemap de origen y fecha de extracción.

No se recopilan reseñas individuales, nombres de compradores, cuentas, carrito, pagos ni información privada.

### Búsqueda responsable

El `robots.txt` de Buscalibre bloquea para bots generales las búsquedas con parámetros (`/libros/search?...`) y el autocompletado (`/v2/autocomplete`). Este Actor no visita esas rutas.

En su lugar utiliza únicamente:

1. URLs públicas de producto entregadas expresamente en `productUrls`.
2. El [índice público de sitemaps de productos](https://www.buscalibre.cl/sitemaps/productos.xml) declarado por Buscalibre en `robots.txt`.
3. Las páginas públicas de producto permitidas por esa política.
4. Los datos estructurados `Product` publicados por la propia página.

La coincidencia se hace sobre el título presente en la URL pública o sobre ISBN. No es una copia de la búsqueda interna de Buscalibre y puede devolver menos resultados si limitas `maxSitemaps`.

### Ejemplo

```json
{
  "query": "el hombre en busca de sentido",
  "maxResults": 5,
  "maxSitemaps": 28,
  "includeOutOfStock": true
}
```

También puedes buscar un ISBN exacto:

```json
{
  "query": "9788425432026",
  "maxResults": 1,
  "maxSitemaps": 28
}
```

O leer directamente una o más fichas públicas, sin recorrer sitemaps adicionales si dejas `query` vacío:

```json
{
  "query": "",
  "productUrls": [
    "https://www.buscalibre.cl/libro-el-hombre-en-busca-de-sentido/9788425432026/p/47056974"
  ],
  "maxResults": 1
}
```

### Precio

- USD 0.003 por producto guardado en el dataset.
- No existe cobro de inicio.
- El usuario paga además el uso de plataforma que corresponda.
- Una búsqueda sin resultados no genera cobro por resultados.

### Límites y vigencia

- El índice tenía 28 archivos de 25.000 URLs cada uno al auditarse el 2 de agosto de 2026; Buscalibre puede modificarlo.
- Los precios, stock, promociones y tiempos de entrega pueden cambiar y dependen de la ficha pública al momento de la ejecución.
- Una búsqueda de autor sin palabras presentes en el título puede no encontrar coincidencias; la fuente de descubrimiento solo publica URL, no metadatos de autor.
- Los [términos de Buscalibre](https://www.buscalibre.cl/terminos-y-condiciones_st.html) permiten al visitante navegar y comparar productos. El uso posterior de los datos sigue siendo responsabilidad del usuario.
- No se usan cuentas, sesiones, proxies residenciales, navegadores ni métodos para eludir bloqueos.

# Actor input Schema

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

Opcional. Título completo, palabras del título o ISBN-10/ISBN-13 para localizar URLs dentro de los sitemaps públicos. No consulta el buscador interno ni rutas bloqueadas por robots.txt.

## `productUrls` (type: `array`):

Opcional. Fichas con formato https://www.buscalibre.cl/.../ISBN/p/ID, sin parámetros. Solo se aceptan páginas públicas de producto del dominio chileno.

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

Cantidad máxima de productos únicos guardados en el dataset.

## `maxSitemaps` (type: `integer`):

Cantidad máxima de archivos del catálogo que se revisarán. Usa 28 para cubrir el índice actual completo.

## `includeOutOfStock` (type: `boolean`):

Incluye productos cuya ficha pública indica que no están disponibles.

## `delaySecs` (type: `number`):

Pausa responsable entre páginas públicas de producto.

## `timeoutSecs` (type: `integer`):

Segundos máximos para esperar cada sitemap o ficha pública.

## `retries` (type: `integer`):

Cantidad de intentos ante errores transitorios.

## Actor input object example

```json
{
  "query": "el hombre en busca de sentido",
  "maxResults": 10,
  "maxSitemaps": 28,
  "includeOutOfStock": true,
  "delaySecs": 0.75,
  "timeoutSecs": 30,
  "retries": 3
}
```

# Actor output Schema

## `status` (type: `string`):

success, partial, no\_results o failed.

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

No description

## `errors` (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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("scraperschile/buscalibre").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 = {}

# Run the Actor and wait for it to finish
run = client.actor("scraperschile/buscalibre").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 '{}' |
apify call scraperschile/buscalibre --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,scraperschile/buscalibre"
        }
    }
}

```

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/DDbp52o61htjdg7yZ/builds/mZi1sxUtGWIaoE5IN/openapi.json
