{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/companyenrich/json-schema/companyenrich-company-response-schema.json",
  "title": "CompanyResponse",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/companyenrich-openapi.json#/components/schemas/CompanyResponse",
  "required": [
    "id",
    "domain",
    "website",
    "logoUrl",
    "updatedAt"
  ],
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "The CompanyEnrich ID of the company",
      "format": "uuid"
    },
    "name": {
      "type": [
        "string",
        "null"
      ],
      "description": "The company name"
    },
    "legalName": {
      "type": [
        "string",
        "null"
      ],
      "description": "The legal name of the company"
    },
    "domain": {
      "type": "string",
      "description": "The primary domain of the company"
    },
    "website": {
      "type": "string",
      "description": "The company website URL"
    },
    "logoUrl": {
      "type": "string",
      "description": "The company logo URL"
    },
    "description": {
      "type": [
        "string",
        "null"
      ],
      "description": "The company description"
    },
    "type": {
      "$ref": "#/$defs/NullableOfCompanyType"
    },
    "foundedYear": {
      "type": [
        "integer",
        "null"
      ],
      "description": "The year the company was founded",
      "format": "int32"
    },
    "employees": {
      "$ref": "#/$defs/NullableOfCompanyEmployees"
    },
    "revenue": {
      "$ref": "#/$defs/NullableOfCompanyRevenue"
    },
    "industry": {
      "type": [
        "string",
        "null"
      ],
      "description": "The primary industry of the company"
    },
    "industries": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": "string"
      },
      "description": "The industries associated with the company"
    },
    "categories": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "$ref": "#/$defs/CompanyCategory"
      },
      "description": "The categories associated with the company, from most to least specific"
    },
    "location": {
      "$ref": "#/$defs/CompanyLocationResponse"
    },
    "socials": {
      "$ref": "#/$defs/CompanySocialsResponse"
    },
    "updatedAt": {
      "type": "string",
      "description": "When the company data was last updated",
      "format": "date-time"
    },
    "financial": {
      "$ref": "#/$defs/CompanyFinancialResponse"
    },
    "keywords": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": "string"
      },
      "description": "Keywords associated with the company. Included when `keywords` is requested in `expand`."
    },
    "naicsCodes": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": "string"
      },
      "description": "The NAICS codes associated with the company. Included when `naicsCodes` is requested in `expand`."
    },
    "technologies": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": "string"
      },
      "description": "Technologies used by the company. Included when `technologies` is requested in `expand`."
    },
    "workforce": {
      "$ref": "#/$defs/CompanyWorkforceResponse"
    }
  },
  "$defs": {
    "CompanyCategory": {
      "enum": [
        "b2b",
        "b2c",
        "b2g",
        "e-commerce",
        "media",
        "service-provider",
        "mobile",
        "saas",
        "local-business"
      ]
    },
    "CompanyCityResponse": {
      "required": [
        "id",
        "name"
      ],
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "id": {
          "type": "integer",
          "description": "The CompanyEnrich city ID",
          "format": "int32"
        },
        "name": {
          "type": "string",
          "description": "The city name"
        }
      },
      "description": "The city where the company is located"
    },
    "CompanyCountryResponse": {
      "required": [
        "code",
        "name"
      ],
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "code": {
          "type": "string",
          "description": "The ISO 3166-1 alpha-2 country code"
        },
        "name": {
          "type": "string",
          "description": "The country name"
        }
      },
      "description": "The country where the company is located"
    },
    "CompanyFinancialResponse": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "stockSymbol": {
          "type": [
            "string",
            "null"
          ],
          "description": "The company stock symbol"
        },
        "stockExchange": {
          "type": [
            "string",
            "null"
          ],
          "description": "The stock exchange where the company is listed"
        },
        "totalFunding": {
          "type": [
            "integer",
            "null"
          ],
          "description": "The total disclosed funding in USD",
          "format": "int64"
        },
        "fundingStage": {
          "type": [
            "string",
            "null"
          ],
          "description": "The latest funding stage"
        },
        "fundingDate": {
          "type": [
            "string",
            "null"
          ],
          "description": "The date of the latest funding round",
          "format": "date-time"
        },
        "fundingRounds": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "$ref": "#/$defs/CompanyFundingRoundResponse"
          },
          "description": "The company's disclosed funding rounds"
        }
      },
      "description": "Financial and funding data. Included when `financial` is requested in `expand`."
    },
    "CompanyFundingRoundResponse": {
      "type": "object",
      "properties": {
        "date": {
          "type": [
            "string",
            "null"
          ],
          "description": "The funding round date",
          "format": "date-time"
        },
        "amount": {
          "type": [
            "string",
            "null"
          ],
          "description": "The disclosed funding amount and currency"
        },
        "type": {
          "type": [
            "string",
            "null"
          ],
          "description": "The funding round type"
        },
        "url": {
          "type": [
            "string",
            "null"
          ],
          "description": "A source URL for the funding round"
        },
        "investors": {
          "type": [
            "string",
            "null"
          ],
          "description": "The disclosed investors"
        }
      }
    },
    "CompanyLocationResponse": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "country": {
          "$ref": "#/$defs/CompanyCountryResponse"
        },
        "state": {
          "$ref": "#/$defs/CompanyStateResponse"
        },
        "city": {
          "$ref": "#/$defs/CompanyCityResponse"
        },
        "address": {
          "type": [
            "string",
            "null"
          ],
          "description": "The company street address"
        },
        "postalCode": {
          "type": [
            "string",
            "null"
          ],
          "description": "The company postal code"
        },
        "phone": {
          "type": [
            "string",
            "null"
          ],
          "description": "The company phone number"
        }
      },
      "description": "The company location and contact details"
    },
    "CompanySocialsResponse": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "linkedinUrl": {
          "type": [
            "string",
            "null"
          ],
          "description": "The company LinkedIn URL"
        },
        "linkedinId": {
          "type": [
            "string",
            "null"
          ],
          "description": "The company LinkedIn ID"
        },
        "twitterUrl": {
          "type": [
            "string",
            "null"
          ],
          "description": "The company Twitter/X URL"
        },
        "facebookUrl": {
          "type": [
            "string",
            "null"
          ],
          "description": "The company Facebook URL"
        },
        "instagramUrl": {
          "type": [
            "string",
            "null"
          ],
          "description": "The company Instagram URL"
        },
        "angellistUrl": {
          "type": [
            "string",
            "null"
          ],
          "description": "The company AngelList URL"
        },
        "crunchbaseUrl": {
          "type": [
            "string",
            "null"
          ],
          "description": "The company Crunchbase URL"
        },
        "youtubeUrl": {
          "type": [
            "string",
            "null"
          ],
          "description": "The company YouTube URL"
        },
        "githubUrl": {
          "type": [
            "string",
            "null"
          ],
          "description": "The company GitHub URL"
        },
        "g2Url": {
          "type": [
            "string",
            "null"
          ],
          "description": "The company G2 URL"
        }
      },
      "description": "The company social profiles"
    },
    "CompanyStateResponse": {
      "required": [
        "id",
        "name"
      ],
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "id": {
          "type": "integer",
          "description": "The CompanyEnrich state ID",
          "format": "int32"
        },
        "name": {
          "type": "string",
          "description": "The state or province name"
        },
        "code": {
          "type": [
            "string",
            "null"
          ],
          "description": "The ISO 3166-2 subdivision code"
        }
      },
      "description": "The state or province where the company is located"
    },
    "CompanyWorkforceDepartmentResponse": {
      "type": "object",
      "properties": {
        "cSuite": {
          "type": [
            "integer",
            "null"
          ],
          "description": "Observed c-suite headcount",
          "format": "int32"
        },
        "productManagement": {
          "type": [
            "integer",
            "null"
          ],
          "description": "Observed product management headcount",
          "format": "int32"
        },
        "engineeringTechnical": {
          "type": [
            "integer",
            "null"
          ],
          "description": "Observed engineering and technical headcount",
          "format": "int32"
        },
        "design": {
          "type": [
            "integer",
            "null"
          ],
          "description": "Observed design headcount",
          "format": "int32"
        },
        "education": {
          "type": [
            "integer",
            "null"
          ],
          "description": "Observed education headcount",
          "format": "int32"
        },
        "finance": {
          "type": [
            "integer",
            "null"
          ],
          "description": "Observed finance headcount",
          "format": "int32"
        },
        "humanResources": {
          "type": [
            "integer",
            "null"
          ],
          "description": "Observed human resources headcount",
          "format": "int32"
        },
        "informationTechnology": {
          "type": [
            "integer",
            "null"
          ],
          "description": "Observed information technology headcount",
          "format": "int32"
        },
        "legal": {
          "type": [
            "integer",
            "null"
          ],
          "description": "Observed legal headcount",
          "format": "int32"
        },
        "marketing": {
          "type": [
            "integer",
            "null"
          ],
          "description": "Observed marketing headcount",
          "format": "int32"
        },
        "medicalHealth": {
          "type": [
            "integer",
            "null"
          ],
          "description": "Observed medical and health headcount",
          "format": "int32"
        },
        "operations": {
          "type": [
            "integer",
            "null"
          ],
          "description": "Observed operations headcount",
          "format": "int32"
        },
        "sales": {
          "type": [
            "integer",
            "null"
          ],
          "description": "Observed sales headcount",
          "format": "int32"
        },
        "consulting": {
          "type": [
            "integer",
            "null"
          ],
          "description": "Observed consulting headcount",
          "format": "int32"
        }
      },
      "description": "Observed headcount grouped by department"
    },
    "CompanyWorkforceHistoryResponse": {
      "required": [
        "date",
        "observedEmployeeCount",
        "departmentHeadcount",
        "unclassifiedHeadcount"
      ],
      "type": "object",
      "properties": {
        "date": {
          "type": "string",
          "description": "The first day of the snapshot month",
          "format": "date"
        },
        "observedEmployeeCount": {
          "type": "integer",
          "description": "The observed number of distinct employees in the people dataset",
          "format": "int32"
        },
        "employeeCountRange": {
          "$ref": "#/$defs/NullableOfCompanyEmployees"
        },
        "departmentHeadcount": {
          "$ref": "#/$defs/CompanyWorkforceDepartmentResponse"
        },
        "unclassifiedHeadcount": {
          "type": "integer",
          "description": "Observed headcount that could not be classified by department",
          "format": "int32"
        }
      }
    },
    "CompanyWorkforceResponse": {
      "required": [
        "companyId",
        "domain",
        "observedEmployeeCount",
        "departmentHeadcount",
        "unclassifiedHeadcount",
        "historyFrom",
        "historyTo"
      ],
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "companyId": {
          "type": "string",
          "description": "The CompanyEnrich ID of the company",
          "format": "uuid"
        },
        "domain": {
          "type": "string",
          "description": "The canonical company domain"
        },
        "observedEmployeeCount": {
          "type": "integer",
          "description": "The observed number of distinct current employees in the people dataset",
          "format": "int32"
        },
        "employeeCountRange": {
          "$ref": "#/$defs/NullableOfCompanyEmployees"
        },
        "departmentHeadcount": {
          "$ref": "#/$defs/CompanyWorkforceDepartmentResponse"
        },
        "unclassifiedHeadcount": {
          "type": "integer",
          "description": "Observed headcount that could not be classified by department",
          "format": "int32"
        },
        "historyFrom": {
          "type": "string",
          "description": "The inclusive first month of the returned 12-month history window",
          "format": "date"
        },
        "historyTo": {
          "type": "string",
          "description": "The exclusive end of the returned 12-month history window",
          "format": "date"
        },
        "history": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "$ref": "#/$defs/CompanyWorkforceHistoryResponse"
          },
          "description": "Workforce change points within the history window, newest first. A point at the start carries forward the last known earlier headcount when available."
        },
        "nextCursor": {
          "type": [
            "string",
            "null"
          ],
          "description": "Pass this cursor with the company ID or domain to GET /v2/companies/workforce to fetch the preceding year for 1 credit. Omitted when no older history is available. Expires 30 minutes after the first page."
        }
      },
      "description": "Workforce insights. Included when `workforce` is requested in `expand`."
    },
    "NullableOfCompanyEmployees": {
      "enum": [
        "1-10",
        "11-50",
        "51-200",
        "201-500",
        "501-1K",
        "1K-5K",
        "5K-10K",
        "over-10K",
        null
      ],
      "description": "The estimated employee count range",
      "nullable": true
    },
    "NullableOfCompanyRevenue": {
      "enum": [
        "under-1m",
        "1m-10m",
        "10m-50m",
        "50m-100m",
        "100m-200m",
        "200m-1b",
        "over-1b",
        null
      ],
      "description": "The estimated annual revenue range in USD",
      "nullable": true
    },
    "NullableOfCompanyType": {
      "enum": [
        "private",
        "public",
        "self-employed",
        "self-owned",
        "partnership",
        "nonprofit",
        "educational",
        "government",
        null
      ],
      "description": "The company type",
      "nullable": true
    }
  }
}