{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/clay953f/json-schema/clay953f-next-query-mode-results-response-schema.json",
  "title": "NextQueryModeResultsResponse",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/clay953f-search-api-openapi.yml#/components/schemas/NextQueryModeResultsResponse",
  "oneOf": [
    {
      "$ref": "#/$defs/NextQueryModePeopleResultsResponse"
    },
    {
      "$ref": "#/$defs/NextQueryModeCompanyResultsResponse"
    }
  ],
  "$defs": {
    "NextQueryModeCompanyResultsResponse": {
      "additionalProperties": false,
      "properties": {
        "data": {
          "items": {
            "$ref": "#/$defs/PublicApiCompanySearchResult"
          },
          "type": "array"
        },
        "exhaustion_reason": {
          "enum": [
            "query_limit",
            "no_more_results"
          ],
          "type": "string"
        },
        "has_more": {
          "type": "boolean"
        },
        "period_quota": {
          "additionalProperties": false,
          "properties": {
            "limit": {
              "type": "number"
            },
            "remaining": {
              "type": "number"
            },
            "resets_at": {
              "type": "string"
            },
            "used": {
              "type": "number"
            }
          },
          "required": [
            "limit",
            "used",
            "remaining",
            "resets_at"
          ],
          "type": "object"
        },
        "source_type": {
          "const": "companies",
          "type": "string"
        }
      },
      "required": [
        "data",
        "has_more",
        "source_type"
      ],
      "type": "object"
    },
    "NextQueryModePeopleResultsResponse": {
      "additionalProperties": false,
      "properties": {
        "data": {
          "items": {
            "$ref": "#/$defs/PublicApiPersonSearchResult"
          },
          "type": "array"
        },
        "exhaustion_reason": {
          "enum": [
            "query_limit",
            "no_more_results"
          ],
          "type": "string"
        },
        "has_more": {
          "type": "boolean"
        },
        "period_quota": {
          "additionalProperties": false,
          "properties": {
            "limit": {
              "type": "number"
            },
            "remaining": {
              "type": "number"
            },
            "resets_at": {
              "type": "string"
            },
            "used": {
              "type": "number"
            }
          },
          "required": [
            "limit",
            "used",
            "remaining",
            "resets_at"
          ],
          "type": "object"
        },
        "source_type": {
          "const": "people",
          "type": "string"
        }
      },
      "required": [
        "data",
        "has_more",
        "source_type"
      ],
      "type": "object"
    },
    "PublicApiCompanySearchResult": {
      "additionalProperties": false,
      "properties": {
        "annual_revenue": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "clay_company_id": {
          "type": "number"
        },
        "country": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "description": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "domain": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "industry": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "linkedin_url": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "location": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "size": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "total_funding_amount_range_usd": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ]
        },
        "type": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "clay_company_id",
        "name",
        "size",
        "type",
        "domain",
        "country",
        "industry",
        "location",
        "description",
        "linkedin_url",
        "annual_revenue",
        "total_funding_amount_range_usd"
      ],
      "type": "object"
    },
    "PublicApiMatchedExperience": {
      "additionalProperties": false,
      "properties": {
        "company": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "end_date": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "location": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "start_date": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "title": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "company",
        "title",
        "location",
        "start_date",
        "end_date"
      ],
      "type": "object"
    },
    "PublicApiPersonSearchResult": {
      "additionalProperties": false,
      "properties": {
        "clay_profile_id": {
          "type": "number"
        },
        "first_name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "last_name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "linkedin_url": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "location": {
          "additionalProperties": false,
          "properties": {
            "city": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "name": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "state_or_province": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "required": [
            "name",
            "city",
            "state_or_province"
          ],
          "type": "object"
        },
        "matched_experiences": {
          "items": {
            "$ref": "#/$defs/PublicApiMatchedExperience"
          },
          "type": "array"
        },
        "name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "clay_profile_id",
        "name",
        "first_name",
        "last_name",
        "location",
        "matched_experiences"
      ],
      "type": "object"
    }
  }
}