# DOAB Open Access Books Scraper (`muhammadafzal/doab-open-access-books-scraper`) Actor

Scrape public scholarly open-access book metadata from the Directory of Open Access Books REST catalog.

- **URL**: https://apify.com/muhammadafzal/doab-open-access-books-scraper.md
- **Developed by:** [Muhammad Afzal](https://apify.com/muhammadafzal) (community)
- **Categories:** AI, Automation
- **Stats:** 2 total users, 1 monthly users, 33.3% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 book scrapeds

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/actors/running/actors-in-store.md#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

## DOAB Open Access Books Scraper

Scrape public scholarly open-access book metadata from the Directory of Open Access Books (DOAB) REST catalog. Use it for research discovery, library collection analysis, open-access bibliographies, and academic book lead lists.

### What it extracts

| Field | Description |
|---|---|
| `title`, `subtitle` | Book title metadata |
| `authors` | Authors and editors |
| `publisher`, `publicationYear` | Publication metadata |
| `description`, `subjects`, `languages` | Discovery metadata |
| `isbn`, `doi`, `handle` | Persistent identifiers |
| `license`, `fullTextUrl` | Rights and public access link when indexed |
| `recordUrl` | DOAB record URL |

### Input

Use `query` for full-text or fielded DOAB syntax, such as `history AND migration` or `dc.title:"open science"`. Use `handle` for one exact record. `maxResults`, `maxPages`, and `pageSize` bound the run. The Console prefill requests 5 books from one page so Apify's automated quality test remains inexpensive and comfortably inside five minutes; API defaults remain 25 books and 3 pages.

### Output

One normalized book object is written per unique result to the default dataset. Run diagnostics are written to `SUMMARY`, including empty results, API failures, pages completed, warnings, and delivered count.

```json
{
  "title": "Open Science",
  "authors": ["Jane Doe"],
  "publisher": "Open Press",
  "publicationYear": 2024,
  "subjects": ["Research"],
  "handle": "20.500.12854/123",
  "recordUrl": "https://directory.doabooks.org/handle/123",
  "source": "DOAB"
}
```

### Pricing

The primary event is `book-scraped` at $0.002 per unique book record, plus the configured $0.001 actor-start event. A one-result run therefore costs up to $0.003 in event charges before any platform usage or optional account charges.

### Reliability and scope

The actor uses DOAB's public REST search endpoint and hydrates records through bounded metadata requests instead of asking the catalog to expand a large search response. It does not access restricted content, bypass challenges, or download book files. DOAB metadata and links depend on what publishers and repositories have indexed. A zero-result run is reported as empty; HTTP or transport failures are reported in `SUMMARY` and as a failed run.

### Legal note

Use the metadata and linked resources according to DOAB, publisher, repository, and applicable license terms. This actor indexes public catalog metadata; it does not grant rights to copyrighted content.

### Use cases

- Supply structured public data to AI, RAG, enrichment, or evaluation workflows.
- Schedule repeatable collection and export results to downstream workflows.
- Run a one-off research job and export the structured result as JSON, CSV, Excel, XML, or RSS from Apify.
- Schedule the same input to monitor changes over time and send completed datasets to a webhook or integration.
- Feed schema-shaped records into a database, spreadsheet, BI tool, or AI workflow with the source URL retained for verification.

### Run DOAB Open Access Books Scraper with the Apify API

```javascript
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('muhammadafzal/doab-open-access-books-scraper').call({
  "query": "open access",
  "handle": "",
  "maxResults": 25,
  "maxPages": 3,
  "pageSize": 25,
  "includeMetadata": true
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

You can also run the Actor from Apify Console, schedules, webhooks, the REST API, Make, Zapier, n8n, or the hosted Apify MCP server.

### Support

When reporting a problem, include the **Actor run ID**, a redacted input, the expected result, and a small public example URL when applicable. Do not post API tokens, cookies, credentials, or personal data in an issue.

### Frequently asked questions

#### Can I schedule DOAB Open Access Books Scraper?

Yes. Use an Apify schedule to run the same saved input at a chosen interval, then connect a webhook or integration to process the dataset when the run finishes.

#### How should I test a new input?

Begin with the prefilled example or a small limit. Confirm that the output fields, source coverage, runtime, and live charges match your workflow before increasing the scope.

#### How do I export the results?

Open the run's default dataset in Apify Console and export JSON, CSV, Excel, XML, or RSS. Applications can retrieve the same records through the Apify API client or REST dataset endpoint.

#### Can an AI agent call this Actor?

Yes. Add `muhammadafzal/doab-open-access-books-scraper` through the hosted Apify MCP server or call it through the API. The Actor's input and dataset schemas help agents construct valid requests and interpret returned records.

### Recommended workflow

1. **Define the smallest useful scope.** Choose a representative public URL, query, identifier, or filter and keep the first result limit low.
2. **Run and inspect.** Check the run log, dataset item count, field coverage, source URLs, and live event or usage charges.
3. **Validate downstream assumptions.** Confirm nullable fields, deduplication keys, timestamps, and any locale-specific formats before importing records into another system.
4. **Scale gradually.** Increase limits or scheduling frequency only after the small run behaves as expected. Use Apify's maximum-cost and timeout controls to bound large jobs.
5. **Monitor changes.** Keep a small known-good input as a canary. If the source layout or API changes, compare the new dataset with a previously validated run and report the run ID when requesting support.

For recurring workflows, store the exact Actor input with your pipeline configuration. This makes runs reproducible and helps distinguish a source-data change from an input change.

# Actor input Schema

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

Use this field for a DOAB full-text or fielded query. Example: `dc.title:"open science"` or `history AND migration`. Leave blank only when using handle.

## `handle` (type: `string`):

Use this field to fetch one exact DOAB record by handle, for example `20.500.12854/12345`. Do not combine with a broad query.

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

Maximum unique book records to return and bill for. Example: 25. Use 1 for an inexpensive canary.

## `maxPages` (type: `integer`):

Maximum result pages to request. Pagination is bounded together with maxResults; example: 3.

## `pageSize` (type: `integer`):

Number of DOAB records requested per API page. Example: 25. Larger pages reduce requests but increase response size.

## `includeMetadata` (type: `boolean`):

Use DOAB's metadata expansion to return authors, publishers, subjects, identifiers, languages, licenses, and links when available.

## Actor input object example

```json
{
  "query": "open access",
  "handle": "",
  "maxResults": 5,
  "maxPages": 1,
  "pageSize": 5,
  "includeMetadata": true
}
```

# Actor output Schema

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

No description

## `summary` (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 = {
    "query": "open access",
    "handle": "",
    "maxResults": 5,
    "maxPages": 1,
    "pageSize": 5,
    "includeMetadata": true
};

// Run the Actor and wait for it to finish
const run = await client.actor("muhammadafzal/doab-open-access-books-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 = {
    "query": "open access",
    "handle": "",
    "maxResults": 5,
    "maxPages": 1,
    "pageSize": 5,
    "includeMetadata": True,
}

# Run the Actor and wait for it to finish
run = client.actor("muhammadafzal/doab-open-access-books-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 '{
  "query": "open access",
  "handle": "",
  "maxResults": 5,
  "maxPages": 1,
  "pageSize": 5,
  "includeMetadata": true
}' |
apify call muhammadafzal/doab-open-access-books-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,muhammadafzal/doab-open-access-books-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/zDJ52eiKAWXXcwdzk/builds/oe1eBPArrNEZOL7nd/openapi.json
