{
  "openapi": "3.0.1",
  "info": {
    "title": "Amazon Category Tree & Browse Node Mapper",
    "description": "Export Amazon's department and category taxonomy per marketplace: real browse-node IDs, names, breadcrumbs, parents, depth, child counts, leaf flags, chart and search URLs.",
    "version": "1.0",
    "x-build-id": "xh0UrFbhpYnRMvhgN"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/crawlyth-forge~amazon-category-tree-mapper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-crawlyth-forge-amazon-category-tree-mapper",
        "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/crawlyth-forge~amazon-category-tree-mapper/runs": {
      "post": {
        "operationId": "runs-sync-crawlyth-forge-amazon-category-tree-mapper",
        "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/crawlyth-forge~amazon-category-tree-mapper/run-sync": {
      "post": {
        "operationId": "run-sync-crawlyth-forge-amazon-category-tree-mapper",
        "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": [
          "mode",
          "marketplaces"
        ],
        "properties": {
          "mode": {
            "title": "Mode",
            "enum": [
              "marketplace",
              "roots",
              "department",
              "node"
            ],
            "type": "string",
            "description": "What to map. `marketplace` walks every root department of each selected marketplace to `maxDepth`; `roots` lists only the root departments; `department` starts from the root departments named in `rootDepartments`; `node` starts from the IDs/URLs in `nodeIds`.",
            "default": "marketplace"
          },
          "marketplaces": {
            "title": "Marketplaces",
            "type": "array",
            "description": "Amazon marketplaces to map. Each marketplace has its own taxonomy and localized department names. In `node` mode a full category URL sets its own marketplace.",
            "items": {
              "type": "string",
              "enum": [
                "amazon.com",
                "amazon.co.uk",
                "amazon.de",
                "amazon.fr",
                "amazon.it",
                "amazon.es",
                "amazon.nl",
                "amazon.se",
                "amazon.pl",
                "amazon.com.be",
                "amazon.com.tr",
                "amazon.ae",
                "amazon.sa",
                "amazon.eg",
                "amazon.in",
                "amazon.sg",
                "amazon.com.au",
                "amazon.co.jp",
                "amazon.com.br",
                "amazon.com.mx",
                "amazon.ca",
                "amazon.co.za",
                "amazon.ie"
              ],
              "enumTitles": [
                "United States (amazon.com)",
                "United Kingdom (amazon.co.uk)",
                "Germany (amazon.de)",
                "France (amazon.fr)",
                "Italy (amazon.it)",
                "Spain (amazon.es)",
                "Netherlands (amazon.nl)",
                "Sweden (amazon.se)",
                "Poland (amazon.pl)",
                "Belgium (amazon.com.be)",
                "Turkey (amazon.com.tr)",
                "United Arab Emirates (amazon.ae)",
                "Saudi Arabia (amazon.sa)",
                "Egypt (amazon.eg)",
                "India (amazon.in)",
                "Singapore (amazon.sg)",
                "Australia (amazon.com.au)",
                "Japan (amazon.co.jp)",
                "Brazil (amazon.com.br)",
                "Mexico (amazon.com.mx)",
                "Canada (amazon.ca)",
                "South Africa (amazon.co.za)",
                "Ireland (amazon.ie)"
              ]
            },
            "default": [
              "amazon.com"
            ]
          },
          "rootDepartments": {
            "title": "Root departments (optional)",
            "type": "array",
            "description": "Limit `marketplace` or `department` mode to these top-level departments. Accepts department names (localized or English), bestsellers slugs, or department URLs. Empty means every root department.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "nodeIds": {
            "title": "Browse node IDs or category URLs",
            "type": "array",
            "description": "Start nodes for `node` mode: numeric browse-node IDs, bestsellers/chart URLs, or slug paths such as `electronics/172541`. Each entry is mapped downward to `maxDepth`.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "maxDepth": {
            "title": "Maximum depth",
            "minimum": 0,
            "maximum": 6,
            "type": "integer",
            "description": "How many child levels to follow below each start. 0 = only the start category (root departments in marketplace/department mode). Each deeper level costs one page per category.",
            "default": 2
          },
          "maxNodes": {
            "title": "Maximum category nodes",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Hard cap on category rows saved in this run. The run stops cleanly at this limit.",
            "default": 500
          },
          "includeChartUrls": {
            "title": "Include chart URLs",
            "type": "boolean",
            "description": "Add Best Sellers, New Releases, Most Wished For, Most Gifted and Movers & Shakers URLs for every node.",
            "default": true
          },
          "includeSearchUrl": {
            "title": "Include search URLs",
            "type": "boolean",
            "description": "Add a marketplace search URL for every node, scoped to its browse node where possible.",
            "default": true
          },
          "includeSearchAlias": {
            "title": "Include department search alias",
            "type": "boolean",
            "description": "Add the department `search-alias` (the `i=` value) inherited from the root department, plus a search URL that uses it.",
            "default": true
          },
          "includeProductCounts": {
            "title": "Include product counts",
            "type": "boolean",
            "description": "Fetch each node's search results bar for an approximate product count. Slower; Amazon does not render a count for every node, so missing counts are omitted rather than guessed.",
            "default": false
          },
          "maxProductCounts": {
            "title": "Maximum product-count lookups",
            "minimum": 0,
            "maximum": 500,
            "type": "integer",
            "description": "Cap on extra search-page fetches used for product counts when `includeProductCounts` is on.",
            "default": 25
          },
          "includeEnglishNames": {
            "title": "Include English names",
            "type": "boolean",
            "description": "For non-English marketplaces, fetch each node's English page and add `englishName` when Amazon translates the category. Unsupported locales keep the localized name only.",
            "default": false
          },
          "resolveRootIds": {
            "title": "Resolve missing root node IDs",
            "type": "boolean",
            "description": "Some top-level chart roots do not expose a numeric browse-node ID on their own page. When enabled, make one bounded search-page lookup per unresolved root to recover it.",
            "default": true
          },
          "maxRootIdLookups": {
            "title": "Maximum root-ID lookups",
            "minimum": 0,
            "maximum": 200,
            "type": "integer",
            "description": "Cap on extra search-page fetches used to resolve missing root browse-node IDs.",
            "default": 25
          },
          "requestDelayMs": {
            "title": "Delay between requests (ms)",
            "minimum": 0,
            "maximum": 5000,
            "type": "integer",
            "description": "Extra wait after each page load. A small delay keeps long taxonomy walks polite.",
            "default": 400
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Apify proxy used to load Amazon pages. AUTO datacenter is used by default, pinned to the marketplace country; no proxy setup is needed.",
            "default": {
              "useApifyProxy": true
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}