{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/chemaxon/json-schema/chemaxon-substructure-combined-search-request-schema.json",
  "title": "SubstructureCombinedSearchRequest",
  "description": "Substructure search request",
  "x-generated": "2026-11-03",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/chemaxon-database-search-openapi.yml#/components/schemas/SubstructureCombinedSearchRequest",
  "properties": {
    "additionalDataCondition": {
      "$ref": "#/$defs/Condition"
    },
    "filterToIds": {
      "type": "array",
      "default": [],
      "description": "Search only on given ids (if ids are specified)",
      "items": {
        "type": "integer",
        "format": "int64"
      },
      "uniqueItems": true
    },
    "hitCount": {
      "type": "integer",
      "format": "int64",
      "default": 10,
      "description": "Hit count (default value = 10, 0 means unlimited)"
    },
    "ignoreCharge": {
      "type": "boolean",
      "default": false,
      "description": "Ignore charge information of the query"
    },
    "ignoreIsotope": {
      "type": "boolean",
      "default": false,
      "description": "Ignore isotope information of the query"
    },
    "inputFormat": {
      "type": "string",
      "description": "The input format and options"
    },
    "molecule": {
      "type": "string",
      "description": "The molecule string"
    },
    "stereoSearchIgnoreTetrahedralStereo": {
      "type": "boolean",
      "default": false,
      "description": "Ignore tetrahedral stereo information of the query"
    },
    "stereoSearchOnMarkedDoubleBondOnly": {
      "type": "boolean",
      "default": false,
      "description": "Match double bond C/T stereo only if the bond is marked"
    },
    "timeoutInMilliseconds": {
      "type": "integer",
      "format": "int64",
      "description": "Timeout in milliseconds"
    },
    "withFingerprintDistance": {
      "type": "boolean",
      "default": false,
      "description": "Set to \"true\" if fingerprint distance values are required, otherwise it should be \"false\""
    }
  },
  "required": [
    "molecule"
  ],
  "$defs": {
    "Condition": {
      "description": "Additional data filter option",
      "oneOf": [
        {
          "$ref": "#/$defs/ConditionWithLogicalOperator"
        },
        {
          "$ref": "#/$defs/ConditionWithNumberOperator"
        },
        {
          "$ref": "#/$defs/ConditionWithStringOperator"
        }
      ]
    },
    "ConditionWithLogicalOperator": {
      "properties": {
        "conditions": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Condition"
          }
        },
        "operator": {
          "type": "string",
          "enum": [
            "and",
            "or"
          ]
        }
      },
      "required": [
        "operator"
      ]
    },
    "ConditionWithNumberOperator": {
      "properties": {
        "field": {
          "type": "string",
          "minLength": 1
        },
        "operator": {
          "type": "string",
          "enum": [
            ">",
            ">=",
            "<",
            "<=",
            "=",
            "!="
          ]
        },
        "value": {
          "type": "number"
        }
      },
      "required": [
        "field",
        "operator",
        "value"
      ]
    },
    "ConditionWithStringOperator": {
      "properties": {
        "field": {
          "type": "string",
          "minLength": 1
        },
        "operator": {
          "type": "string",
          "enum": [
            "contains",
            "exact",
            "notExact"
          ]
        },
        "value": {
          "type": "string"
        }
      },
      "required": [
        "field",
        "operator",
        "value"
      ]
    }
  }
}