{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/citeladder-com/json-schema/citeladder-com-search-run-schema.json",
  "title": "SearchRun",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/citeladder-com-search-intelligence-api-openapi.yml#/components/schemas/SearchRun",
  "type": "object",
  "properties": {
    "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)$"
    },
    "status": {
      "type": "string"
    },
    "action": {
      "type": "string"
    },
    "pricing_version": {
      "type": "string"
    },
    "credential_mode": {
      "type": "string",
      "enum": [
        "byok",
        "funded"
      ]
    },
    "estimated_cost_usd": {
      "type": [
        "string",
        "null"
      ]
    },
    "provider_reported_cost_usd": {
      "type": [
        "string",
        "null"
      ]
    },
    "estimated_credits": {
      "anyOf": [
        {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
        },
        {
          "type": "null"
        }
      ]
    },
    "charged_credits": {
      "anyOf": [
        {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
        },
        {
          "type": "null"
        }
      ]
    },
    "planned_calls": {
      "type": "integer",
      "minimum": -9007199254740991,
      "maximum": 9007199254740991
    },
    "completed_calls": {
      "type": "integer",
      "minimum": -9007199254740991,
      "maximum": 9007199254740991
    },
    "planned_rows": {
      "type": "integer",
      "minimum": -9007199254740991,
      "maximum": 9007199254740991
    },
    "received_rows": {
      "type": "integer",
      "minimum": -9007199254740991,
      "maximum": 9007199254740991
    },
    "uncertain_calls": {
      "type": "integer",
      "minimum": -9007199254740991,
      "maximum": 9007199254740991
    },
    "error_code": {
      "type": "string"
    },
    "error_detail": {
      "type": "string"
    },
    "expires_at": {
      "type": "string"
    },
    "confirmed_at": {
      "type": [
        "string",
        "null"
      ]
    },
    "cancelled_at": {
      "type": [
        "string",
        "null"
      ]
    },
    "completed_at": {
      "type": [
        "string",
        "null"
      ]
    },
    "frozen_scope": {
      "type": "object",
      "propertyNames": {
        "type": "string"
      },
      "additionalProperties": {}
    },
    "call_plan": {
      "type": "array",
      "items": {
        "type": "object",
        "propertyNames": {
          "type": "string"
        },
        "additionalProperties": {}
      }
    },
    "reused_datasets": {
      "type": "array",
      "items": {
        "type": "object",
        "propertyNames": {
          "type": "string"
        },
        "additionalProperties": {}
      }
    },
    "created_at": {
      "type": "string"
    }
  },
  "required": [
    "id",
    "status",
    "action",
    "pricing_version",
    "credential_mode",
    "estimated_cost_usd",
    "provider_reported_cost_usd",
    "estimated_credits",
    "charged_credits",
    "planned_calls",
    "completed_calls",
    "planned_rows",
    "received_rows",
    "uncertain_calls",
    "error_code",
    "error_detail",
    "expires_at",
    "confirmed_at",
    "cancelled_at",
    "completed_at",
    "frozen_scope",
    "call_plan",
    "reused_datasets",
    "created_at"
  ],
  "additionalProperties": false
}