{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/arkova-ai/json-schema/arkova-ai-public-search-response-schema.json",
  "title": "PublicSearchResponse",
  "x-generated": "2026-11-01",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/arkova-ai-openapi.json#/components/schemas/PublicSearchResponse",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "query",
    "type",
    "results",
    "total",
    "unavailable"
  ],
  "properties": {
    "query": {
      "type": "string"
    },
    "type": {
      "type": "string",
      "enum": [
        "all",
        "orgs",
        "members",
        "anchors",
        "imports"
      ]
    },
    "results": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "orgs",
        "members",
        "anchors",
        "imports"
      ],
      "properties": {
        "orgs": {
          "type": "array",
          "items": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "public_id",
              "display_name",
              "verified",
              "credential_count",
              "profile_url"
            ],
            "properties": {
              "public_id": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "display_name": {
                "type": "string"
              },
              "verified": {
                "type": "boolean"
              },
              "credential_count": {
                "type": "integer",
                "minimum": 0
              },
              "profile_url": {
                "type": "string",
                "format": "uri",
                "description": "Public issuer page."
              }
            }
          }
        },
        "members": {
          "type": "array",
          "items": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "public_id",
              "display_name",
              "headline",
              "avatar_url",
              "organization_name",
              "organization_public_id",
              "profile_url"
            ],
            "properties": {
              "public_id": {
                "type": "string"
              },
              "display_name": {
                "type": "string"
              },
              "headline": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "avatar_url": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "organization_name": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "organization_public_id": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "profile_url": {
                "type": "string",
                "format": "uri",
                "description": "Public member profile page."
              }
            }
          }
        },
        "anchors": {
          "type": "array",
          "items": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "public_id",
              "title",
              "credential_type",
              "status",
              "created_at",
              "verify_url"
            ],
            "properties": {
              "public_id": {
                "type": "string"
              },
              "title": {
                "type": "string"
              },
              "credential_type": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "status": {
                "type": "string"
              },
              "created_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "verify_url": {
                "type": "string",
                "format": "uri",
                "description": "Public record verification page."
              }
            }
          }
        },
        "imports": {
          "type": "array",
          "items": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "public_id",
              "title",
              "source",
              "record_type",
              "source_url",
              "secured_at",
              "verify_url"
            ],
            "properties": {
              "public_id": {
                "type": "string"
              },
              "title": {
                "type": "string"
              },
              "source": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Public-record pipeline source key, e.g. edgar, uspto."
              },
              "record_type": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "source_url": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Original public source page."
              },
              "secured_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time",
                "description": "Network Observed Time."
              },
              "verify_url": {
                "type": "string",
                "format": "uri",
                "description": "Public record verification page."
              }
            }
          }
        }
      }
    },
    "total": {
      "type": "integer",
      "minimum": 0,
      "description": "Sum of all group lengths."
    },
    "unavailable": {
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "orgs",
          "members",
          "anchors",
          "imports"
        ]
      },
      "description": "Groups whose backend failed for this request (returned empty)."
    }
  }
}