{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/cavuno-com/json-schema/cavuno-com-search-companies-body-schema.json",
  "title": "SearchCompaniesBody",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/cavuno-com-companies-api-openapi.yml#/components/schemas/SearchCompaniesBody",
  "type": "object",
  "properties": {
    "query": {
      "type": "string",
      "maxLength": 200,
      "description": "Free-text search query matched against company name. Up to 200 characters."
    },
    "cursor": {
      "type": [
        "string",
        "null"
      ],
      "minLength": 1,
      "description": "An opaque pagination cursor returned in the `nextCursor` field of a previous response. Pass it back to fetch the next page of results."
    },
    "limit": {
      "type": "integer",
      "minimum": 1,
      "maximum": 100,
      "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100."
    },
    "filters": {
      "type": "object",
      "properties": {
        "markets": {
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1,
            "maxLength": 150,
            "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
          },
          "maxItems": 10,
          "description": "Return companies assigned to any of these canonical market slugs. Up to 10 values."
        },
        "customFields": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "key": {
                "type": "string",
                "minLength": 1,
                "maxLength": 64
              },
              "values": {
                "type": "array",
                "items": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "number"
                    },
                    {
                      "type": "boolean"
                    }
                  ]
                },
                "minItems": 1,
                "maxItems": 10
              }
            },
            "required": [
              "key",
              "values"
            ],
            "additionalProperties": false
          },
          "maxItems": 10,
          "description": "Match every public custom-field clause; values within one clause are alternatives."
        },
        "objectReferences": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "key": {
                "type": "string",
                "minLength": 1,
                "maxLength": 64
              },
              "recordIds": {
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1
                },
                "minItems": 1,
                "maxItems": 10
              }
            },
            "required": [
              "key",
              "recordIds"
            ],
            "additionalProperties": false
          },
          "maxItems": 10,
          "description": "Match every public object-reference clause; record IDs within one clause are alternatives."
        }
      },
      "additionalProperties": false
    }
  },
  "additionalProperties": false
}