{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "request_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "tool": {
      "type": "string",
      "enum": ["people_search", "company_search"]
    },
    "result_count": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    },
    "people": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "name": {
            "type": ["string", "null"]
          },
          "jobTitle": {
            "type": ["string", "null"]
          },
          "company": {
            "type": ["string", "null"]
          },
          "companyDomain": {
            "type": ["string", "null"]
          },
          "location": {
            "type": ["string", "null"]
          },
          "linkedinUrl": {
            "type": ["string", "null"]
          },
          "sourceUrl": {
            "type": ["string", "null"]
          },
          "matchReason": {
            "type": ["string", "null"]
          },
          "bio": {
            "type": ["string", "null"]
          },
          "school": {
            "type": ["string", "null"]
          },
          "major": {
            "type": ["string", "null"]
          },
          "graduationYear": {
            "type": ["number", "null"]
          },
          "workHistory": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "title": {
                      "type": ["string", "null"]
                    },
                    "company": {
                      "type": ["string", "null"]
                    },
                    "companyDomain": {
                      "type": ["string", "null"]
                    },
                    "institution": {
                      "type": ["string", "null"]
                    },
                    "institutionDomain": {
                      "type": ["string", "null"]
                    },
                    "location": {
                      "type": ["string", "null"]
                    },
                    "dateFrom": {
                      "type": ["string", "null"]
                    },
                    "dateTo": {
                      "type": ["string", "null"]
                    }
                  },
                  "additionalProperties": false
                }
              },
              {
                "type": "null"
              }
            ]
          },
          "educationHistory": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "title": {
                      "type": ["string", "null"]
                    },
                    "company": {
                      "type": ["string", "null"]
                    },
                    "companyDomain": {
                      "type": ["string", "null"]
                    },
                    "institution": {
                      "type": ["string", "null"]
                    },
                    "institutionDomain": {
                      "type": ["string", "null"]
                    },
                    "location": {
                      "type": ["string", "null"]
                    },
                    "dateFrom": {
                      "type": ["string", "null"]
                    },
                    "dateTo": {
                      "type": ["string", "null"]
                    }
                  },
                  "additionalProperties": false
                }
              },
              {
                "type": "null"
              }
            ]
          },
          "clubs": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "null"
              }
            ]
          },
          "sports": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "null"
              }
            ]
          },
          "interests": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "additionalProperties": false
      }
    },
    "companies": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "name": {
            "type": ["string", "null"]
          },
          "domain": {
            "type": ["string", "null"]
          },
          "websiteUrl": {
            "type": ["string", "null"]
          },
          "linkedinUrl": {
            "type": ["string", "null"]
          },
          "industry": {
            "type": ["string", "null"]
          },
          "companyType": {
            "type": ["string", "null"]
          },
          "headquarters": {
            "type": ["string", "null"]
          },
          "headquartersCountry": {
            "type": ["string", "null"]
          },
          "foundedYear": {
            "type": ["string", "null"]
          },
          "employees": {
            "type": ["string", "null"]
          },
          "funding": {
            "type": ["string", "null"]
          },
          "fundingStage": {
            "type": ["string", "null"]
          },
          "revenue": {
            "type": ["string", "null"]
          },
          "description": {
            "type": ["string", "null"]
          },
          "sourceUrl": {
            "type": ["string", "null"]
          },
          "sourceTitle": {
            "type": ["string", "null"]
          },
          "publishedDate": {
            "type": ["string", "null"]
          },
          "matchReason": {
            "type": ["string", "null"]
          },
          "employeeCount": {
            "type": ["number", "null"]
          },
          "technographics": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "null"
              }
            ]
          },
          "categories": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "additionalProperties": false
      }
    },
    "search_results": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "url": {
            "type": ["string", "null"]
          },
          "title": {
            "type": ["string", "null"]
          },
          "publishedDate": {
            "type": ["string", "null"]
          }
        },
        "additionalProperties": false
      }
    },
    "citations": {
      "type": "array",
      "items": {
        "type": "string",
        "format": "uri"
      }
    }
  },
  "required": [
    "request_id",
    "tool",
    "result_count",
    "people",
    "companies",
    "search_results",
    "citations"
  ],
  "additionalProperties": false
}
