# Amazon KDP Niche Analyzer (`khadinakbar/amazon-kdp-niche-analyzer`) Actor

Analyze Amazon KDP niches by keyword: competing Kindle/paperback books with BSR, price, ratings, reviews, plus a transparent 0-100 opportunity score. 10 marketplaces. PPE. MCP-ready.

- **URL**: https://apify.com/khadinakbar/amazon-kdp-niche-analyzer.md
- **Developed by:** [Khadin Akbar](https://apify.com/khadinakbar) (community)
- **Categories:** E-commerce, AI, MCP servers
- **Stats:** 7 total users, 4 monthly users, 84.7% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 1,000 book analyzeds

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

### What does Amazon KDP Niche Analyzer do?

**Amazon KDP Niche Analyzer** turns a book niche keyword into a competition snapshot. For each keyword it searches the Amazon **Kindle Store** (or the **Books** department for paperbacks), returns one dataset row per competing book — title, author, price, star rating, ratings count, organic rank, **Best Sellers Rank (BSR)**, publisher, publish date, page count, and an independently-published flag — and then adds one **niche report** with a transparent 0–100 opportunity score.

It is built for self-publishers, KDP researchers, low-content book creators, and AI agents that need a structured "is this niche worth writing for?" answer in one call. It runs on Apify, so you get API access, scheduling, integrations, proxy rotation, and monitoring out of the box.

| Data you receive | Where it comes from |
| --- | --- |
| Title, author, cover, organic rank, sponsored flag | Amazon Kindle Store / Books search results |
| Buy price, Kindle Unlimited flag, rating, ratings count | Search card, confirmed on the book page |
| Best Sellers Rank (store + subcategories), free-rank flag | Book detail page (`fetchDetails: true`) |
| Publisher, publish date, page count, independently published | Book detail page product details |
| Median BSR, median price, median ratings, title density | Niche report (computed) |
| Demand, competition, and opportunity scores + label | Niche report, formula `kdp-niche-v1` |

### Why use Amazon KDP Niche Analyzer?

- **Validate a niche before writing.** See how strong the top competing books are (median BSR, ratings depth) in one run.
- **Compare niches side by side.** Pass several keywords and sort the niche reports by `opportunityScore`.
- **Spot self-publishing room.** `independentShare` and `kindleUnlimitedShare` show how many indie and KU titles already rank.
- **Feed AI agents and spreadsheets.** Every row is flat JSON with stable field names, ready for Google Sheets, Airtable, or an LLM prompt.

Choose it when you want keyword-level KDP competition data with a reproducible score. Pair it with the [Amazon Reviews Scraper](https://apify.com/khadinakbar/amazon-reviews-scraper) when you then want to analyze reader complaints for the top books it surfaces, or start with the [Amazon Product Intelligence](https://apify.com/khadinakbar/amazon-product-intelligence) Actor when you need general Amazon product data outside the book store.

### How to use Amazon KDP Niche Analyzer

1. Open the Actor and go to the **Input** tab.
2. Enter one or more niche keywords, for example `cozy mystery` or `keto cookbook`.
3. Pick the marketplace (US, UK, DE, CA, ES, IT, JP, AU, IN) and department (`kindle` or `paperback`).
4. Set **Max books per keyword** (5–10 is a good start) and keep **Fetch detail pages** on for BSR.
5. Click **Start**, then open the **Books** and **Niche reports** views in the Output tab.

#### Input example

```json
{
    "keywords": ["cozy mystery", "keto cookbook"],
    "marketplace": "US",
    "department": "kindle",
    "maxBooksPerKeyword": 10,
    "fetchDetails": true,
    "includeNicheSummary": true
}
```

| Field | Type | Default | Meaning |
| --- | --- | --- | --- |
| `keywords` | string\[] | — | Niche keywords, one Amazon search each |
| `keyword` | string | — | Single-keyword alternative for API/agent callers |
| `marketplace` | enum | `US` | US, UK, DE, CA, ES, IT, JP, AU, IN |
| `department` | enum | `kindle` | `kindle` (Kindle Store) or `paperback` (Books) |
| `maxBooksPerKeyword` | integer | 10 | 1–30 competing books per keyword (organic first) |
| `fetchDetails` | boolean | true | Open each book page for BSR, publisher, date, pages |
| `includeNicheSummary` | boolean | true | Add one niche-report row per keyword |
| `maxKeywords` | integer | 5 | Safety cap on keywords per run (1–20) |
| `proxyConfiguration` | object | Apify Proxy | Residential in the marketplace country is tried first |

### Output

Each run writes two record types to one dataset. You can download the dataset as JSON, CSV, Excel, HTML, or XML.

#### Book row

```json
{
    "recordType": "book",
    "keyword": "keto cookbook",
    "marketplace": "US",
    "department": "kindle",
    "asin": "B0EXAMPLE1",
    "title": "Simply Keto: A Practical Approach to Health",
    "author": "Example Author",
    "url": "https://www.amazon.com/dp/B0EXAMPLE1",
    "organicRank": 2,
    "isSponsored": false,
    "price": 12.99,
    "currency": "USD",
    "kindleUnlimited": true,
    "rating": 4.6,
    "reviewCount": 10305,
    "detailScraped": true,
    "publisher": "Example Publishing",
    "independentlyPublished": false,
    "publishDate": "October 3, 2017",
    "pageCount": 320,
    "bestSellersRank": [
        { "rank": 62505, "category": "Kindle Store", "free": false },
        { "rank": 88, "category": "Ketogenic Diets", "free": false }
    ],
    "bsrOverall": 62505,
    "bsrCategory": "Kindle Store",
    "bsrIsFree": false,
    "scrapedAt": "2026-01-15T10:00:00.000Z"
}
```

#### Niche report row

```json
{
    "recordType": "niche-report",
    "keyword": "keto cookbook",
    "marketplace": "US",
    "department": "kindle",
    "bookCount": 10,
    "medianBsr": 56500,
    "bsrBasis": "paid",
    "medianPrice": 11.99,
    "medianReviews": 8700,
    "titleDensity": 1,
    "competitionScore": 88,
    "demandScore": 60,
    "opportunityScore": 40,
    "opportunityLabel": "medium",
    "independentShare": 0.1,
    "kindleUnlimitedShare": 0.75,
    "formulaVersion": "kdp-niche-v1",
    "disclaimer": "Heuristic niche score from public Amazon listing data. Not a sales, royalty, or earnings estimate."
}
```

#### How the niche score works (`kdp-niche-v1`)

| Score | Inputs | Direction |
| --- | --- | --- |
| `demandScore` (0–100) | Median paid Best Sellers Rank of the analyzed books | Lower BSR → higher demand |
| `competitionScore` (0–100) | Weighted 0.5 median ratings depth, 0.3 title density, 0.2 search volume | Higher → harder to rank |
| `opportunityScore` (0–100) | 0.55 × demand + 0.45 × (100 − competition) | Higher → better opening |
| `opportunityLabel` | ≥65 `opportunity`, 40–64 `medium`, <40 `saturated` | — |

Free Kindle Store ranks (free or promo books) are flagged with `bsrIsFree` and left out of the demand median whenever paid ranks exist (`bsrBasis`).

#### Run outcome records

Every run also writes `OUTPUT` and `RUN_SUMMARY` to the key-value store with an `outcome` field: `COMPLETE`, `PARTIAL`, `VALID_EMPTY`, `INVALID_INPUT`, `UPSTREAM_FAILED`, or `CONFIG_ERROR`, plus per-keyword search status and `chargedEventCounts`.

### Workflow story: from keyword list to a shortlist of niches

A cozy-fiction author starts with ten candidate keywords, runs them through the Actor on the US Kindle Store with `maxBooksPerKeyword: 10`, and then sorts the niche reports by `opportunityScore`. The three best niches get a second run on the UK marketplace to compare. Next, the author passes the top ASINs to a reviews scraper to read what readers wish those books did better, and schedules a monthly re-run to watch BSR movement.

### Pricing

This Actor uses **Pay per event (PPE)** plus Apify **platform usage**, so you pay for results and the compute your run uses. Check the live **Pricing tab** for the current numbers.

| Event | Price | When it is charged |
| --- | --- | --- |
| `apify-actor-start` | $0.00005 | Once per run |
| `book-analyzed` | $0.003 | Once per competing book saved |
| `niche-report` | $0.02 | Once per keyword that produced at least one book |

Example: one keyword with 10 books and a niche report costs about 10 × $0.003 + $0.02 = $0.05 in events, plus platform usage. Keywords with no matching books create no book or report charges.

### Use with AI agents (MCP)

The Actor is available as an MCP tool (`apify--amazon-kdp-niche-analyzer`) through the Apify MCP server, so Claude, ChatGPT, and other AI agents can call it directly.

> Analyze the KDP niches "cozy mystery" and "dragon romance" on the US Kindle Store with 10 books each, then rank them by opportunityScore and explain the demand and competition behind each score.

Agents should read `OUTPUT.outcome` first: `COMPLETE` and `PARTIAL` include usable rows, `VALID_EMPTY` means Amazon showed no matching books, and `UPSTREAM_FAILED` means Amazon pages were unavailable for that run. The dataset holds the per-book evidence behind every score.

#### API example

```bash
curl -X POST "https://api.apify.com/v2/acts/khadinakbar~amazon-kdp-niche-analyzer/run-sync-get-dataset-items?token=$APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"keywords":["cozy mystery"],"marketplace":"US","department":"kindle","maxBooksPerKeyword":5}'
```

```javascript
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('khadinakbar/amazon-kdp-niche-analyzer').call({
    keywords: ['cozy mystery', 'keto cookbook'],
    marketplace: 'US',
    maxBooksPerKeyword: 10,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items.filter((row) => row.recordType === 'niche-report'));
```

### Best results

- Use specific buyer phrases (`cozy mystery with cats`) rather than one broad word for a sharper competitor set.
- Keep `fetchDetails` on for niche decisions: the demand score is anchored on Best Sellers Rank from the book page.
- Start with 5–10 books per keyword; the top of the search results carries most of the signal.
- Use `paperback` for low-content and print niches (journals, planners, coloring books).
- Residential proxies in the marketplace country give the most consistent Amazon pages; the default proxy setting tries them first.
- Rows that could only use search-card data are marked `detailScraped: false`, and the run outcome becomes `PARTIAL` so you can re-run just those keywords.

### Builder's note

I built this because every KDP niche tool I tried hid its formula. My goal was a score you can recompute yourself from the rows in the dataset: median paid BSR for demand, ratings depth and title density for competition, and a simple weighted blend for opportunity. In my testing, free-promo books with tiny free-store ranks distorted demand badly, so the Actor separates free ranks from paid ranks and tells you which basis it used.

### Responsible use and legal

This Actor collects publicly visible Amazon listing data. Amazon Kindle Direct Publishing (KDP) and Amazon are trademarks of Amazon.com, Inc.; this Actor is independent and is not affiliated with, endorsed by, or sponsored by Amazon. The scores are heuristics from public listing signals and are not sales, royalty, or earnings estimates. Make sure your use complies with applicable laws and the site terms, and use the data for research and publishing decisions.

### FAQ

**Which marketplaces are supported?** US, UK, DE, FR, CA, ES, IT, JP, AU, and IN.

**Does it estimate monthly sales or royalties?** It reports BSR and other public signals. Converting BSR to sales depends on category and season, so the Actor keeps the raw rank and a transparent score instead.

**Can I analyze paperbacks?** Yes, set `department` to `paperback` to search the Books department.

**Where do I report issues or request features?** Open the Issues tab on the Actor page.

# Changelog

This Actor's version history is a separate document: https://apify.com/khadinakbar/amazon-kdp-niche-analyzer/changelog.md

# Actor input Schema

## `keywords` (type: `array`):

List of book niche keywords to analyze, one per line, e.g. 'cozy mystery', 'keto cookbook', 'dragon romance'. Each keyword runs one Amazon Kindle Store (or Books) search and returns competing books plus one niche report. Use short buyer-style phrases; do not paste Amazon URLs.

## `keyword` (type: `string`):

One niche keyword as plain text, e.g. 'cozy mystery'. Use this instead of the list when an agent or API caller passes a single string. Combined and de-duplicated with Niche keywords when both are set.

## `marketplace` (type: `string`):

Which Amazon store to search. Controls domain, currency, and proxy country. Defaults to US (amazon.com).

## `department` (type: `string`):

Search the Kindle Store (e-books, default) or the Books department (paperback/print). Choose 'kindle' for KDP e-book niches, 'paperback' for low-content or print niches.

## `maxBooksPerKeyword` (type: `integer`):

How many competing books to analyze per keyword (organic results first, sponsored only to fill). Accepts 1-30. Defaults to 10. This is the main cost cap: you pay per book saved.

## `fetchDetails` (type: `boolean`):

When true (default), opens each book's Amazon page to read Best Sellers Rank, publisher, publish date, page count, and the independently-published flag. Demand scoring relies on BSR, so keep this on for niche decisions. Set false for a faster search-only scan.

## `includeNicheSummary` (type: `boolean`):

When true (default), adds one niche-report row per keyword with median BSR, median price, median reviews, title density, demand, competition, and a 0-100 opportunity score. Only produced when at least one book was saved for that keyword.

## `maxKeywords` (type: `integer`):

Safety cap on how many keywords are processed in one run. Accepts 1-20. Defaults to 5. Extra keywords are ignored and listed in OUTPUT warnings.

## `proxyConfiguration` (type: `object`):

Proxy settings. Amazon blocks many datacenter IPs. Leave the default (Apify Proxy on): the Actor tries residential in the marketplace country first, then other Apify proxy groups. Override only for your own proxy groups or URLs.

## Actor input object example

```json
{
  "keywords": [
    "cozy mystery",
    "keto cookbook"
  ],
  "keyword": "cozy mystery",
  "marketplace": "US",
  "department": "kindle",
  "maxBooksPerKeyword": 5,
  "fetchDetails": true,
  "includeNicheSummary": true,
  "maxKeywords": 5,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `dataset` (type: `string`):

All competing book rows (recordType=book) and per-keyword niche reports (recordType=niche-report).

## `runOutput` (type: `string`):

Machine-readable terminal outcome (COMPLETE, PARTIAL, VALID_EMPTY, INVALID_INPUT, UPSTREAM_FAILED, CONFIG_ERROR), counts, and PPE charge counts.

## `runSummary` (type: `string`):

Per-keyword search status, detail coverage, warnings, and charge counts for monitoring and AI agents.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "keywords": [
        "cozy mystery kindle"
    ],
    "marketplace": "US",
    "department": "kindle",
    "maxBooksPerKeyword": 5,
    "fetchDetails": true,
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("khadinakbar/amazon-kdp-niche-analyzer").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "keywords": ["cozy mystery kindle"],
    "marketplace": "US",
    "department": "kindle",
    "maxBooksPerKeyword": 5,
    "fetchDetails": True,
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("khadinakbar/amazon-kdp-niche-analyzer").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "keywords": [
    "cozy mystery kindle"
  ],
  "marketplace": "US",
  "department": "kindle",
  "maxBooksPerKeyword": 5,
  "fetchDetails": true,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call khadinakbar/amazon-kdp-niche-analyzer --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,khadinakbar/amazon-kdp-niche-analyzer"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/aVAUM1MyMbPrAX89G/builds/EGFIPN947hMuJs27J/openapi.json
