{
  "openapi": "3.0.1",
  "info": {
    "title": "🗂️ Product Taxonomy Classifier - Deep Category Trees",
    "description": "⚡ Classify thousands of products into a deep, multi-level category tree with no LLM. ✅ Walks the taxonomy level by level so every path is internally consistent, scores with TF-IDF-ish cosine + token overlap + trigram similarity, and routes low-confidence items to a review queue instead of.",
    "version": "1.0",
    "x-build-id": "dYtkpVQigPQJfTYW4"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/that_red_bird~product-taxonomy-classifier/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-that_red_bird-product-taxonomy-classifier",
        "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/that_red_bird~product-taxonomy-classifier/runs": {
      "post": {
        "operationId": "runs-sync-that_red_bird-product-taxonomy-classifier",
        "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/that_red_bird~product-taxonomy-classifier/run-sync": {
      "post": {
        "operationId": "run-sync-that_red_bird-product-taxonomy-classifier",
        "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": [
          "taxonomy"
        ],
        "properties": {
          "products": {
            "title": "Products",
            "type": "array",
            "description": "The products to classify, as an array of flat objects with a title, description and/or tags. Combine freely with productDatasetIds.",
            "default": [
              {
                "title": "Sony WH-1000XM5 Wireless Noise Cancelling Headphones",
                "description": "Over-ear Bluetooth headphones with active noise cancellation",
                "tags": [
                  "audio",
                  "wireless",
                  "bluetooth"
                ]
              },
              {
                "title": "KitchenAid 5-Quart Stand Mixer",
                "description": "Countertop mixer for baking with dough hook and whisk attachments",
                "tags": [
                  "kitchen",
                  "baking"
                ]
              },
              {
                "title": "Nike Air Zoom Pegasus Running Shoes",
                "description": "Men's lightweight running shoes with breathable mesh upper",
                "tags": [
                  "footwear",
                  "running"
                ]
              }
            ]
          },
          "productDatasetIds": {
            "title": "Product dataset IDs",
            "type": "array",
            "description": "Apify dataset IDs to pull products from, in addition to (or instead of) the inline products list.",
            "items": {
              "type": "string"
            }
          },
          "taxonomy": {
            "title": "Category taxonomy",
            "type": "array",
            "description": "Your category tree. Either an array of path strings (\"Electronics > Audio > Headphones\") or a nested tree of {\"name\":\"Electronics\",\"keywords\":[...],\"children\":[...]} objects. Shapes can be mixed. Classification is always constrained level by level to the accepted parent's own children.",
            "default": [
              "Electronics > Audio > Headphones",
              "Electronics > Audio > Speakers",
              "Home & Kitchen > Small Appliances > Mixers",
              "Home & Kitchen > Small Appliances > Blenders",
              "Clothing & Shoes > Footwear > Running Shoes",
              "Clothing & Shoes > Footwear > Boots"
            ]
          },
          "keywordHints": {
            "title": "Keyword hints per category",
            "type": "object",
            "description": "Optional extra keywords to boost specific categories, keyed by full category path or by bare category name, e.g. {\"Electronics > Audio > Headphones\": [\"earbuds\", \"anc\", \"over-ear\"]}. Merged with each category's own name for scoring."
          },
          "idField": {
            "title": "Product ID field",
            "type": "string",
            "description": "Field on each product to use as its output ID. Defaults to an auto-generated P000001-style ID when omitted or blank."
          },
          "titleField": {
            "title": "Title field",
            "type": "string",
            "description": "Field holding the product's title/name. Carries the strongest classification signal.",
            "default": "title"
          },
          "descriptionField": {
            "title": "Description field",
            "type": "string",
            "description": "Field holding the product's longer description text.",
            "default": "description"
          },
          "tagsField": {
            "title": "Tags field",
            "type": "string",
            "description": "Field holding curated tags/attributes (string or array). Weighted between title and description.",
            "default": "tags"
          },
          "reviewBelow": {
            "title": "Review below (0-100)",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "If the best-matching category at any level scores below this confidence, the product stops there and is sent to the review queue instead of being forced into a low-confidence guess. Expressed 0-100; 55 means 0.55.",
            "default": 55
          },
          "tfidfWeight": {
            "title": "TF-IDF weight",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Relative weight of TF-IDF-ish cosine similarity in the score. Weights are normalized against overlapWeight and trigramWeight, so only the ratio between them matters.",
            "default": 50
          },
          "overlapWeight": {
            "title": "Token overlap weight",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Relative weight of how much of a category's own vocabulary (name + keywords + hints) is found in the product text.",
            "default": 30
          },
          "trigramWeight": {
            "title": "Trigram similarity weight",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Relative weight of character-trigram Dice similarity, which tolerates typos and word-order drift that token matching misses.",
            "default": 20
          },
          "includeCategoryCounts": {
            "title": "Include per-category counts",
            "type": "boolean",
            "description": "Emit one row per used category with how many products landed there.",
            "default": true
          },
          "includeReviewItems": {
            "title": "Include review-queue items",
            "type": "boolean",
            "description": "Emit rows for products that could not be confidently classified, with the reason and the top candidate categories that were considered.",
            "default": 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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}