{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/sgpdirectory-com/json-schema/sgpdirectory-com-search-entities-response-schema.json",
  "title": "SearchEntitiesResponse",
  "x-generated": "2026-10-30",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_original/sgpdirectory-com-api-openapi.json#/components/schemas/SearchEntitiesResponse",
  "type": "object",
  "properties": {
    "data": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "uen": {
            "type": "string",
            "description": "Unique Entity Number"
          },
          "entity_name": {
            "type": "string",
            "description": "Name of the entity"
          },
          "entity_slug": {
            "type": "string",
            "description": "URL-friendly unique slug for the entity"
          },
          "entity_type": {
            "type": "string",
            "description": "Type of entity (e.g., PRIVATE COMPANY LIMITED BY SHARES)"
          },
          "entity_status": {
            "type": "string",
            "description": "Current status (e.g., Live, Struck Off)"
          },
          "registration_date": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "description": "Date of registration (YYYY-MM-DD)"
          },
          "primary_industry_section": {
            "type": "string",
            "description": "Primary SSIC industry section code"
          },
          "primary_industry_description": {
            "type": "string",
            "description": "Description of primary industry"
          },
          "primary_ssic_code": {
            "type": "string",
            "description": "Primary SSIC code"
          },
          "primary_ssic_description": {
            "type": "string",
            "description": "Primary SSIC description"
          }
        },
        "required": [
          "uen",
          "entity_name"
        ],
        "additionalProperties": false
      },
      "description": "Array of matching entities for the requested page"
    },
    "count": {
      "type": "number",
      "description": "Total number of entities matching the query across all pages (use with limit and page for pagination)"
    }
  },
  "required": [
    "data",
    "count"
  ],
  "additionalProperties": false
}