{
  "openapi": "3.0.1",
  "info": {
    "title": "Company Name Normalizer & Deduplicator for CRM",
    "description": "Normalize messy company names and group duplicates in your CRM, leads or vendor lists. Strips Inc, LLC, Ltd and GmbH, splits d/b/a names, fixes caps, punctuation and common aliases (IBM, P&G), and returns a clean name, canonical key, legal form and duplicate group ID per row.",
    "version": "0.1",
    "x-build-id": "ApWFYX4j46zroWAiW"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/ultimatemc~company-name-canonicalizer/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-ultimatemc-company-name-canonicalizer",
        "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/ultimatemc~company-name-canonicalizer/runs": {
      "post": {
        "operationId": "runs-sync-ultimatemc-company-name-canonicalizer",
        "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/ultimatemc~company-name-canonicalizer/run-sync": {
      "post": {
        "operationId": "run-sync-ultimatemc-company-name-canonicalizer",
        "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": {
          "names": {
            "title": "Company names",
            "type": "array",
            "description": "One company name per line, as messy as you have them. The prefill has ten examples; replace them with your own list.",
            "items": {
              "type": "string"
            }
          },
          "records": {
            "title": "Records (optional)",
            "type": "array",
            "description": "Objects with an \"id\" and a company name field (companyName, company, employer, organization, businessName, vendor, name ... detected automatically, or set Name field). The whole record is copied to the output under \"record\"."
          },
          "datasetId": {
            "title": "Dataset ID (optional)",
            "type": "string",
            "description": "Apify dataset to clean, for example the output of a leads, jobs or Google Maps scraper. The company name field is detected automatically; override with Name field."
          },
          "nameField": {
            "title": "Name field (optional)",
            "type": "string",
            "description": "Field holding the company name in records or dataset items, e.g. \"companyName\" or \"employer\". Leave empty to detect it."
          },
          "groupDuplicates": {
            "title": "Group duplicates",
            "type": "boolean",
            "description": "Give names that normalize to the same company the same groupId (exact canonical key, known aliases, and spacing or plural variants like 'HospiceMD' / 'Hospice MD').",
            "default": true
          },
          "fuzzyTypos": {
            "title": "Also group typos (fuzzy)",
            "type": "boolean",
            "description": "Also group names that differ by one or two letters ('Deloite' / 'Deloitte'). Catches typos, but can join different companies with similar names ('Computek' / 'Computer'), so review rows where matchMethod starts with 'fuzzy'. Off by default.",
            "default": false
          },
          "fuzzyThreshold": {
            "title": "Fuzzy similarity threshold",
            "minimum": 0.8,
            "maximum": 1,
            "type": "number",
            "description": "Minimum similarity (0-1) for typo grouping. Higher is stricter.",
            "default": 0.92
          },
          "expandAbbreviations": {
            "title": "Expand abbreviations",
            "type": "boolean",
            "description": "In the canonical key, expand Intl, Mfg, Svcs, Assoc, Bros, Natl, Mgmt, St./Mt. at the start and similar, so 'Acme Intl Mfg' matches 'Acme International Manufacturing'. The cleaned display name keeps your wording.",
            "default": true
          },
          "stripStoreNumbers": {
            "title": "Remove store / location numbers",
            "type": "boolean",
            "description": "Remove trailing '#1234', 'Store 55' or 'Location 3' so branches group with the brand.",
            "default": true
          },
          "stripCountryQualifiers": {
            "title": "Remove country qualifiers",
            "type": "boolean",
            "description": "Remove a trailing US / USA / NA / North America / UK / Canada / India qualifier from the key ('Deel US LLC' = 'Deel Inc'), except in names like 'Bank of America' or 'BMW of North America'.",
            "default": true
          },
          "aliases": {
            "title": "Your aliases (optional)",
            "type": "object",
            "description": "Extra alias -> canonical name pairs, e.g. {\"Big Blue\": \"International Business Machines\", \"MSFT\": \"Microsoft\"}. Added to the built-in list of common aliases."
          },
          "outputMode": {
            "title": "Output",
            "enum": [
              "allRows",
              "onePerGroup"
            ],
            "type": "string",
            "description": "All rows (one result per input name, with its group) or one row per group (deduplicated list; you pay only for those rows).",
            "default": "allRows"
          },
          "includeOriginal": {
            "title": "Copy original record",
            "type": "boolean",
            "description": "For records and dataset items, copy the original item into the output field \"record\".",
            "default": true
          },
          "maxItems": {
            "title": "Max names",
            "minimum": 1,
            "maximum": 200000,
            "type": "integer",
            "description": "Maximum number of names to process in this run (grouping happens across all of them).",
            "default": 10000
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}