{
  "openapi": "3.0.1",
  "info": {
    "title": "🏭 Industry Classifier - NAICS & SIC Code Assignment",
    "description": "⚡ Assign a company a NAICS and/or SIC industry code with confidence and evidence, no LLM. ✅ Walks an embedded sector-then-detail code tree, scores with TF-IDF + phrase hits, and uses negative keywords so \"SaaS for dentists\" lands in software, not dentistry.",
    "version": "1.0",
    "x-build-id": "sr9f0OYyFeaX0hU3R"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/that_red_bird~industry-classifier/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-that_red_bird-industry-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~industry-classifier/runs": {
      "post": {
        "operationId": "runs-sync-that_red_bird-industry-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~industry-classifier/run-sync": {
      "post": {
        "operationId": "run-sync-that_red_bird-industry-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",
        "properties": {
          "companies": {
            "title": "Companies",
            "type": "array",
            "description": "The companies to classify, as an array of flat objects with a name, description/tags, and/or a url. Combine freely with companyDatasetIds.",
            "default": [
              {
                "name": "Bright Smile Dental Clinic",
                "description": "A friendly dental clinic offering checkups, cleanings, and orthodontist services for the whole family.",
                "tags": [
                  "dental",
                  "healthcare"
                ]
              },
              {
                "name": "DentaFlow",
                "description": "SaaS practice management software platform for dentists and dental clinics, built as a cloud app with an API.",
                "tags": [
                  "software",
                  "saas"
                ]
              },
              {
                "name": "Joe's Diner",
                "description": "A full-service, sit-down restaurant serving breakfast, lunch and dinner off a bistro menu.",
                "tags": [
                  "restaurant"
                ]
              }
            ]
          },
          "companyDatasetIds": {
            "title": "Company dataset IDs",
            "type": "array",
            "description": "Apify dataset IDs to pull companies from, in addition to (or instead of) the inline companies list.",
            "items": {
              "type": "string"
            }
          },
          "fetchSite": {
            "title": "Fetch each company's website",
            "type": "boolean",
            "description": "If true, fetch the page at each company's url field and append its meta description + visible text to the description before classifying. If false (default), classification uses only the text you already supplied.",
            "default": false
          },
          "nameField": {
            "title": "Name field",
            "type": "string",
            "description": "Field holding the company's name. Carries the strongest classification signal.",
            "default": "name"
          },
          "descriptionField": {
            "title": "Description field",
            "type": "string",
            "description": "Field holding the company's longer description text (what fetched site text, if any, is appended to).",
            "default": "description"
          },
          "tagsField": {
            "title": "Tags field",
            "type": "string",
            "description": "Field holding curated tags/keywords (string or array). Weighted between name and description.",
            "default": "tags"
          },
          "urlField": {
            "title": "URL field",
            "type": "string",
            "description": "Field holding the company's website URL, used only when fetchSite is true.",
            "default": "url"
          },
          "idField": {
            "title": "Company ID field",
            "type": "string",
            "description": "Field on each company to use as its output ID. Defaults to an auto-generated C000001-style ID when omitted or blank."
          },
          "reviewBelow": {
            "title": "Review below (0-100)",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "If the best-matching sector, or the best-matching detail code within the accepted sector, scores below this confidence, classification stops there and the company is sent to the review queue instead of a forced guess. Expressed 0-100; 55 means 0.55.",
            "default": 55
          },
          "negativePenalty": {
            "title": "Negative keyword penalty (0-100)",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "How hard a matched negative keyword (e.g. \"software\"/\"saas\" on Offices of Dentists) crushes that code's score. 0 disables negative keywords entirely; 100 zeroes the score outright the moment one is found. Expressed 0-100; 80 means the score is multiplied by 0.2.",
            "default": 80
          },
          "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 the other three weights, so only the ratio between them matters.",
            "default": 40
          },
          "overlapWeight": {
            "title": "Token overlap weight",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Relative weight of how much of a code's own vocabulary (title + keywords) is found in the company text.",
            "default": 25
          },
          "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": 15
          },
          "phraseWeight": {
            "title": "Phrase-hit weight",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Relative weight of exact multi-word keyword-phrase matches (e.g. \"point of sale\", \"custom software development\") — the strongest single signal when it fires, and what is surfaced back to you as evidence.",
            "default": 20
          },
          "fetchTimeoutSecs": {
            "title": "Site fetch timeout (seconds)",
            "minimum": 5,
            "maximum": 120,
            "type": "integer",
            "description": "Timeout per company website fetch, only used when fetchSite is true.",
            "default": 30
          },
          "includeSicCrosswalk": {
            "title": "Include SIC crosswalk",
            "type": "boolean",
            "description": "Include the approximate crosswalked SIC code(s) alongside the NAICS detail code on each classified row.",
            "default": true
          },
          "includeReviewItems": {
            "title": "Include review-queue items",
            "type": "boolean",
            "description": "Emit rows for companies that could not be confidently classified, with the reason and the top candidate sectors/codes 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}