# Amazon Category Scraper (`phone_number_scraper/amazon-category-scraper`) Actor

\[ 1k / 1$ ] Amazon Category Scraper that maps Amazon's category tree from Best Sellers navigation: category IDs, full paths, depth and ready-to-use Best Sellers and New Releases URLs. Perfect for niche research and category discovery.

- **URL**: https://apify.com/phone_number_scraper/amazon-category-scraper.md
- **Developed by:** [Phone Number Scraper](https://apify.com/phone_number_scraper) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

### Amazon Category Scraper

Amazon Category Scraper maps the category tree of an Amazon marketplace. It starts at the department overview of the Amazon Best Sellers charts, or at category URLs you provide, and walks down the category navigation level by level. Every category comes back with its ID, its full path, its depth and ready-to-use Best Sellers and New Releases links. 🗂️

If you research niches, build category lists or feed other tools with Amazon category IDs, Amazon Category Scraper replaces a lot of clicking through menus. It reads public pages, needs no account and returns structured data you can export in one click.

Amazon does not offer its category tree as a download, and the navigation is spread over many pages. Amazon Category Scraper suits market researchers, sellers, agencies and developers who need a dependable list of categories instead of a screenshot of a menu.

> 🗺️ **At a glance**
>
> - Start: a marketplace's department overview, or your own category URLs
> - Output: one record per category with ID, path, depth and chart URLs
> - Markets: 21 marketplaces, from amazon.com to amazon.eg
> - Price: $1.49 per 1,000 results

### 🔹 Amazon Category Scraper Key Features

Amazon Category Scraper turns the chart navigation into a flat, sortable table of categories that other tools can consume.

- 🌳 Walks the category tree breadth-first, from departments down to deeper levels
- 🆔 Returns the category ID for every Amazon category it finds
- 🧭 Provides the full path as a list and as a readable "A > B > C" string
- 🔗 Amazon Category Scraper builds Best Sellers and New Releases chart URLs for each category
- 🎚️ Controls how deep to go with a maximum depth and an optional minimum depth
- 🔤 Includes or excludes categories by words in their names
- 🌍 Works on 21 Amazon marketplaces, and every record names its marketplace
- ⚡ Handles several start URLs in parallel
- 🔁 Retries automatically when a page does not load

> 💡 **Key idea:** the Amazon Category Scraper output is designed as input for other work. The chart URLs can be pasted straight into a Best Sellers workflow, a spreadsheet or your own scripts.

### 🔍 What Data Can Amazon Category Scraper Extract?

Amazon Category Scraper returns one record per category. The fields describe where the category sits in the tree and how to reach its charts.

- **Identity:** category ID and category name
- **Position:** depth, full path list, readable path string, parent ID and parent name
- **Links:** the category page URL, the Best Sellers URL and the New Releases URL
- **Context:** marketplace, country code and scrape timestamp

Amazon Category Scraper does not collect products or rankings. It collects the structure that tells you where those charts live.

### 🚀 How to Use Amazon Category Scraper

Amazon Category Scraper runs from the Apify Console without any setup.

1. Leave **Start category URLs** empty to begin at the department overview, or add category URLs such as a Best Sellers page.
2. Choose the Amazon marketplace for the overview.
3. Set **Maximum depth** to decide how many levels below the start page to walk.
4. Set **Maximum number of categories** to cap the size of the result.
5. Optionally add name filters or a minimum depth.
6. Start Amazon Category Scraper, open the **Category tree** or **Chart links** view, then export the data as JSON, CSV or Excel.

### 🧭 How to Extract Subcategories With Amazon Category Scraper

To list everything below one department, paste its Best Sellers URL into **Start category URLs**, for example the Electronics chart, and raise the maximum depth. Amazon Category Scraper emits the start category itself once, then every level beneath it. Duplicate categories are removed.

When you start from the department overview, set **Minimum depth to output** to 2 to skip the departments and keep only the deeper levels. The walk still passes through the upper levels, but only the deeper categories reach your dataset.

#### ❓ Can you scrape the whole department list with Amazon Category Scraper?

Yes. With no start URLs, Amazon Category Scraper reads the department overview of the chosen marketplace and returns each department at depth 1.

#### 🔤 Can you filter categories by name with Amazon Category Scraper?

Yes. **Name contains any of** keeps categories whose name includes one of your words, and **Name contains none of** drops matches. Both ignore case and are applied before the category limit is counted.

#### 🌐 Can you use other Amazon marketplaces with Amazon Category Scraper?

Yes. Select any of the 21 Amazon sites. Category names follow the language of that marketplace, and a start URL always keeps its own marketplace.

#### 🔗 Can Amazon Category Scraper handle several start URLs?

Yes. Add as many category URLs as you need. They are processed in parallel, the category limit is shared across all of them, and one run can mix start URLs from different Amazon sites.

### 🧪 Amazon Category Scraper Sample Run Step by Step

Here is what happens when you paste the Electronics Best Sellers URL, set **Maximum depth** to 2 and **Maximum number of categories** to 50.

1. Amazon Category Scraper opens the page and reads the navigation. The Electronics category is saved once at depth 0.
2. Its direct subcategories are saved at depth 1, each with `parentId` set to `electronics`.
3. Every subcategory page is opened in turn, and the categories beneath it are saved at depth 2.
4. Each record gets its Best Sellers and New Releases links, the marketplace and a timestamp.
5. The walk ends when the depth limit is reached, the tree ends or 50 categories are saved.

Because Amazon Category Scraper walks level by level, a small limit fills the upper levels first.

### 💡 Why Use Amazon Category Scraper?

Clicking through the menus of a large marketplace is slow, and the result is hard to reuse. Amazon Category Scraper collects it for you.

- Saves manual browsing through Amazon menus
- Amazon Category Scraper reads every level the same way, so no branch needs special handling
- Gives one consistent record format for every level of the tree
- Produces chart URLs that are ready for downstream scrapers and reports
- Works for single departments or for a full marketplace overview

### 🎯 Amazon Category Scraper Use Cases

> 🎯 **Where teams use Amazon Category Scraper:** niche research, catalog mapping, assortment planning, chart monitoring and tool building.

- 🔎 **Niche discovery:** browse every subcategory of a department and spot narrow niches on Amazon
- 🏷️ **Catalog mapping:** match your own product taxonomy with Amazon categories and IDs
- 📊 **Chart monitoring:** let Amazon Category Scraper collect the Best Sellers and New Releases URLs you want to track
- 🧰 **Tool building:** seed a category dropdown or a crawler with clean category data
- 🌍 **Market comparison:** compare how the same department is organized on different marketplaces
- 📝 **Research documentation:** export the tree as a spreadsheet for planning meetings

### 🔗 Amazon Category Scraper Workflows and Integrations

The Amazon Category Scraper dataset is plain, flat data, so it fits into most tools without conversion.

- **Spreadsheets:** download CSV or Excel and filter by `depth`, `parentName` or words in `pathString`
- **Chart scrapers:** send `bestSellersUrl` values to Amazon Best Sellers Scraper to collect ranked products for each category
- **Product research:** pass category URLs to Amazon Product Scraper or Amazon Search Results Scraper when you need listings
- **Monitoring:** schedule Amazon Category Scraper monthly and compare `categoryId` lists to spot new or removed categories
- **Your own code:** read the dataset through the Apify API, or let a webhook announce a finished run

### ⚙️ Amazon Category Scraper Input

No field is required. With the defaults, Amazon Category Scraper returns the first 15 departments of amazon.com; raise `maxItems` to reach their subcategories.

| Field | Type | Default | Description |
| --- | --- | --- | --- |
| `startUrls` | array | empty | Optional Best Sellers or category URLs; empty means the department overview |
| `marketplace` | string | `amazon.com` | One of 21 Amazon sites, used for the department overview |
| `maxDepth` | integer | `2` | Levels below the start page to walk (1 to 10); 1 returns only direct subcategories |
| `maxItems` | integer | `15` | Maximum number of categories in the whole run |
| `minDepth` | integer | empty | Only output categories at this depth or deeper (1 to 10) |
| `nameIncludes` | array | empty | Keep categories whose name contains any of these words |
| `nameExcludes` | array | empty | Skip categories whose name contains any of these words |
| `maxConcurrency` | integer | `3` | Start URLs processed in parallel (1 to 10) |

Start URLs must be full Amazon links, such as the Best Sellers page of a department. If a start URL is itself a category, it is returned once at depth 0 and its subcategories follow. `minDepth` cannot be larger than `maxDepth`.

#### 🧾 Input example

```json
{
  "startUrls": ["https://www.amazon.com/gp/bestsellers/electronics"],
  "marketplace": "amazon.com",
  "maxDepth": 3,
  "minDepth": 1,
  "nameIncludes": ["camera", "audio"],
  "nameExcludes": ["gift cards"],
  "maxItems": 100,
  "maxConcurrency": 3
}
```

### 📦 Amazon Category Scraper Output

Amazon Category Scraper stores one record per category in the dataset. The **Category tree** view shows names, depth, path and IDs, and the **Chart links** view shows the Best Sellers and New Releases URLs.

| Field | Description |
| --- | --- |
| `categoryId` | Category ID: a short name for departments, usually a number deeper down |
| `name` | Category name as the marketplace shows it |
| `depth` | Levels below the start page: 1 for the first level, 2 for the next |
| `path` | Full path from the top of the tree as a list of names |
| `pathString` | The same path as one string, joined with " > " |
| `parentId`, `parentName` | ID and name of the parent category; `null` at the start |
| `url` | Category page URL |
| `bestSellersUrl` | Link to the Best Sellers chart of the category |
| `newReleasesUrl` | Link to the New Releases chart of the category |
| `domain`, `loadedCountryCode` | Marketplace and its country code |
| `scrapedAt` | Time of collection in UTC |

Amazon Category Scraper gives departments short IDs such as `electronics`, while deeper categories usually use numeric IDs. The `url` field holds the category page address and is left out of the shortened examples below.

#### 🌳 Subcategory record example

```json
{
  "categoryId": "17871151011",
  "name": "Renewed Tools & Home Improvement",
  "path": ["Amazon Renewed", "Renewed Tools & Home Improvement"],
  "pathString": "Amazon Renewed > Renewed Tools & Home Improvement",
  "depth": 2,
  "parentId": "amazon-renewed",
  "parentName": "Amazon Renewed",
  "bestSellersUrl": "https://www.amazon.com/gp/bestsellers/amazon-renewed/17871151011",
  "newReleasesUrl": "https://www.amazon.com/gp/new-releases/amazon-renewed/17871151011",
  "domain": "amazon.com",
  "loadedCountryCode": "US",
  "scrapedAt": "2026-11-12T13:10:50Z"
}
```

#### 🏬 Department record example

```json
{
  "categoryId": "electronics",
  "name": "Electronics",
  "path": ["Electronics"],
  "pathString": "Electronics",
  "depth": 1,
  "parentId": null,
  "parentName": null,
  "bestSellersUrl": "https://www.amazon.com/gp/bestsellers/electronics",
  "newReleasesUrl": "https://www.amazon.com/gp/new-releases/electronics",
  "domain": "amazon.com",
  "loadedCountryCode": "US",
  "scrapedAt": "2026-11-12T13:10:47Z"
}
```

#### 🧱 Start category record example

When a start URL is itself a category, that category is saved once at depth 0, and its subcategories follow at depth 1. This record comes from a run that started at the Electronics chart:

```json
{
  "categoryId": "electronics",
  "name": "Electronics",
  "path": ["Electronics"],
  "pathString": "Electronics",
  "depth": 0,
  "parentId": null,
  "parentName": null,
  "bestSellersUrl": "https://www.amazon.com/gp/bestsellers/electronics",
  "newReleasesUrl": "https://www.amazon.com/gp/new-releases/electronics",
  "domain": "amazon.com",
  "loadedCountryCode": "US",
  "scrapedAt": "2026-11-12T13:12:05Z"
}
```

#### 🌐 More input examples

List only the deeper levels of the whole German marketplace, without the departments themselves:

```json
{
  "marketplace": "amazon.de",
  "maxDepth": 2,
  "minDepth": 2,
  "maxItems": 200
}
```

Walk one branch on the UK marketplace and keep categories that mention garden or outdoor:

```json
{
  "startUrls": ["https://www.amazon.co.uk/gp/bestsellers/garden"],
  "maxDepth": 4,
  "nameIncludes": ["garden", "outdoor"],
  "maxItems": 60,
  "maxConcurrency": 1
}
```

### 💲 Amazon Category Scraper Pricing

Amazon Category Scraper uses pay-per-result pricing: **$1.49 per 1,000 results**. Each category record in the dataset is one result.

> 💳 **Cost control:** `maxItems` limits the number of categories, so a run cannot grow past the number you set. Apify platform plans and usage limits apply.

### ✅ Tips and Best Practices

- Begin Amazon Category Scraper with the default settings to see the record format, then raise `maxDepth` and `maxItems`
- Departments come in the order Amazon lists them, so a small `maxItems` returns only the first departments
- To go deep into one department, use its Best Sellers URL as the start URL
- Combine `minDepth` with name filters to get a short, focused list from Amazon Category Scraper
- Use one run per marketplace to compare category structures across countries, because every record stores its domain
- Deeper runs load more Amazon pages and take longer, so raise the depth step by step
- Results show the categories that Amazon lists in its public Best Sellers navigation, which can differ from other menus
- A very long run stops after a few minutes and keeps the categories collected so far

### 🛠️ Troubleshooting and Data Quality

Amazon Category Scraper copies the structure Amazon shows today, so a few points are worth knowing.

- **Fewer categories than `maxItems`:** the tree below your start page is smaller than the limit, or your filters removed categories
- **`depth` looks low for a deep category:** depth counts levels below the start page, so use the length of `path` for the absolute level
- **Names in another language:** category names follow the language of the chosen marketplace
- **A start URL returns nothing:** it must be a Best Sellers or category chart page, and a page without chart navigation is reported as failed in the run log
- **The tree changed since last time:** Amazon reorganizes categories, so schedule a refresh before you rely on old IDs

### 🧩 Which Amazon Actor Should You Use?

> 🧭 **Pick by question:** choose the Actor that matches what you need to know.

- The category tree and chart links: Amazon Category Scraper
- Ranked products of a chart: Amazon Best Sellers Scraper
- Full detail of single products: Amazon Product Scraper
- Products for a keyword: Amazon Search Results Scraper

### ❓ Frequently Asked Questions

#### 📋 What data does Amazon Category Scraper collect?

Amazon Category Scraper collects category IDs, names, paths, depth, parent details and chart URLs. Products and rankings are not part of the output.

#### 🔐 Does Amazon Category Scraper need an Amazon account?

No. Amazon Category Scraper uses public chart pages, so nothing depends on your login.

#### 🆔 How do I get Amazon category IDs with Amazon Category Scraper?

Run it on the department overview or on a department URL. The `categoryId` and `parentId` fields give you the IDs, and the chart URLs already contain them.

#### 📏 How deep can Amazon Category Scraper go?

Amazon Category Scraper accepts a maximum depth up to 10. The real limit is how many levels Amazon shows for a branch, and a branch without further subcategories simply ends.

#### 🧮 Why does Amazon Category Scraper return fewer categories than my limit?

The tree below your start page may be smaller than `maxItems`, or your filters removed some categories. A run can also end early when Amazon shows a different page than expected.

#### 🔗 How do I use the chart URLs from Amazon Category Scraper?

Open `bestSellersUrl` or `newReleasesUrl` in a browser to see the live chart, or feed the links to a workflow such as Amazon Best Sellers Scraper.

#### 🌍 Can Amazon Category Scraper cover several marketplaces in one run?

Yes, by adding one start URL per Amazon site. Without start URLs, the run covers only the marketplace you selected.

#### 🧱 Is Amazon Category Scraper suitable for large category trees?

Yes, within the limits you set. Raise `maxItems` and `maxDepth` together, or split a very large tree into one run per department. Every run returns the same record format, so results can be merged easily.

#### 📥 How do I export the Amazon Category Scraper dataset?

Open the run's dataset and download JSON, CSV, Excel, XML or HTML. The records are flat enough to open in a spreadsheet, and the Apify API reads the same data.

#### 🔤 Why are some category IDs words and others numbers?

Departments use short names such as `electronics`, while deeper categories use numeric IDs. Both work in the chart URLs, so keep `categoryId` as text.

#### 🧾 What is the difference between `url`, `bestSellersUrl` and `newReleasesUrl`?

The `url` is the category page address Amazon Category Scraper found in the navigation. The two chart links are rebuilt in the same pattern for every category, so they are easy to compare and reuse.

#### 🚚 Can I schedule Amazon Category Scraper?

Yes. Use Apify schedules or the Apify API to refresh your category list regularly, then pass the dataset to your own tools.

#### 🔔 Can Amazon Category Scraper start another Actor when it finishes?

Yes. An Apify webhook or integration can react to a finished run, for example by sending the chart URLs to a scraper that reads the ranked products.

### 💬 Support

Questions about Amazon Category Scraper, a marketplace that behaves unexpectedly or a field you would like to see? Send a message with your run link.

- contact me by email : alphascraper69@gmail.com

# Actor input Schema

## `startUrls` (type: `array`):

Optional Best Sellers / category URLs to start from. Empty = department overview of the marketplace.

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

Amazon site to use. It is used for plain ASINs, keywords and names; a full Amazon URL always keeps its own marketplace. Prices, currency and availability follow the marketplace and the visitor's location.

## `maxDepth` (type: `integer`):

How many levels below the start page to walk (1 = only the direct sub-categories).

## `maxItems` (type: `integer`):

Maximum number of categories in the whole run.

## `minDepth` (type: `integer`):

Only output categories at this depth or deeper (for example 2 to skip the top-level departments).

## `nameIncludes` (type: `array`):

Only output categories whose name contains any of these words (case-insensitive).

## `nameExcludes` (type: `array`):

Skip categories whose name contains any of these words (case-insensitive).

## `maxConcurrency` (type: `integer`):

How many input items (keywords, URLs, ASINs, profiles ...) are processed at the same time, each in its own browser. A higher value finishes faster but needs more memory (about 600 MB per browser - the run never starts more browsers than its memory allows) and sends more simultaneous requests to Amazon; 2 to 5 is a good range.

## Actor input object example

```json
{
  "startUrls": [
    "https://www.amazon.com/gp/bestsellers/electronics"
  ],
  "marketplace": "amazon.com",
  "maxDepth": 2,
  "maxItems": 15,
  "nameIncludes": [
    "camera",
    "audio"
  ],
  "nameExcludes": [
    "gift cards"
  ],
  "maxConcurrency": 3
}
```

# Actor output Schema

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

No description

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("phone_number_scraper/amazon-category-scraper").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 = {}

# Run the Actor and wait for it to finish
run = client.actor("phone_number_scraper/amazon-category-scraper").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 '{}' |
apify call phone_number_scraper/amazon-category-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,phone_number_scraper/amazon-category-scraper"
        }
    }
}
```

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/IBXP1amDIoc7KH7Xu/builds/aepSFeUq2GF5LEgGT/openapi.json
