# Open Library Books Scraper (`parseforge/open-library-scraper`) Actor

Scrapes Open Library books by search query, subject, author, list, or direct URL. Returns each book as a flat row with title, author, subjects, and metadata.

- **URL**: https://apify.com/parseforge/open-library-scraper.md
- **Developed by:** [ParseForge](https://apify.com/parseforge) (community)
- **Categories:** Education, Automation, E-commerce
- **Features:** Limited permissions
- **Stats:** 31 total users, 2 monthly users, 100.0% runs succeeded, 2 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

from $8.00 / 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

[![ParseForge](https://raw.githubusercontent.com/ParseForge/apify-assets/main/banner-v4.webp)](https://apify.com/parseforge?fpr=vmoqkp)

### Open Library Books Scraper

**Scrape Open Library books by search term, subject, author, or direct URL, up to a million per run.** Every book comes with its title, author, subjects, and full metadata. No API key or login. Export to CSV, JSON, Excel, or XML.

Open Library's official API needs a key and rate-limits you. This reads the public book catalog directly, filtered by search query, type, or ebook availability, and returns each match in one fixed schema.

| Who uses it | What they scrape Open Library for |
|---|---|
| Market researchers | Which books and subjects are trending in a niche |
| Librarians | Build a local catalog of books matching a subject |
| Data analysts | Enrich a dataset with book metadata |
| Book app developers | Seed a recommendation engine with book data |

### What it does

This Actor collects Open Library books by search query, subject, author, list, or direct URL, and returns each one as a flat row.

- 🔍 **Search filters:** query, type (books, authors, subjects, lists), and ebook-only toggle.
- 🔗 **Direct URL:** paste any Open Library search URL and scrape the results.
- 📊 **Flat rows:** each book is one row with title, author, subjects, and more.
- 📦 **Bulk export:** up to 1,000,000 books per run for paid users.

Results export to CSV, JSON, Excel, or XML, or straight from the API.

### What you can do with Open Library data

**📚 Build a subject catalog.**

A librarian runs the Actor with searchType=subjects and a query like 'science fiction' to collect all matching books for a local database.

**📈 Track publishing trends.**

A market researcher scrapes books by a search term weekly to see which new titles and subjects are appearing.

**🔎 Enrich a book list.**

A data analyst pastes a list of Open Library URLs to fetch full metadata for each book in one run.

**📱 Seed a book app.**

A developer scrapes popular subjects to populate a recommendation engine with real book data.

### Why choose this scraper

|  | What you get |
|---|---|
| **No API key** | Scrape without registering an app or handling rate limits |
| **Flexible input** | Search by term, subject, author, or paste a URL |
| **Complete metadata** | Title, author, subjects, and other fields in one row |
| **Scalable** | Up to a million books per run for paid users |

### How it compares

No other Store actor targets Open Library the same way, so the honest comparison is with the alternatives teams actually weigh.

| | Open Library Books Scraper | Build it in-house | By hand |
|---|---|---|---|
| Setup | Run it now, zero config | Days of engineering | None, but hours per pull |
| When Open Library changes | Maintained for you | You fix it | You re-learn the page |
| Proxies, retries, anti-bot | Built in | Your problem | Browser only |
| Output | Fixed JSON schema, CSV/Excel export | Whatever you build | Copy-paste |
| Cost | Pay per result | Engineering time | Analyst hours |

### Configure the run

Drive the Actor from a search query, a search type, an ebook-only flag, or a direct Open Library URL, and filters run as each book is read so only matches reach your dataset. The Input tab lists every parameter.

A first run with the defaults:

```json
{
  "maxItems": 10,
  "searchQuery": "Space",
  "searchType": "books",
  "ebooksOnly": false
}
```

A larger pull:

```json
{
  "maxItems": 200,
  "searchQuery": "Space",
  "searchType": "books",
  "ebooksOnly": false
}
```

### Pricing

Pay-per-result: **$0.012 per result** collected. You pay only for the results written to your dataset.

| Results collected | Approximate cost |
|---|---|
| 100 results | $1.20 |
| 1,000 results | $12.00 |
| 10,000 results | $120.00 |

New Apify accounts start with $5 in free credit.

### Free users

Free-plan runs return up to 10 results as a preview. [Upgrade your Apify plan](https://console.apify.com/sign-up?fpr=vmoqkp) to collect up to 1,000,000 results per run.

### Run it

1. [Create a free Apify account with $5 in credit](https://console.apify.com/sign-up?fpr=vmoqkp).
2. Open the [Open Library Books Scraper](https://apify.com/parseforge/open-library-scraper?fpr=vmoqkp).
3. Set your inputs and any filters, then click **Start**.
4. Export the results as CSV, Excel, JSON, or XML from the **Dataset** tab.

Run it programmatically through the [Apify API](https://docs.apify.com/api/v2) (`run-sync-get-dataset-items`) or the [ApifyClient](https://docs.apify.com/api/client/js) for JavaScript and Python.

### Use with AI agents (MCP)

Give an AI agent live access to Open Library through the Model Context Protocol. Add the Actor to Claude, Cursor, or any MCP client:

```bash
claude mcp add --transport http apify "https://mcp.apify.com?tools=parseforge/open-library-scraper"
```

Then prompt it in plain language to run the scraper and read back the results.

### Troubleshooting

**Why am I getting no results?**

Check that your searchQuery is not empty and that you have not provided both startUrl and API filters. They are mutually exclusive.

**Why is my run limited to 100 books?**

Free users are limited to 100 books per run. Upgrade to a paid plan to increase the limit up to 1,000,000.

**Why is ebooksOnly not working?**

ebooksOnly only works when searchType is 'books' and you are using API filters, not a startUrl.

**Why did my run fail with a URL error?**

Make sure the startUrl is a valid Open Library URL, such as https://openlibrary.org/search?q=your+query.

**Can I scrape authors instead of books?**

Yes. Set searchType to 'authors' and provide a searchQuery. The Actor will return author records instead of book records.

### FAQ

| Question | Answer |
|---|---|
| Do I need an API key? | No. The Actor reads the public Open Library website directly, so no registration or key is required. |
| What is the maximum number of books I can scrape? | Free users are limited to 100 books per run. Paid users can scrape up to 1,000,000 books per run. |
| Can I scrape by subject or author? | Yes. Set searchType to 'subjects' or 'authors' and provide a searchQuery. You can also paste a direct URL. |
| Can I filter to only ebooks? | Yes. Set ebooksOnly to true. This only works when searchType is 'books' and you are using API filters, not a startUrl. |
| What data does each book row include? | Each row includes the book's title, author, subjects, and other metadata fields as returned by Open Library. |
| Can I export the results? | Yes. You can export the dataset to CSV, JSON, Excel, or XML. |
| Is this legal? | Open Library provides public data. You should review their terms of service and respect robots.txt for your use case. |
| Can I scrape a list of books? | Yes. Set searchType to 'lists' and provide a searchQuery, or paste a direct URL to a list. |
| What if I get no results? | Check your search query and filters. Make sure you are not mixing startUrl with API filters, as they are mutually exclusive. |
| Can I run this on a schedule? | Yes. You can schedule the Actor to run daily, weekly, or at any interval to keep your data fresh. |

### Related actors

Browse the full [ParseForge collection](https://apify.com/parseforge?fpr=vmoqkp) for more scrapers.

🆘 **Need help?** Email parseforge@protonmail.com with your run ID, your input, and what you expected.

⚠️ **Disclaimer.** This Actor is unofficial and is not affiliated with, endorsed by, or sponsored by Internet Archive. It collects only publicly available data. You are responsible for using the collected data in compliance with the source's terms of service and applicable data-protection laws, including GDPR, CCPA, and PIPL. Do not use it to collect personal data unlawfully.

# Actor input Schema

## `startUrl` (type: `string`):

Direct URL to scrape (mutually exclusive with API filters). Example: https://openlibrary.org/search?q=A+vocabulary\&mode=everything

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

Free users: Limited to 100. Paid users: Optional, max 1,000,000. Leave empty for unlimited (paid users only).

## `searchQuery` (type: `string`):

Search query string (required if startUrl is not provided). Example: 'Space'

## `searchType` (type: `string`):

Type of search to perform. Choose from: Books, Authors, Search Inside, Subjects, or Lists. Only works when using API filters (not with startUrl).

## `ebooksOnly` (type: `boolean`):

Filter to show only ebooks (only works when searchType is 'books' and using API filters, not with startUrl).

## Actor input object example

```json
{
  "maxItems": 10,
  "searchQuery": "Space",
  "searchType": "books",
  "ebooksOnly": false
}
```

# Actor output Schema

## `extractedData` (type: `string`):

Complete dataset with all extracted Open Library information including books, authors, subjects, and bibliographic metadata

## `overview` (type: `string`):

Overview view of extracted library data with key fields displayed in a table format

# 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 = {
    "maxItems": 10,
    "searchQuery": "Space",
    "searchType": "books",
    "ebooksOnly": false
};

// Run the Actor and wait for it to finish
const run = await client.actor("parseforge/open-library-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 = {
    "maxItems": 10,
    "searchQuery": "Space",
    "searchType": "books",
    "ebooksOnly": False,
}

# Run the Actor and wait for it to finish
run = client.actor("parseforge/open-library-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 '{
  "maxItems": 10,
  "searchQuery": "Space",
  "searchType": "books",
  "ebooksOnly": false
}' |
apify call parseforge/open-library-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,parseforge/open-library-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/q0iCPpRF9YlYZkxoV/builds/LMYt2y9Z3iBQNhnhT/openapi.json
