{
  "openapi": "3.0.1",
  "info": {
    "title": "Amazon Books Intelligence: Authors, Series & Kindle Deals",
    "description": "Read Amazon book search, detail pages, complete author catalogues, series reading order and Kindle/book deals across 21 marketplaces.",
    "version": "1.0",
    "x-build-id": "vapO20YerJ3EhCrWa"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/xyrelith-data~amazon-books-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-xyrelith-data-amazon-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/xyrelith-data~amazon-books-scraper/runs": {
      "post": {
        "operationId": "runs-sync-xyrelith-data-amazon-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/xyrelith-data~amazon-books-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-xyrelith-data-amazon-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",
        "required": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "Mode",
            "enum": [
              "search",
              "details",
              "author",
              "series",
              "deals"
            ],
            "type": "string",
            "description": "What to collect.",
            "default": "search"
          },
          "searchQueries": {
            "title": "Search queries (mode=search)",
            "type": "array",
            "description": "One or more Amazon Books search queries, e.g. `harry potter`, `brandon sanderson`, `cozy fantasy`.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "asins": {
            "title": "ASINs (mode=details / series)",
            "type": "array",
            "description": "Amazon ASINs. In details mode each ASIN is a book; in series mode each ASIN is a series page ASIN. Bare ASINs or full Amazon URLs are accepted.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "bookUrls": {
            "title": "Book or series URLs (mode=details / series)",
            "type": "array",
            "description": "Full Amazon book or series URLs. ASINs are extracted automatically.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "authorIds": {
            "title": "Author IDs or store URLs (mode=author)",
            "type": "array",
            "description": "Amazon author IDs (e.g. `B001IGFHW6`) or author-store URLs such as `https://www.amazon.com/stores/author/B001IGFHW6`.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "marketplace": {
            "title": "Amazon marketplace",
            "enum": [
              "amazon.com",
              "amazon.co.uk",
              "amazon.de",
              "amazon.fr",
              "amazon.it",
              "amazon.es",
              "amazon.ca",
              "amazon.com.au",
              "amazon.co.jp",
              "amazon.in",
              "amazon.com.br",
              "amazon.com.mx",
              "amazon.nl",
              "amazon.com.be",
              "amazon.se",
              "amazon.pl",
              "amazon.com.tr",
              "amazon.ae",
              "amazon.sa",
              "amazon.eg",
              "amazon.sg"
            ],
            "type": "string",
            "description": "Amazon site to read. Prices and availability follow the site plus the delivery setting.",
            "default": "amazon.com"
          },
          "currency": {
            "title": "Display currency",
            "enum": [
              "auto",
              "USD",
              "GBP",
              "EUR",
              "CAD",
              "AUD",
              "JPY",
              "INR",
              "BRL",
              "MXN",
              "SEK",
              "PLN",
              "TRY",
              "AED",
              "SAR",
              "EGP",
              "SGD"
            ],
            "type": "string",
            "description": "Currency Amazon shows on the page. `Auto` uses the marketplace currency.",
            "default": "auto"
          },
          "deliveryCountry": {
            "title": "Delivery country",
            "enum": [
              "auto",
              "US",
              "GB",
              "DE",
              "FR",
              "IT",
              "ES",
              "CA",
              "AU",
              "JP",
              "IN",
              "BR",
              "MX",
              "NL",
              "BE",
              "SE",
              "PL",
              "TR",
              "AE",
              "SA",
              "EG",
              "SG"
            ],
            "type": "string",
            "description": "Ship-to country used for prices and availability. `Auto` leaves Amazon's detected location unchanged.",
            "default": "auto"
          },
          "deliveryPostalCode": {
            "title": "Delivery postal code",
            "type": "string",
            "description": "Optional ZIP/postal code for the delivery country. Leave empty to use a representative local code."
          },
          "searchSort": {
            "title": "Search sort (mode=search)",
            "enum": [
              "relevance",
              "price-asc",
              "price-desc",
              "review",
              "newest",
              "bestseller"
            ],
            "type": "string",
            "description": "Result order for keyword search.",
            "default": "relevance"
          },
          "authorSort": {
            "title": "Author sort (mode=author)",
            "enum": [
              "popularity",
              "price-asc",
              "price-desc",
              "review",
              "newest",
              "most-reviews"
            ],
            "type": "string",
            "description": "Catalogue order for author mode.",
            "default": "popularity"
          },
          "format": {
            "title": "Book format",
            "enum": [
              "all",
              "kindle",
              "paperback",
              "hardcover",
              "audiobook",
              "mass-market",
              "board-book"
            ],
            "type": "string",
            "description": "Filter by binding. Search mode uses the Kindle/Audible storefronts for those formats and filters the rest on the result card.",
            "default": "all"
          },
          "authorLanguage": {
            "title": "Book language (mode=author)",
            "enum": [
              "All Languages",
              "Catalan",
              "Chinese (Simplified)",
              "English",
              "French",
              "German",
              "Greek",
              "Italian",
              "Japanese",
              "Portuguese",
              "Spanish"
            ],
            "type": "string",
            "description": "Language filter on the author catalogue. Only the languages Amazon exposes for author pages are listed.",
            "default": "All Languages"
          },
          "minPrice": {
            "title": "Minimum price",
            "minimum": 0,
            "maximum": 1000000,
            "type": "number",
            "description": "Drop records priced below this amount."
          },
          "maxPrice": {
            "title": "Maximum price",
            "minimum": 0,
            "maximum": 1000000,
            "type": "number",
            "description": "Drop records priced above this amount."
          },
          "minRating": {
            "title": "Minimum rating",
            "minimum": 1,
            "maximum": 5,
            "type": "number",
            "description": "Drop records rated below this value (1-5)."
          },
          "maxRating": {
            "title": "Maximum rating",
            "minimum": 1,
            "maximum": 5,
            "type": "number",
            "description": "Drop records rated above this value (1-5)."
          },
          "minDiscountPercent": {
            "title": "Minimum discount % (mode=deals)",
            "minimum": 0,
            "maximum": 100,
            "type": "number",
            "description": "Keep only deals at or above this discount."
          },
          "publishedAfter": {
            "title": "Published after",
            "type": "string",
            "description": "ISO date `YYYY-MM-DD`. Records without a publication date pass through."
          },
          "publishedBefore": {
            "title": "Published before",
            "type": "string",
            "description": "ISO date `YYYY-MM-DD`. Records without a publication date pass through."
          },
          "titleContains": {
            "title": "Title contains",
            "type": "string",
            "description": "Case-insensitive substring filter on the book title."
          },
          "excludeKeywords": {
            "title": "Exclude title keywords",
            "type": "string",
            "description": "Comma-separated words; records whose title contains any of them are dropped."
          },
          "includeSponsored": {
            "title": "Include sponsored results",
            "type": "boolean",
            "description": "Keep Amazon sponsored search placements in search mode.",
            "default": true
          },
          "includeDetails": {
            "title": "Enrich with detail pages",
            "type": "boolean",
            "description": "Fetch each book's detail page for publisher, page count, ISBN, BSR and description. Slower and uses more requests.",
            "default": false
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Hard cap on emitted records.",
            "default": 50
          },
          "maxPages": {
            "title": "Max pages",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Maximum result/catalogue pages to read per query or author.",
            "default": 10
          },
          "proxyConfiguration": {
            "title": "Proxy configuration (optional)",
            "type": "object",
            "description": "Optional Apify Proxy override. The actor works without a proxy and selects its own retry strategy automatically."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}