{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/recruitmcp-com/json-schema/recruitmcp-com-preview-schema.json",
  "title": "Preview",
  "description": "Returned when dry_run=true. Nothing was spent or changed. Search, profile, company, and contact previews set dry_run true and requires_confirm false.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/recruitmcp-com-companies-api-openapi.yml#/components/schemas/Preview",
  "type": "object",
  "properties": {
    "dry_run": {
      "type": "boolean",
      "description": "True on this preview. Nothing was charged and nothing was changed.",
      "const": true
    },
    "estimate": {
      "$ref": "#/$defs/Estimate"
    },
    "cost": {
      "$ref": "#/$defs/Cost"
    }
  },
  "required": [
    "dry_run",
    "estimate"
  ],
  "additionalProperties": false,
  "$defs": {
    "Cost": {
      "type": "object",
      "properties": {
        "credits": {
          "type": "integer",
          "description": "Credits charged by this call. Whole credits. 0 on an idempotent replay, where the body also has replayed: true and the header Idempotent-Replayed: true."
        },
        "cached_items": {
          "type": "integer",
          "description": "Items read from cache. On a replay, the value of the first response."
        },
        "live_items": {
          "type": "integer",
          "description": "Items fetched live by this call. 0 on a replay."
        },
        "upstream_calls": {
          "type": "integer",
          "description": "Index calls made by this call. 0 on a replay."
        }
      },
      "required": [
        "credits"
      ]
    },
    "Estimate": {
      "type": "object",
      "properties": {
        "credits_min": {
          "type": "integer",
          "description": "Lowest expected spend. Whole credits."
        },
        "credits_max": {
          "type": "integer",
          "description": "Ceiling. Spend never passes it. Whole credits."
        },
        "expected_pages": {
          "type": "integer"
        },
        "expected_profile_fetches": {
          "type": "integer"
        },
        "skipped_pages_from_checkpoints": {
          "type": "integer",
          "description": "Pages already paid for in an earlier search. Not charged again."
        },
        "cached_items": {
          "type": "integer",
          "description": "Items served from cache, free."
        },
        "balance_credits": {
          "type": [
            "integer",
            "null"
          ],
          "description": "Account balance. A customer-bound key gets that customer's remaining daily cap, or null when the customer has no cap."
        },
        "sufficient": {
          "type": "boolean",
          "description": "True when the visible balance covers credits_max, or when that balance is hidden. False when a live call can return 402 insufficient_credits."
        },
        "warning": {
          "type": [
            "string",
            "null"
          ],
          "description": "Null when sufficient is true. Otherwise the live call can return 402 insufficient_credits."
        },
        "requires_confirm": {
          "type": "boolean",
          "description": "False on a search, profile, company, or contact preview. True when the call still needs an explicit confirm."
        }
      },
      "required": [
        "credits_min",
        "credits_max",
        "requires_confirm"
      ]
    }
  }
}