{
  "openapi": "3.0.1",
  "info": {
    "title": "Amazon Kindle Scraper",
    "description": "Scrapes Amazon Kindle ebook listings including pricing, ratings, and metadata.",
    "version": "1.0",
    "x-build-id": "hcpmaEFtw3LNk3pXR"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/w3crawler~amazon-kindle-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-w3crawler-amazon-kindle-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/w3crawler~amazon-kindle-scraper/runs": {
      "post": {
        "operationId": "runs-sync-w3crawler-amazon-kindle-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/w3crawler~amazon-kindle-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-w3crawler-amazon-kindle-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": [
          "keyword"
        ],
        "properties": {
          "keyword": {
            "title": "Search Keyword",
            "minLength": 1,
            "type": "string",
            "description": "Book title, author, topic, or genre to search for."
          },
          "country": {
            "title": "Country",
            "enum": [
              "us",
              "uk",
              "gb",
              "de",
              "fr",
              "it",
              "in",
              "ca",
              "au",
              "es",
              "jp",
              "br"
            ],
            "type": "string",
            "description": "Amazon marketplace code used for the search domain.",
            "default": "us"
          },
          "locale": {
            "title": "Locale",
            "pattern": "^[A-Za-z]{2,3}(?:-[A-Za-z]{2,4})?$",
            "type": "string",
            "description": "BCP 47 locale used for the direct request Accept-Language header.",
            "default": "en-US"
          },
          "maxItems": {
            "title": "Max Items",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Maximum Kindle listing records to return. Diagnostic records do not count toward this limit.",
            "default": 40
          },
          "startPage": {
            "title": "Start Page",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "1-based Amazon search-results page to start from.",
            "default": 1
          },
          "maxPages": {
            "title": "Max Pages",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Maximum search-results pages to visit. Use 0 to derive a bounded limit from maxItems.",
            "default": 0
          },
          "sortBy": {
            "title": "Sort By",
            "enum": [
              "relevance",
              "rating",
              "newest",
              "priceLowToHigh",
              "priceHighToLow",
              "bestsellers",
              "relevanceblender",
              "relevancerank",
              "review-rank",
              "date-desc-rank",
              "price-asc-rank",
              "price-desc-rank",
              "exact-aware-popularity-rank"
            ],
            "type": "string",
            "description": "Amazon sort order for search results.",
            "default": "relevance"
          },
          "kindleUnlimitedOnly": {
            "title": "Kindle Unlimited Only",
            "type": "boolean",
            "description": "Keep only listings visibly marked as Kindle Unlimited eligible.",
            "default": false
          },
          "minRating": {
            "title": "Minimum Rating",
            "minimum": 0,
            "maximum": 5,
            "type": "number",
            "description": "Optional minimum star rating from 0 to 5. The result is also checked locally after extraction."
          },
          "dateRange": {
            "title": "Publication Date Filter",
            "enum": [
              "last30Days",
              "last90Days",
              "comingSoon"
            ],
            "type": "string",
            "description": "Optional Amazon publication-date refinement."
          },
          "minPrice": {
            "title": "Minimum Price",
            "minimum": 0,
            "type": "number",
            "description": "Optional minimum displayed Kindle price in the selected marketplace currency."
          },
          "maxPrice": {
            "title": "Maximum Price",
            "minimum": 0,
            "type": "number",
            "description": "Optional maximum displayed Kindle price in the selected marketplace currency."
          },
          "excludeSponsored": {
            "title": "Exclude Sponsored",
            "type": "boolean",
            "description": "Exclude result cards that Amazon marks as sponsored.",
            "default": false
          },
          "includeDetails": {
            "title": "Include Detail Pages",
            "type": "boolean",
            "description": "Open public Kindle product pages for optional metadata such as description, publisher, language, and ISBN.",
            "default": false
          },
          "maxDetailItems": {
            "title": "Max Detail Items",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Maximum listing records for which public detail pages are attempted.",
            "default": 10
          },
          "includeMedia": {
            "title": "Include Media",
            "type": "boolean",
            "description": "Include cover image URLs and responsive image candidates.",
            "default": true
          },
          "dedupeBy": {
            "title": "Deduplicate By",
            "enum": [
              "asin",
              "title",
              "none"
            ],
            "type": "string",
            "description": "Duplicate handling within and across paginated result pages.",
            "default": "asin"
          },
          "requestDelayMs": {
            "title": "Request Delay",
            "minimum": 0,
            "maximum": 60000,
            "type": "integer",
            "description": "Delay between serialized direct search requests and detail-page requests.",
            "default": 1000
          },
          "pageRenderWaitMs": {
            "title": "Page Render Wait",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Compatibility field retained for older inputs; ignored by the direct HTML runner.",
            "default": 1500
          },
          "maxConcurrency": {
            "title": "Max Concurrency",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "Compatibility field retained for older inputs; requests are always serialized.",
            "default": 1
          },
          "maxRequestRetries": {
            "title": "Max Request Retries",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Compatibility field retained for older inputs; the direct runner performs no automatic retries.",
            "default": 3
          },
          "requestTimeoutSecs": {
            "title": "Request Timeout",
            "minimum": 30,
            "maximum": 600,
            "type": "integer",
            "description": "Maximum direct HTTP request time in seconds.",
            "default": 180
          },
          "navigationTimeoutSecs": {
            "title": "Navigation Timeout",
            "minimum": 15,
            "maximum": 300,
            "type": "integer",
            "description": "Compatibility timeout alias used when the direct request timeout is absent.",
            "default": 90
          },
          "proxyConfiguration": {
            "title": "Proxy Configuration",
            "type": "object",
            "description": "Compatibility field retained for older inputs; this actor never configures or uses a proxy."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}