{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/difficat-com/json-schema/difficat-com-discover-response-schema.json",
  "title": "DiscoverResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/difficat-com-discover-api-openapi.yml#/components/schemas/DiscoverResponse",
  "type": "object",
  "required": [
    "pages"
  ],
  "properties": {
    "pages": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "sourceUrl",
          "path"
        ],
        "properties": {
          "sourceUrl": {
            "type": "string",
            "format": "uri",
            "maxLength": 2048
          },
          "targetUrl": {
            "type": "string",
            "format": "uri",
            "maxLength": 2048
          },
          "path": {
            "type": "string"
          }
        }
      }
    },
    "strategy": {
      "type": "string"
    },
    "truncated": {
      "type": "boolean",
      "description": "The page ceiling cut the list."
    },
    "payment": {
      "$ref": "#/$defs/Payment"
    },
    "sample": {
      "type": "boolean",
      "description": "Present and true when the call ran under the free allowance; payment is then absent."
    },
    "allowanceRemaining": {
      "type": "integer",
      "description": "Free run: the units of this kind left for the address today."
    }
  },
  "$defs": {
    "Payment": {
      "type": "object",
      "description": "What this call was charged. The amount is a decimal USD string (\"0.10\"); by contrast, the x-payment-info.amount advertised on each paid operation is USD cents as an integer string (\"10\"). A call settled from a prepaid balance carries rail \"prepaid\" and the remaining balance. A call paid with a Pro account’s key carries rail \"subscription\", the captured pages drawn from the included allowance (2 per live pair) and the pages left; its amount is what any leftover balance and overage paid, \"0.00\" when the allowance covered the call.",
      "required": [
        "amount",
        "currency"
      ],
      "properties": {
        "amount": {
          "type": "string"
        },
        "currency": {
          "type": "string"
        },
        "rail": {
          "type": "string",
          "enum": [
            "prepaid",
            "subscription"
          ]
        },
        "balance": {
          "type": "string",
          "description": "Remaining prepaid balance, decimal USD."
        },
        "pagesFromAllowance": {
          "type": "integer",
          "description": "Pro key: captured pages covered by the allowance, 2 per live pair."
        },
        "allowanceRemaining": {
          "type": "integer",
          "description": "Pro key: captured pages left in the period."
        }
      }
    }
  }
}