Skip to content

Latest commit

 

History

History
90 lines (68 loc) · 1.7 KB

File metadata and controls

90 lines (68 loc) · 1.7 KB

Apify CLI — Open Library Scraper

Run the Open Library Scraper from your terminal. These snippets call the hosted Actor — there is no scraper source code to install.

Install & log in

npm install -g apify-cli
apify login   # paste your API token from Apify Console → Settings → Integrations

Trending / popular books (empty input)

apify call logiover/openlibrary-scraper

Full-text search

apify call logiover/openlibrary-scraper --input '{
  "mode": "search",
  "query": "science fiction",
  "maxResults": 500
}'

Browse a subject / genre

apify call logiover/openlibrary-scraper --input '{
  "mode": "subject",
  "subject": "mystery",
  "maxResults": 300
}'

Author search

apify call logiover/openlibrary-scraper --input '{
  "mode": "author",
  "query": "Isaac Asimov",
  "maxResults": 50
}'

Book detail by work ID

apify call logiover/openlibrary-scraper --input '{
  "mode": "bookDetail",
  "workIds": ["OL27258W", "OL45804W", "OL262238W"]
}'

Search by ISBN

apify call logiover/openlibrary-scraper --input '{
  "mode": "search",
  "query": "isbn:9780345391803"
}'

Use an input file

cat > input.json <<'JSON'
{
  "mode": "search",
  "query": "fantasy",
  "author": "tolkien",
  "sort": "rating",
  "maxResults": 1000
}
JSON

apify call logiover/openlibrary-scraper --input-file input.json

Export a dataset to CSV via the API

curl "https://api.apify.com/v2/datasets/DATASET_ID/items?format=csv&token=YOUR_TOKEN" -o books.csv

📄 Documentation only. ▶️ Run the Actor: https://apify.com/logiover/openlibrary-scraper