{
  "openapi": "3.0.1",
  "info": {
    "title": "Amazon KDP Niche Analyzer",
    "description": "Amazon KDP niche finder and research tool: the top books for each keyword with real Best Sellers Rank (BSR), reviews, price, publisher, indie or not, plus estimated monthly sales and an opportunity score (formulas stated). Paperback and Kindle. Export to CSV, JSON or API. No login.",
    "version": "1.0",
    "x-build-id": "JiNG45RW6B04JrI4p"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/steadyscrape~kdp-niche-analyzer/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-steadyscrape-kdp-niche-analyzer",
        "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/steadyscrape~kdp-niche-analyzer/runs": {
      "post": {
        "operationId": "runs-sync-steadyscrape-kdp-niche-analyzer",
        "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/steadyscrape~kdp-niche-analyzer/run-sync": {
      "post": {
        "operationId": "run-sync-steadyscrape-kdp-niche-analyzer",
        "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": [
          "keywords"
        ],
        "properties": {
          "keywords": {
            "title": "Niche keywords",
            "type": "array",
            "description": "One niche per line, as a buyer would type it in Amazon's search box: <code>gratitude journal</code>, <code>coloring book for adults</code>, <code>password log book</code>. Each keyword is searched on Amazon.com in every department you pick below.",
            "items": {
              "type": "string"
            }
          },
          "stores": {
            "title": "Departments",
            "type": "array",
            "description": "<code>books</code> = Amazon's Books department (paperbacks, hardcovers, spiral-bound and low-content books); <code>kindle</code> = the Kindle Store (e-books, with the share of Kindle Unlimited titles). Pick both to compare print and e-book for the same keyword.",
            "items": {
              "type": "string",
              "enum": [
                "books",
                "kindle"
              ],
              "enumTitles": [
                "Books (print)",
                "Kindle Store (e-books)"
              ]
            },
            "default": [
              "books"
            ]
          },
          "booksPerNiche": {
            "title": "Books per niche",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "How many top organic results to analyze per keyword and department (16 per results page; up to 100). The niche summary is computed from these books.",
            "default": 16
          },
          "includeDetails": {
            "title": "Open each book's page (Best Sellers Rank, publisher, pages)",
            "type": "boolean",
            "description": "Reads each book's own page for its Best Sellers Rank, category ranks, publisher, independently published or not, publication date, page count, dimensions and ISBN, which the sales estimate and the opportunity score need. Off: only what the search results show, at the lower <code>book</code> price.",
            "default": true
          },
          "includeSuggestions": {
            "title": "List Amazon's search suggestions",
            "type": "boolean",
            "description": "Adds the phrases Amazon's search box suggests for each keyword (long-tail ideas) to its niche row. Free.",
            "default": true
          },
          "analyzeSuggestions": {
            "title": "Analyze the suggestions as niches too",
            "type": "boolean",
            "description": "Each suggestion of your keywords becomes a niche of its own and is analyzed and charged like one, up to <b>Max niches</b>.",
            "default": false
          },
          "maxSuggestions": {
            "title": "Max suggestions per keyword",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many of Amazon's suggestions to keep (and analyze, when that is on) per keyword.",
            "default": 5
          },
          "maxNiches": {
            "title": "Max niches",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "A hard cap on niches analyzed in the run, suggestions included. The run also stops before a niche your spending limit could not pay for, without sending its requests.",
            "default": 50
          },
          "includeSponsored": {
            "title": "Include sponsored results",
            "type": "boolean",
            "description": "Off (default): sponsored placements are skipped and counted, so the niche is measured on organic results. On: they are analyzed (and charged) like the others, flagged <code>sponsored</code>.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}