{
  "openapi": "3.0.1",
  "info": {
    "title": "Open Library Books Search",
    "description": "Open Library book metadata scraper for catalog enrichment. Search books or look up ISBNs and Open Library IDs; export titles, authors, editions and source links as JSON.",
    "version": "1.0",
    "x-build-id": "q0DfabhdZF36HMGTN"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/grit-77~open-library-books/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-grit-77-open-library-books",
        "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/grit-77~open-library-books/runs": {
      "post": {
        "operationId": "runs-sync-grit-77-open-library-books",
        "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/grit-77~open-library-books/run-sync": {
      "post": {
        "operationId": "run-sync-grit-77-open-library-books",
        "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": {
          "query": {
            "title": "Search query",
            "maxLength": 2000,
            "type": "string",
            "description": "Open Library search text or field query, e.g. title:the hobbit or author:tolkien language:eng. Leave empty for direct lookups."
          },
          "isbns": {
            "title": "ISBN lookup list",
            "maxItems": 10000,
            "type": "array",
            "description": "ISBN-10 or ISBN-13 strings. Hyphens/spaces are removed, check digits validated, duplicates removed. Preserve leading zeros by using strings.",
            "items": {
              "type": "string"
            }
          },
          "workIds": {
            "title": "Work IDs",
            "maxItems": 10000,
            "type": "array",
            "description": "Open Library work IDs such as OL27482W or /works/OL27482W.",
            "items": {
              "type": "string"
            }
          },
          "editionIds": {
            "title": "Edition IDs",
            "maxItems": 10000,
            "type": "array",
            "description": "Open Library edition IDs such as OL10236414M or /books/OL10236414M.",
            "items": {
              "type": "string"
            }
          },
          "authorIds": {
            "title": "Author bibliographies",
            "maxItems": 10000,
            "type": "array",
            "description": "Author IDs such as OL26320A or /authors/OL26320A. Returns work rows from each author's bibliography; does not emit standalone author rows.",
            "items": {
              "type": "string"
            }
          },
          "maxItems": {
            "title": "Maximum output rows",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Global cap across all sources, including error rows. Nested editions are limited separately and do not add book events.",
            "default": 100
          },
          "includeWorkDetails": {
            "title": "Include work details",
            "type": "boolean",
            "description": "Fetch work descriptions, subjects and first publication dates. Edition-specific titles and ISBNs remain attached to their edition.",
            "default": true
          },
          "includeAuthors": {
            "title": "Include author profiles",
            "type": "boolean",
            "description": "Include published author names, biographies and dates. Author IDs remain available when disabled.",
            "default": true
          },
          "includeEditions": {
            "title": "Include edition sample",
            "type": "boolean",
            "description": "Fetch a bounded sample of editions for each work. They may be in different languages and do not inherit search filters. Adds requests but no separate event charge.",
            "default": false
          },
          "editionsLimit": {
            "title": "Editions per book",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Maximum nested editions per book when includeEditions is enabled. editionsTruncated indicates additional or unavailable editions.",
            "default": 5
          },
          "sort": {
            "title": "Search sort",
            "enum": [
              "relevance",
              "new",
              "old",
              "title",
              "editions",
              "rating"
            ],
            "type": "string",
            "description": "Ordering for query searches. Direct ID/ISBN lookups keep input order.",
            "default": "relevance"
          },
          "language": {
            "title": "Search language preference",
            "type": "string",
            "description": "Optional two-letter preference such as en or fr. This ranks results; to require a language use a query term such as language:eng.",
            "default": ""
          },
          "concurrency": {
            "title": "Concurrent requests",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "Maximum in-flight requests and book tasks. All request starts, including retries, remain globally spaced at least 1.05 seconds apart.",
            "default": 3
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}