# Amazon Best Sellers Scraper: Rankings, Prices & Ratings (`johnatan029/amazon-bestsellers-scraper`) Actor

Scrapes ranked products from Amazon best-seller lists (top 100) with position, price, rating and images. Multi-marketplace (US, UK). Public data, no login.

- **URL**: https://apify.com/johnatan029/amazon-bestsellers-scraper.md
- **Developed by:** [Johnatan Pereira](https://apify.com/johnatan029) (community)
- **Categories:** E-commerce, Automation
- **Stats:** 2 total users, 1 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## Amazon Best Sellers Scraper (US, UK)

Extract the ranked products from any Amazon Best Sellers list — rank position, ASIN, title, price, rating, review count, and image — across marketplaces, using only public data, no login.

### What it does

You give it Amazon Best Sellers categories (by name) and/or best-seller list URLs. It returns a clean, ranked list of the products on those lists — up to the top 100 per list — each with its position and the fields you see on the list. It renders each page like a real browser over a residential proxy in the marketplace's country, scrolls to load every item, and reads both pages of the list, so you get the complete top 100.

### Use cases

- **Best-seller rank monitoring** — track which products lead a category over time, and how ranks shift.
- **FBA / product research** — pull the top 100 of a category with prices, ratings, and review counts to size demand.
- **Trend discovery** — spot products climbing the rankings before they are obvious.
- **Ranking feeds** — feed ranked category data into dashboards, sheets, or your own tools.

### Inputs

| Field | Type | Default | Required | Example |
|---|---|---|---|---|
| `marketplace` | select (`US`, `UK`) | `US` | optional | `"UK"` |
| `categories` | array of strings | `[]` | one of the two | `["Electronics", "Video Games"]` |
| `categoryUrls` | array of URLs | `[]` | one of the two | `["https://www.amazon.com/Best-Sellers-Electronics-Headphones/zgbs/electronics/172541"]` |
| `maxItemsPerList` | integer | `100` | optional | `50` |

Provide at least one `categories` entry **or** one `categoryUrls` entry. `maxItemsPerList` is capped at 100 (an Amazon Best Sellers list holds 100 products, 50 per page).

#### How category resolution works

- **Department names resolve by name.** Entries in `categories` are matched (case-insensitive, partial) against the marketplace's Best Sellers department sidebar. For example, `"Electronics"` resolves on both US and UK; `"Video Games"` resolves to `"PC & Video Games"` on UK. Node IDs also work.
- **Deep sub-categories go through `categoryUrls`.** Nested lists like *Headphones* (inside *Electronics*) are not in the top-level department sidebar, so they cannot be resolved by name. Open the list on Amazon and pass its URL (the `…/zgbs/…` or `…/gp/bestsellers/…` link) in `categoryUrls`. Any category that does not resolve by name is reported under `unresolvedCategories` in the run's `STATS`, and the run continues with the ones that did.

### Output

One record per product, in rank order. Here is a **real** record — the US Electronics #1 from a run:

```json
{
  "rankPosition": 1,
  "asin": "B08JHCVHTY",
  "title": "blink plus plan with monthly auto-renewal",
  "url": "https://www.amazon.com/dp/B08JHCVHTY",
  "priceCurrent": 11.99,
  "currency": "USD",
  "rating": 4.4,
  "reviewCount": 277639,
  "imageUrl": "https://images-na.ssl-images-amazon.com/images/I/31YHGbJsldL._AC_UL300_SR300,200_.png",
  "categoryName": "Electronics",
  "categoryUrl": "https://www.amazon.com/Best-Sellers-Electronics/zgbs/electronics/ref=zg_bs_nav_electronics_0",
  "marketplace": "US",
  "scrapedAt": "2026-07-07T17:37:54.837Z"
}
````

| Field | Description |
|---|---|
| `rankPosition` | Position in the list (`1` = top seller). |
| `asin` | Amazon product ID. |
| `title` | Product title as shown on the list. |
| `url` | Clean canonical product URL (`/dp/<asin>`), no tracking. |
| `priceCurrent` | Current price shown, as a number (e.g. `11.99`). `null` if no price is shown on the list. |
| `currency` | Currency code (`"USD"` for US, `"GBP"` for UK). |
| `rating` | Star rating, e.g. `4.4`. `null` if not shown. |
| `reviewCount` | Number of ratings, e.g. `277639`. `null` if not shown. |
| `imageUrl` | Product thumbnail image URL. |
| `categoryName` | The resolved category / list name. |
| `categoryUrl` | The Best Sellers list URL the record came from. |
| `marketplace` | `"US"` or `"UK"`. |
| `scrapedAt` | ISO timestamp of when the record was collected. |

### Supported marketplaces

| Marketplace | Domain | Currency |
|---|---|---|
| US | amazon.com | USD |
| UK | amazon.co.uk | GBP |

More marketplaces (DE, CA, FR, …) are planned — the extractor is already marketplace-agnostic; each new one is a small addition.

### Cost

This actor is billed **per product** (Pay Per Event). You pay for the ranked products you get, not for time or attempts.

As an example, at **$4 per 1,000 products**, a full top-100 list costs about **$0.40**, and 1,000 products cost about **$4**. (See the actor's pricing on its Store page for the current rate.)

### Reliability & scheduling

Amazon runs aggressive anti-bot protection. From time to time it serves an empty page instead of the real list — this affects every Amazon scraper, not just this one. To handle it, the actor **automatically retries with a fresh proxy session** when a list page comes back without the product grid, instead of silently returning nothing. It also scrolls each page until all 50 items load and reads both pages of the list, so a complete run returns the full top 100.

For continuous monitoring, the recommended setup is to **schedule your runs** (Apify Schedules) — for example, once a day. Because Amazon's empty responses are intermittent, repeated scheduled runs give you reliable coverage over time.

### Known limitations

- **Top 100 per list** — an Amazon Best Sellers list holds 100 products (50 per page). `maxItemsPerList` cannot exceed 100.
- **Deep sub-categories need a URL** — department names resolve automatically; nested lists (e.g. *Headphones*) must be passed via `categoryUrls` (see above).
- **US and UK** — this version covers the US and UK marketplaces; more are planned.
- **List data only** — the fields are those shown on the Best Sellers list. Product-page-only data (BSR history, full specs, seller) is out of scope for this version.
- **Intermittent empty pages** — Amazon's anti-bot may serve empty pages; mitigated by automatic retry and by scheduling repeated runs (see above).
- **Missing values are `null`** — if a card does not show a price or rating, the field is `null`; values are never estimated or invented.

### FAQ

**Is this legal?** It collects only public data that any visitor can see, without logging in. You are responsible for how you use the data.

**Do I need an Amazon account or API key?** No. No account, no login, no API key.

**How do I scrape a category that isn't a top-level department?** Open its Best Sellers list on Amazon and pass the URL in `categoryUrls`. Names in `categories` only resolve top-level departments.

**Why do I sometimes get fewer products?** Amazon serves empty pages intermittently (anti-bot). Re-run the actor, or schedule it to run repeatedly for steady coverage.

### Changelog

#### 1.0

- First release. Ranked top-100 products from Amazon Best Sellers lists on US and UK — rank position, ASIN, title, price, rating, review count, and image. Category resolution by department name, deep sub-categories via URL, full-page lazy-load scrolling, and automatic retry with session rotation on empty pages.

***

### PT-BR (resumo)

**O que faz:** extrai os produtos ranqueados de listas de Mais Vendidos da Amazon — posição no ranking, ASIN, título, preço, avaliação, número de reviews e imagem — em múltiplos marketplaces, apenas com dados públicos, **sem login**. Renderiza cada página como um navegador real sobre proxy residencial do país, rola para carregar todos os itens e lê as duas páginas da lista, entregando o top 100 completo.

**Casos de uso:** monitorar rankings de mais-vendidos, pesquisa de produto para FBA, descobrir produtos em alta, feeds de ranking para dashboards.

**Inputs:** `marketplace` (`US` ou `UK`, padrão `US`); `categories` (nomes de departamento e/ou node IDs) e/ou `categoryUrls` (URLs de listas de Mais Vendidos); `maxItemsPerList` (padrão 100, máx. 100). Informe ao menos uma categoria ou uma URL.

**Resolução de categorias:** departamentos resolvem **pelo nome** a partir do menu de Mais Vendidos do marketplace (ex.: "Electronics" no US e UK; "Video Games" vira "PC & Video Games" no UK). Sub-categorias profundas (ex.: *Headphones* dentro de *Electronics*) **não** estão no menu de departamentos — passe a URL da lista em `categoryUrls`. Categorias não resolvidas aparecem em `unresolvedCategories` no `STATS` e o run continua com as demais.

**Saída:** um registro por produto, em ordem de ranking (veja o exemplo em JSON acima) — `rankPosition`, `asin`, `title`, `url` (`/dp/<asin>`), `priceCurrent`, `currency` (`USD`/`GBP`), `rating`, `reviewCount`, `imageUrl`, `categoryName`, `categoryUrl`, `marketplace`, `scrapedAt`. Campos ausentes ficam `null`, nunca estimados.

**Marketplaces:** US (amazon.com, USD) e UK (amazon.co.uk, GBP). Outros (DE, CA, FR…) previstos — o extractor já é agnóstico de marketplace.

**Custo:** cobrado **por produto** (Pay Per Event). Exemplo: a **$4 por 1.000 produtos**, uma lista top-100 custa cerca de **$0.40**; 1.000 produtos, cerca de **$4**.

**Confiabilidade:** a Amazon tem anti-bot agressivo e às vezes serve páginas vazias (afeta todos os scrapers). O actor **retenta automaticamente com sessão nova** quando a página vem sem os produtos, e rola/pagina para entregar o top 100 completo. Para monitoramento contínuo, **agende runs** (Apify Schedules).

**Limitações:** top 100 por lista (máx. 100); sub-categorias profundas via `categoryUrls`; US e UK nesta versão; apenas dados da lista (sem dados exclusivos da página do produto); blocos intermitentes mitigados por retry/agendamento; valores ausentes ficam `null`.

# Actor input Schema

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

Which Amazon marketplace to scrape. Sets the domain, proxy country, and currency.

## `categoryUrls` (type: `array`):

Direct Amazon best-seller URLs (/gp/bestsellers/... or /zgbs/...) on the selected marketplace's domain.

## `categories` (type: `array`):

Department names or node IDs (e.g. "Electronics", "Video Games"). Department names resolve automatically from the best-sellers sidebar; for deep sub-categories (e.g. Headphones), use Category URLs instead. Use this or categoryUrls.

## `maxItemsPerList` (type: `integer`):

Maximum ranked products to collect per list. Amazon best-seller lists cap at 100 (2 pages of 50).

## Actor input object example

```json
{
  "marketplace": "US",
  "categoryUrls": [],
  "categories": [],
  "maxItemsPerList": 100
}
```

# 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("johnatan029/amazon-bestsellers-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("johnatan029/amazon-bestsellers-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).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 johnatan029/amazon-bestsellers-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=johnatan029/amazon-bestsellers-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Amazon Best Sellers Scraper: Rankings, Prices & Ratings",
        "description": "Scrapes ranked products from Amazon best-seller lists (top 100) with position, price, rating and images. Multi-marketplace (US, UK). Public data, no login.",
        "version": "1.0",
        "x-build-id": "D6jBsgUfpGw5r1S5W"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/johnatan029~amazon-bestsellers-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-johnatan029-amazon-bestsellers-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/johnatan029~amazon-bestsellers-scraper/runs": {
            "post": {
                "operationId": "runs-sync-johnatan029-amazon-bestsellers-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/johnatan029~amazon-bestsellers-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-johnatan029-amazon-bestsellers-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",
                "properties": {
                    "marketplace": {
                        "title": "Marketplace",
                        "enum": [
                            "US",
                            "UK"
                        ],
                        "type": "string",
                        "description": "Which Amazon marketplace to scrape. Sets the domain, proxy country, and currency.",
                        "default": "US"
                    },
                    "categoryUrls": {
                        "title": "Category URLs",
                        "type": "array",
                        "description": "Direct Amazon best-seller URLs (/gp/bestsellers/... or /zgbs/...) on the selected marketplace's domain.",
                        "default": [],
                        "items": {
                            "type": "object",
                            "required": [
                                "url"
                            ],
                            "properties": {
                                "url": {
                                    "type": "string",
                                    "title": "URL of a web page",
                                    "format": "uri"
                                }
                            }
                        }
                    },
                    "categories": {
                        "title": "Categories",
                        "type": "array",
                        "description": "Department names or node IDs (e.g. \"Electronics\", \"Video Games\"). Department names resolve automatically from the best-sellers sidebar; for deep sub-categories (e.g. Headphones), use Category URLs instead. Use this or categoryUrls.",
                        "default": [],
                        "items": {
                            "type": "string"
                        }
                    },
                    "maxItemsPerList": {
                        "title": "Max items per list",
                        "minimum": 1,
                        "maximum": 100,
                        "type": "integer",
                        "description": "Maximum ranked products to collect per list. Amazon best-seller lists cap at 100 (2 pages of 50).",
                        "default": 100
                    }
                }
            },
            "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
                                    }
                                }
                            },
                            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
