# Bookdealers Scraper - Book Prices and Stock (`scrapewise/bookdealers-scraper`) Actor

Scrape bookdealers.co.za books (South Africa) from collection or product links: title, vendor, product type, price in ZAR, compare-at price, stock per variant, tags, images and description. Schedule it to track prices. Error rows are free.

- **URL**: https://apify.com/scrapewise/bookdealers-scraper.md
- **Developed by:** [Scrapewise Data](https://apify.com/scrapewise) (community)
- **Categories:** E-commerce, Automation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.35 / 1,000 book delivereds

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

## Bookdealers Scraper - Book Prices and Stock

Scrape book data from [bookdealers.co.za](https://www.bookdealers.co.za), a South African online bookshop. Paste a collection link (for example the all-products collection) or a product link, and get one clean row per book: title, vendor, product type, price in South African rand (ZAR), compare-at price, stock status for every variant, tags, images and the plain-text description.

### At a glance

- **Price:** US$ 1.35 per 1,000 books delivered (US$ 0.00135 each), plus the automatic actor start event at US$ 0.005.
- **Currency:** prices come in ZAR exactly as the store shows them. No conversion is applied.
- **No login:** only public store pages are read. No account, cookie or token is needed.
- **Error rows are free:** a link from another site, a product that does not exist or a collection with no books is reported as a row with an error code, and nothing is charged for it.
- **Paged collections:** a collection is read page by page until the end, so a large collection is collected in full up to your cap.

### Quick start

Run it with this input to get 50 books from the store catalogue:

```json
{
  "startUrls": ["https://www.bookdealers.co.za/collections/all"],
  "maxItems": 50,
  "includeDescription": true
}
```

Add a product link to the same list to include a single book, for example `https://www.bookdealers.co.za/products/die-derde-vryheidsoorlog-ons-kan-wen-afrikaans-p-f-bruwer`. Each book appears once in the dataset, even when it is in several collections or in the list twice.

To track prices, schedule the run daily and turn on "Only books in stock" if you only want books you can buy. If a run is restarted, books already delivered in that run are not charged again.

### Input

| Field | Type | Default | What it does |
|---|---|---|---|
| `startUrls` | list of links | All-products collection | Collection links (`/collections/<handle>`) and product links (`/products/<handle>`) from bookdealers.co.za. Links from other sites are reported as error rows. |
| `availableOnly` | boolean | false | On: skip books with no variant in stock. Skipped books are free. |
| `includeDescription` | boolean | true | On: plain-text description. Off: the description field is null and the row is shorter. |
| `maxItems` | integer | 50 | Hard cap for the whole run across all links. 0 means no cap. |
| `proxyConfiguration` | object | Apify Proxy | Leave it as it is unless you have a reason to change it. |

Keyword search is not part of this Actor. Use the collection that holds the books you want, or paste several collection links, one per line.

### Output fields

Each row has these fields:

| Field | Example | Notes |
|---|---|---|
| `type` | `product` | `product` for a book, `error` for an error row. |
| `productId` | `10366822088752` | Store product id. Used to drop duplicates. |
| `handle` | `die-derde-vryheidsoorlog-ons-kan-wen-afrikaans-p-f-bruwer` | URL slug of the product page. |
| `url` | `https://www.bookdealers.co.za/products/die-derde-vryheidsoorlog-ons-kan-wen-afrikaans-p-f-bruwer` | Product page. |
| `title` | `Die Derde Vryheidsoorlog... Ons Kan Wen [Afrikaans] | P.F. Bruwer` | Title as the store shows it. |
| `vendor` | `Bookdealers` | Vendor field of the store listing. |
| `productType` | `Used Book` | Store product type. |
| `tags` | `["Afrikaans", "History", "Non-fiction", ...]` | Store tags, as a list. |
| `currency` | `ZAR` | Currency of the variant price. |
| `price` | `125.0` | Lowest variant price. |
| `priceMax` | `125.0` | Highest variant price. |
| `compareAtPrice` | `null` | Highest compare-at price, only when the book is on sale. |
| `onSale` | `false` | True when the compare-at price is above the price. |
| `available` | `true` | True when at least one variant is in stock. |
| `variantCount` | `1` | Number of variants. |
| `variants` | list | Each variant with `variantId`, `title`, `sku` (ISBN for most books), `price`, `compareAtPrice`, `available`. |
| `options` | `["Title"]` | Option names of the listing. |
| `imageUrl` | `https://cdn.shopify.com/s/files/1/0253/3343/files/IMG_20261108_090552_1.jpg?v=1794226528` | First image URL. The image itself is not downloaded. |
| `images` | list of URLs | Up to 10 image URLs. |
| `description` | text | Plain text, no HTML. A line that names the author is left out. Null when the store has no description. |
| `publishedAt` | `2026-11-09T14:16:27+02:00` | When the listing was published. |
| `updatedAt` | `2026-11-09T19:28:10+02:00` | Last change in the store. |
| `sourceQuery` | `all` | The collection or product link the row came from. |
| `scrapedAt` | `2026-11-09T17:54:03Z` | Time the row was collected (UTC). |
| `errorCode` | `null` | Filled only on error rows. |
| `error` | `null` | Message for error rows. |

Every field is always present, so a table or a spreadsheet keeps the same columns from run to run.

### Example output

One real row from a run on 09 Nov 2026, with the main fields (the variant list and the image list are left out here to keep it short; the full row has them):

```json
{
  "type": "product",
  "productId": "10366822088752",
  "handle": "die-derde-vryheidsoorlog-ons-kan-wen-afrikaans-p-f-bruwer",
  "url": "https://www.bookdealers.co.za/products/die-derde-vryheidsoorlog-ons-kan-wen-afrikaans-p-f-bruwer",
  "title": "Die Derde Vryheidsoorlog... Ons Kan Wen [Afrikaans] | P.F. Bruwer",
  "vendor": "Bookdealers",
  "productType": "Used Book",
  "tags": [
    "Afrikaans",
    "History",
    "Non-fiction",
    "Politics",
    "Politics Sociology and Philosophy",
    "South Africa"
  ],
  "currency": "ZAR",
  "price": 125.0,
  "priceMax": 125.0,
  "compareAtPrice": null,
  "onSale": false,
  "available": true,
  "variantCount": 1,
  "options": [
    "Title"
  ],
  "imageUrl": "https://cdn.shopify.com/s/files/1/0253/3343/files/IMG_20261108_090552_1.jpg?v=1794226528",
  "description": "Title: Die Derde Vryheidsoorlog... Ons Kan Wen\nPublisher: Oranjewerkers Promosies circa 1986 \nISBN: [contact removed] \nCondition: Very good. Some illustrations. The covers are lightly rubbed and the corners are bumped. An intact copy with clean text.\nBinding: Hardcover\nPages: 344\nDimensions: 21 x 15.5 x 2 cm. \nSKU: AK9216 \nPrice: R125.00 \n+++\nby P.F. Bruwer\n+++\nPlease see photos for synopsis and more details of the book",
  "publishedAt": "2026-11-09T14:16:27+02:00",
  "updatedAt": "2026-11-09T19:28:10+02:00",
  "sourceQuery": "all",
  "scrapedAt": "2026-11-09T17:54:49Z",
  "errorCode": null,
  "error": null
}
```

### Error rows

Error rows keep the same shape. They are never charged.

| errorCode | When it appears | What to do |
|---|---|---|
| `INVALID_URL` | The link is not a bookdealers.co.za collection or product link. | Paste a collection or product link from the store. |
| `NOT_FOUND` | A product link points to a product that does not exist (or no longer exists). | Check the link in the store. |
| `NO_RESULTS` | A collection link does not exist, or it has no books. | Check the collection link. |
| `BLOCKED` | The store refused every attempt for that link during the run. | Run it again in a few minutes. |
| `INVALID_INPUT` | A number field has a value that is not a whole number. | Fix the value in the input. |
| `UNEXPECTED` | Something unplanned stopped the run. Books already delivered stay in the dataset and were charged once each. | Run it again; books already delivered are not charged twice. |

### Integrations, scheduling and AI agents

- **Schedules:** run it every day or every week in the Apify Console. Combine it with the "Only books in stock" option to keep an in-stock list.
- **Export:** download the dataset as JSON, CSV, Excel or XML from the run page, or read it through the API.
- **Make, n8n and Zapier:** connect the dataset to a spreadsheet, a database or a messaging tool with the Apify integration of each platform.
- **Apify MCP server:** AI agents can run this Actor and read its dataset through the Apify MCP server, with the same input shown above.

### FAQ

**Can I search by keyword?**
Not in this version. Paste the collection that holds the books you need, or several collection links.

**Are prices in US dollars?**
No. Prices stay in ZAR (South African rand), the currency the store uses. Convert them yourself if you need another currency.

**Does it download the book files or covers?**
No. It records the image URLs and the store text. Nothing is downloaded.

**Why is there a `compareAtPrice` on some books and not others?**
The store shows a higher "was" price only for books on sale. When there is none, the field is null and `onSale` is false.

**Is it charged for books that repeat?**
No. A book that appears in two links or twice in the same run is delivered once and charged once.

**Can I use it for many collections at once?**
Yes. Paste all the links, one per line. The `maxItems` cap applies to the whole run.

### Limitations

- Collections are read in full only up to the `maxItems` cap. Set the cap high enough to cover the collection.
- Most books have a single variant, and the `options` field shows `Title` for them.
- A description is null when the store has none for that product.
- Stock and price are the values on the day of the run. Schedule the Actor to follow changes.
- Store text is kept as the store writes it, including tags and vendor names.
- The all-products collection can include items that are not books. Filter by `productType` or `tags` if you only want books.

### Changelog

- **0.1 (09 Nov 2026):** first version. Collection and product links, paging, stock filter, description on or off, one row per book, error rows that are free.

# Actor input Schema

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

Links from https://www.bookdealers.co.za: a collection link (for example /collections/all) or a product link (/products/<handle>). One per line.

## `availableOnly` (type: `boolean`):

On: skip books with no copy available. Skipped books are free.

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

On: the plain-text product description (no HTML). Off: the row keeps every other field.

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

Hard cap for the whole run, across all links. 0 = no cap.

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

Apify Proxy by default. Change it only if you know you need to.

## Actor input object example

```json
{
  "startUrls": [
    "https://www.bookdealers.co.za/collections/all"
  ],
  "availableOnly": false,
  "includeDescription": true,
  "maxItems": 50,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

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

No description

## `resultsCsv` (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": [
        "https://www.bookdealers.co.za/collections/all"
    ],
    "maxItems": 50,
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("scrapewise/bookdealers-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": ["https://www.bookdealers.co.za/collections/all"],
    "maxItems": 50,
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("scrapewise/bookdealers-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": [
    "https://www.bookdealers.co.za/collections/all"
  ],
  "maxItems": 50,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call scrapewise/bookdealers-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,scrapewise/bookdealers-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/Pqlq35a51z9iBIhAV/builds/47Dqlq85NUggcJ5Nj/openapi.json
