{
  "openapi": "3.0.1",
  "info": {
    "title": "Open Library Scraper: Books, Ratings & ISBN Data",
    "description": "Scrape Open Library books: search by title, author, subject or year with ratings and want-to-read counts, look up ISBNs for publisher and pages, and pull work details with rating breakdowns. Export CSV, Excel, JSON, XML. No login or API key. From $0.013 per book.",
    "version": "0.1",
    "x-build-id": "xGvTWa4mZc2fPuZLd"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/recordsdata~open-library-books-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-recordsdata-open-library-books-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/recordsdata~open-library-books-scraper/runs": {
      "post": {
        "operationId": "runs-sync-recordsdata-open-library-books-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/recordsdata~open-library-books-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-recordsdata-open-library-books-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "searchQuery": {
            "title": "Book title or keywords",
            "type": "string",
            "description": "At least 3 characters. Example: dune, or science fiction classics. Leave empty to browse with the filters only, or to use only the lookups below.",
            "default": ""
          },
          "author": {
            "title": "Author name (optional)",
            "type": "string",
            "description": "Example: Frank Herbert. Combine with a search, subject or year range.",
            "default": ""
          },
          "subject": {
            "title": "Subject or genre (optional)",
            "type": "string",
            "description": "Example: fantasy or biography.",
            "default": ""
          },
          "language": {
            "title": "Language (optional)",
            "type": "string",
            "description": "3-letter Open Library code or English name. Example: eng, or several separated by commas: eng, fre. Codes: eng, fre, ger, spa, por, ita, rus, jpn, chi, lat.",
            "default": ""
          },
          "publisher": {
            "title": "Publisher (optional)",
            "type": "string",
            "description": "Example: Penguin or Ace Books.",
            "default": ""
          },
          "yearFrom": {
            "title": "First published from year (optional)",
            "minimum": 1000,
            "type": "integer",
            "description": "Example: 1960."
          },
          "yearTo": {
            "title": "First published up to year (optional)",
            "minimum": 1000,
            "type": "integer",
            "description": "Example: 1980."
          },
          "minRatingsCount": {
            "title": "Minimum number of ratings (count, optional)",
            "minimum": 1,
            "type": "integer",
            "description": "Skip books nobody rated. Example: 50."
          },
          "ebooksOnly": {
            "title": "Only books with a readable ebook",
            "type": "boolean",
            "description": "Keep only books with a full-text ebook on Open Library or the Internet Archive (free to read or borrowable).",
            "default": false
          },
          "ebookAccess": {
            "title": "Ebook access type",
            "enum": [
              "any",
              "public",
              "borrowable",
              "printdisabled",
              "no_ebook"
            ],
            "type": "string",
            "description": "Public = free to read. Borrowable = lending library. Print-disabled = for print-disabled readers. No ebook = no digital copy. Any = no filter.",
            "default": "any"
          },
          "sortBy": {
            "title": "Sort books by",
            "enum": [
              "relevance",
              "rating desc",
              "new",
              "old",
              "editions",
              "want_to_read",
              "trending"
            ],
            "type": "string",
            "description": "Relevance is the default. Other options: best rated, newest, oldest, most editions, most wanted-to-read, trending.",
            "default": "relevance"
          },
          "includeWorkDetails": {
            "title": "Add description and links to book rows",
            "type": "boolean",
            "description": "Adds the work description, links and first publish date. Adds one request per book row, so the run is slower. Off by default.",
            "default": false
          },
          "coverSize": {
            "title": "Cover image size",
            "enum": [
              "S",
              "M",
              "L"
            ],
            "type": "string",
            "description": "Size of the cover image link: Small, Medium (default) or Large.",
            "default": "M"
          },
          "isbns": {
            "title": "ISBNs",
            "type": "array",
            "description": "ISBN-10 or ISBN-13, one per line. Example: 9780441172719. Each valid ISBN returns one edition row with publisher, date, pages and format.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "workIds": {
            "title": "Work IDs",
            "type": "array",
            "description": "Example: OL893414W or the full work URL. Each returns one work row with description, subjects and the 1-5 star breakdown.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "authorSearch": {
            "title": "Find authors by name",
            "type": "string",
            "description": "At least 3 characters. Example: Frank Herbert. One row per author with birth and death date, number of works and top subjects. Wrap a full name in double quotes for an exact phrase.",
            "default": ""
          },
          "authorSortBy": {
            "title": "Sort authors by",
            "enum": [
              "relevance",
              "work_count desc",
              "name",
              "birth_date asc",
              "birth_date desc"
            ],
            "type": "string",
            "description": "Relevance (exact name first), most works, name A to Z, or birth date.",
            "default": "relevance"
          },
          "authorIds": {
            "title": "Author IDs",
            "type": "array",
            "description": "Example: OL79034A or the full author URL. Each returns one author row.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "includeAuthorDetails": {
            "title": "Add biography and links to author rows",
            "type": "boolean",
            "description": "Adds biography, external ids (Wikidata, VIAF, ISNI) and photo. Adds one request per author, so the run is slower. Off by default.",
            "default": false
          },
          "subjectNames": {
            "title": "Subjects",
            "type": "array",
            "description": "Example: science fiction, or place:london, person:sherlock_holmes, time:20th_century. One row per subject with number of works, ebooks, related subjects, top authors. Use Subject in the book search to list the books of a subject.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "maxItems": {
            "title": "Max results (rows)",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "Total rows over all searches and lookups. Free plan runs are capped at 10. Paid plans: up to 1,000,000. You are only charged for rows delivered.",
            "default": 10
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}