# Isbndb Book Scraper (`songd/isbndb-book-scraper`) Actor

The ISBNdb Book Scraper is a tool designed to extract book data from ISBNdb.com. It allows users to gather information such as title, author, publication date, publisher, and more, using ISBNs as input.

- **URL**: https://apify.com/songd/isbndb-book-scraper.md
- **Developed by:** [Singed](https://apify.com/songd) (community)
- **Categories:** Other
- **Stats:** 26 total users, 0 monthly users, 100.0% runs succeeded, 4 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/actors/running/actors-in-store.md#pay-per-usage

## 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

**README: Book Data Scraper**

**What does this Actor do?**

This Apify Actor is designed to scrape book data from the isbndb.com website. It allows you to search for books based on various criteria such as query, author, title, ISBN, language, edition and publication year. It then extracts key information about each book, including:

- **Title:** The title of the book.
- **Authors:** A list of the book's authors.
- **ISBN:** The book's ISBN (if available).
- **Language:** The language of the book.
- **Edition:** The edition of the book.
- **Published:** The publication date of the book.
- **Cover:** URL of the book's cover image.

The actor efficiently navigates through multiple pages of results, gathering data from each page and saving it as an output dataset.

**Why is this Actor useful?**

This Actor is useful for:

- **Researchers:** Quickly gathering book data for research purposes, such as bibliographic studies.
- **Bookstores:** Compiling lists of books with detailed information for inventory or competitive analysis.
- **Libraries:** Creating catalogs of books with relevant metadata.
- **Data enthusiasts:** Building datasets of book information for personal projects.
- **Anyone seeking book information:** It allows users to quickly get details on any book.

**How to get started with this Actor**

To use this Actor, you'll need the following input parameters:

- `query` (Required): The search term for books.
- `totalPages` (Required): The number of result pages to scrape.
- `column` (Optional): The column to search for (e.g., 'title', 'author').
- `edition` (Optional): Filter results by edition.
- `year` (Optional): Filter results by publication year.
- `language` (Optional): Filter results by language.

**Example Input**

```json
{
    "query": "The Lord of the Rings",
    "totalPages": 3,
    "column": "title",
    "language": "en",
}
```

**How to use the Actor**

1. **Create an Apify Account**: If you don't have one, sign up for free on the Apify platform.
2. **Create a new task**: Select the 'Create new' button and then select the actor you are using from the marketplace.
3. **Set the input:** Set the input parameters according to your needs.
4. **Run the Actor**: Click on the "Start" button, or on "Save & Run" to save your configuration and run it at the same time.
5. **View the Results**: Once the run is completed, you can view the extracted data in the "Dataset" tab. The data is available in JSON format.

**Input Parameters details**

- `query`: This is the main search term. The actor will perform the search using this term and return the books that match.
- `totalPages`: This parameter sets how many pages of results the actor will navigate. Each page usually has multiple book entries, so this determines the overall scope of the data to gather.
- `column`: This parameter specifies what aspect of the book the actor should use for the search. For example, searching by 'title' will return books that have the query in their title, searching by 'author' will return books that are written by the specified author.
- `edition`: If you are looking for a specific edition of the book, then this parameter can be used.
- `year`: This parameter allows filtering results to only return the books published in a certain year.
- `language`: You can filter results by specifying the language of the books you are looking for.

**Output**

The Actor outputs a dataset containing the scraped book information in JSON format. Each item in the dataset will be a JSON object representing a single book, with the following properties:

```json
    {
        "title": "The Fellowship of the Ring",
        "authors": ["J.R.R. Tolkien"],
        "isbn": "0618260262",
        "language": "English",
        "published": "2003-01-02",
        "edition": "2",
        "cover": "/images/book/m/0618260262.jpg"
    }
```

**Tips**

- For broader searches, start with a generic query and fewer filters.
- Adjust the `totalPages` parameter according to the number of results needed.
- Be patient with large amounts of data to be scraped. It might take a while to execute the scraping logic.

# Actor input Schema

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

The search term for books

## `column` (type: `string`):

The search column

## `edition` (type: `string`):

Specific edition to search for

## `year` (type: `integer`):

Specific year of publication

## `language` (type: `string`):

Language of the books

## `totalPages` (type: `integer`):

The maximum number of pages to scrape

## Actor input object example

```json
{
  "query": "windows internals",
  "totalPages": 10
}
```

# 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("songd/isbndb-book-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 = {}

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

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,songd/isbndb-book-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/ovgReWb3NR0PApB0N/builds/AARIE2Iv1KtcgbvN6/openapi.json
