{
  "openapi": "3.1.0",
  "info": {
    "title": "Kairostamp",
    "version": "1",
    "description": "Paid machine-to-machine web evidence API. Fetches one public http/https URL server-side and returns a time-stamped, tamper-evident receipt; the change-check endpoint also compares it against a caller-supplied baseline.",
    "contact": {
      "email": "support@kairostamp.com",
      "url": "https://kairostamp.com/contact"
    },
    "termsOfService": "https://kairostamp.com/terms"
  },
  "servers": [
    {
      "url": "https://kairostamp.com"
    }
  ],
  "externalDocs": {
    "url": "https://kairostamp.com/docs"
  },
  "tags": [
    {
      "name": "paid",
      "description": "Requires one x402 payment per call."
    },
    {
      "name": "free",
      "description": "No payment required."
    }
  ],
  "paths": {
    "/api/v1/snapshot/preflight": {
      "post": {
        "operationId": "snapshot_preflight",
        "summary": "Free eligibility and price check for a target URL",
        "description": "Free eligibility and price check for a target URL. Performs no outbound fetch and stores nothing.",
        "tags": [
          "free"
        ],
        "responses": {
          "200": {
            "description": "Result with a time-stamped evidence receipt.",
            "content": {
              "application/json": {}
            }
          },
          "400": {
            "description": "Invalid or unsupported request."
          }
        }
      }
    },
    "/api/v1/snapshot": {
      "post": {
        "operationId": "snapshot",
        "summary": "Kairostamp evidence snapshot: server-side fetch of one public http/https URL, returning a time-stamped receipt with the response status, content type, byte length, SHA-256 of the body, redirect chain, a text preview, and a tamper-evident hash-chain entry",
        "description": "Kairostamp evidence snapshot: server-side fetch of one public http/https URL, returning a time-stamped receipt with the response status, content type, byte length, SHA-256 of the body, redirect chain, a text preview, and a tamper-evident hash-chain entry.",
        "tags": [
          "paid"
        ],
        "responses": {
          "200": {
            "description": "Result with a time-stamped evidence receipt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "receipt_id",
                    "chain_hash",
                    "receipt"
                  ],
                  "properties": {
                    "receipt_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Evidence receipt identifier."
                    },
                    "previous_chain_hash": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "SHA-256 hash-chain value of the previous receipt, or null for the first entry."
                    },
                    "chain_hash": {
                      "type": "string",
                      "description": "SHA-256 hash-chain value of this receipt."
                    },
                    "receipt": {
                      "type": "object",
                      "required": [
                        "url",
                        "fetched_at",
                        "status_code",
                        "content_type",
                        "byte_length",
                        "sha256",
                        "redirect_chain",
                        "text_preview"
                      ],
                      "properties": {
                        "url": {
                          "type": "string",
                          "format": "uri",
                          "description": "Final URL that was fetched."
                        },
                        "fetched_at": {
                          "type": "string",
                          "format": "date-time",
                          "description": "Server fetch timestamp (UTC)."
                        },
                        "status_code": {
                          "type": "integer",
                          "description": "HTTP status returned by the target."
                        },
                        "content_type": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Response Content-Type, if provided."
                        },
                        "byte_length": {
                          "type": "integer",
                          "description": "Bytes read from the response body."
                        },
                        "sha256": {
                          "type": "string",
                          "description": "SHA-256 of the response body bytes."
                        },
                        "redirect_chain": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "format": "uri"
                          },
                          "description": "Ordered URLs of any redirects followed (max 3)."
                        },
                        "text_preview": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "First 4,000 characters of decoded text, when the body is textual."
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid or unsupported request."
          },
          "402": {
            "description": "Payment required. The response carries x402 payment terms; a compliant client pays and retries automatically. Do not send a payment header on the first request."
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "url"
                ],
                "properties": {
                  "url": {
                    "type": "string",
                    "format": "uri",
                    "maxLength": 2048,
                    "description": "Public http/https URL to snapshot.",
                    "examples": [
                      "https://example.com/"
                    ]
                  }
                },
                "examples": [
                  {
                    "url": "https://example.com/"
                  }
                ]
              }
            }
          }
        },
        "x-x402": {
          "protocol": "x402",
          "version": 2,
          "scheme": "exact",
          "network": "eip155:8453",
          "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
          "price": "$0.05",
          "amount_atomic": 50000
        }
      }
    },
    "/api/v1/change-check": {
      "post": {
        "operationId": "change_check",
        "summary": "Kairostamp change check: server-side fetch of one public http/https URL, compared against a baseline the caller already holds",
        "description": "Kairostamp change check: server-side fetch of one public http/https URL, compared against a baseline the caller already holds. Requires a prior SHA-256 (prior_sha256) or a prior Kairostamp receipt id (prior_receipt_id); to obtain a first baseline, call GET /api/v1/digest. Returns whether the response body changed, both digests, and a new time-stamped evidence receipt with its tamper-evident hash-chain entry. One call performs one check; repeat monitoring means calling again.",
        "tags": [
          "paid"
        ],
        "responses": {
          "200": {
            "description": "Result with a time-stamped evidence receipt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "changed",
                    "previous_sha256",
                    "current_sha256",
                    "receipt_id",
                    "chain_hash",
                    "receipt"
                  ],
                  "properties": {
                    "changed": {
                      "type": "boolean",
                      "description": "True when the current body digest differs from the baseline digest."
                    },
                    "previous_sha256": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Baseline digest used for the comparison."
                    },
                    "current_sha256": {
                      "type": "string",
                      "description": "SHA-256 of the body fetched now."
                    },
                    "receipt_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Evidence receipt identifier."
                    },
                    "previous_chain_hash": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Hash-chain value of the previous receipt."
                    },
                    "chain_hash": {
                      "type": "string",
                      "description": "Hash-chain value of this receipt."
                    },
                    "receipt": {
                      "type": "object",
                      "required": [
                        "url",
                        "fetched_at",
                        "status_code",
                        "content_type",
                        "byte_length",
                        "sha256",
                        "redirect_chain",
                        "text_preview"
                      ],
                      "properties": {
                        "url": {
                          "type": "string",
                          "format": "uri"
                        },
                        "fetched_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "status_code": {
                          "type": "integer"
                        },
                        "content_type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "byte_length": {
                          "type": "integer"
                        },
                        "sha256": {
                          "type": "string"
                        },
                        "redirect_chain": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "format": "uri"
                          }
                        },
                        "text_preview": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid or unsupported request."
          },
          "402": {
            "description": "Payment required. The response carries x402 payment terms; a compliant client pays and retries automatically. Do not send a payment header on the first request."
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "url"
                ],
                "properties": {
                  "url": {
                    "type": "string",
                    "format": "uri",
                    "maxLength": 2048,
                    "description": "Public http/https URL to fetch and compare.",
                    "examples": [
                      "https://example.com/"
                    ]
                  },
                  "prior_sha256": {
                    "type": "string",
                    "pattern": "^[0-9a-f]{64}$",
                    "description": "SHA-256 of the previously observed response body. Supply exactly one of prior_sha256 or prior_receipt_id."
                  },
                  "prior_receipt_id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "Id of an earlier Kairostamp receipt whose digest should be used as the baseline. Supply exactly one of prior_sha256 or prior_receipt_id."
                  }
                },
                "examples": [
                  {
                    "url": "https://example.com/",
                    "prior_sha256": "ff67a9d764d6a2367a187734e697f6a53217db9a21c101d410a113ca871a299d"
                  }
                ]
              }
            }
          }
        },
        "x-x402": {
          "protocol": "x402",
          "version": 2,
          "scheme": "exact",
          "network": "eip155:8453",
          "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
          "price": "$0.05",
          "amount_atomic": 50000
        }
      }
    },
    "/api/v1/digest": {
      "get": {
        "operationId": "digest",
        "summary": "URL digest receipt: server-side fetch of one public http/https URL, returning a time-stamped receipt with the HTTP status, final URL, content type, byte length, SHA-256 of the response body, redirect chain, receipt id and tamper-evident hash-chain entry",
        "description": "URL digest receipt: server-side fetch of one public http/https URL, returning a time-stamped receipt with the HTTP status, final URL, content type, byte length, SHA-256 of the response body, redirect chain, receipt id and tamper-evident hash-chain entry. Single GET query parameter (url). One call performs one fetch; there is no monitoring and no retry.",
        "tags": [
          "paid"
        ],
        "responses": {
          "200": {
            "description": "Result with a time-stamped evidence receipt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "receipt_id",
                    "chain_hash",
                    "receipt"
                  ],
                  "properties": {
                    "receipt_id": {
                      "type": "string",
                      "format": "uuid",
                      "description": "Evidence receipt identifier."
                    },
                    "previous_chain_hash": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "SHA-256 hash-chain value of the previous receipt."
                    },
                    "chain_hash": {
                      "type": "string",
                      "description": "SHA-256 hash-chain value of this receipt."
                    },
                    "receipt": {
                      "type": "object",
                      "required": [
                        "url",
                        "fetched_at",
                        "status_code",
                        "content_type",
                        "byte_length",
                        "sha256",
                        "redirect_chain"
                      ],
                      "properties": {
                        "url": {
                          "type": "string",
                          "format": "uri",
                          "description": "Final URL that was fetched."
                        },
                        "fetched_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "status_code": {
                          "type": "integer"
                        },
                        "content_type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "byte_length": {
                          "type": "integer"
                        },
                        "sha256": {
                          "type": "string",
                          "description": "SHA-256 of the response body bytes."
                        },
                        "redirect_chain": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "format": "uri"
                          }
                        },
                        "text_preview": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid or unsupported request."
          },
          "402": {
            "description": "Payment required. The response carries x402 payment terms; a compliant client pays and retries automatically. Do not send a payment header on the first request."
          }
        },
        "parameters": [
          {
            "name": "url",
            "in": "query",
            "required": true,
            "description": "Public http/https URL to fetch. Sent as the `url` query parameter.",
            "schema": {
              "type": "string",
              "format": "uri",
              "maxLength": 2048,
              "description": "Public http/https URL to fetch. Sent as the `url` query parameter.",
              "examples": [
                "https://example.com/"
              ]
            }
          }
        ],
        "x-x402": {
          "protocol": "x402",
          "version": 2,
          "scheme": "exact",
          "network": "eip155:8453",
          "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
          "price": "$0.01",
          "amount_atomic": 10000
        }
      }
    },
    "/api/v1/headers": {
      "get": {
        "operationId": "headers",
        "summary": "URL HTTP metadata receipt: server-side fetch of one public http/https URL, returning only transport metadata — HTTP status, final URL, redirect chain, content type and byte length — plus a receipt id",
        "description": "URL HTTP metadata receipt: server-side fetch of one public http/https URL, returning only transport metadata — HTTP status, final URL, redirect chain, content type and byte length — plus a receipt id. The response body is not returned and no content preview is stored. Single GET query parameter (url).",
        "tags": [
          "paid"
        ],
        "responses": {
          "200": {
            "description": "Result with a time-stamped evidence receipt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "receipt_id",
                    "http"
                  ],
                  "properties": {
                    "receipt_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "http": {
                      "type": "object",
                      "required": [
                        "url",
                        "fetched_at",
                        "status_code",
                        "content_type",
                        "byte_length",
                        "redirect_chain"
                      ],
                      "properties": {
                        "url": {
                          "type": "string",
                          "format": "uri",
                          "description": "Final URL after any redirects."
                        },
                        "fetched_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "status_code": {
                          "type": "integer"
                        },
                        "content_type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "byte_length": {
                          "type": "integer",
                          "description": "Bytes read from the response body."
                        },
                        "redirect_chain": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "format": "uri"
                          }
                        }
                      }
                    },
                    "note": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid or unsupported request."
          },
          "402": {
            "description": "Payment required. The response carries x402 payment terms; a compliant client pays and retries automatically. Do not send a payment header on the first request."
          }
        },
        "parameters": [
          {
            "name": "url",
            "in": "query",
            "required": true,
            "description": "Public http/https URL to fetch. Sent as the `url` query parameter.",
            "schema": {
              "type": "string",
              "format": "uri",
              "maxLength": 2048,
              "description": "Public http/https URL to fetch. Sent as the `url` query parameter.",
              "examples": [
                "https://example.com/"
              ]
            }
          }
        ],
        "x-x402": {
          "protocol": "x402",
          "version": 2,
          "scheme": "exact",
          "network": "eip155:8453",
          "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
          "price": "$0.005",
          "amount_atomic": 5000
        }
      }
    },
    "/api/v1/verify": {
      "get": {
        "operationId": "verify",
        "summary": "Receipt verification: read-only hash-chain verification of one existing Kairostamp receipt id",
        "description": "Receipt verification: read-only hash-chain verification of one existing Kairostamp receipt id. Recomputes the canonical SHA-256 digest, compares it with the stored chain hash, checks linkage to the preceding entry and reports whether the entry is covered by an on-chain checkpoint. Performs no outbound fetch. Single GET query parameter (receipt_id).",
        "tags": [
          "paid"
        ],
        "responses": {
          "200": {
            "description": "Result with a time-stamped evidence receipt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "receipt_id",
                    "exists",
                    "verdict",
                    "chain"
                  ],
                  "properties": {
                    "receipt_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "exists": {
                      "type": "boolean"
                    },
                    "verdict": {
                      "type": "string",
                      "enum": [
                        "valid",
                        "invalid",
                        "indeterminate",
                        "quarantined_legacy"
                      ],
                      "description": "Result of recomputing the canonical digest for this entry."
                    },
                    "method": {
                      "type": "string",
                      "description": "Verification method used."
                    },
                    "chain": {
                      "type": "object",
                      "required": [
                        "chain_seq",
                        "chain_hash",
                        "previous_chain_hash",
                        "linked"
                      ],
                      "properties": {
                        "chain_seq": {
                          "type": "integer"
                        },
                        "chain_hash": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "previous_chain_hash": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "linked": {
                          "type": [
                            "boolean",
                            "null"
                          ],
                          "description": "True when the stored previous hash matches the preceding entry."
                        }
                      }
                    },
                    "anchor": {
                      "type": "object",
                      "required": [
                        "covered"
                      ],
                      "properties": {
                        "covered": {
                          "type": "boolean",
                          "description": "True when a checkpoint covers this entry."
                        },
                        "status": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "chain_seq": {
                          "type": [
                            "integer",
                            "null"
                          ]
                        },
                        "network": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "note": {
                          "type": "string"
                        }
                      }
                    },
                    "codes": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid or unsupported request."
          },
          "402": {
            "description": "Payment required. The response carries x402 payment terms; a compliant client pays and retries automatically. Do not send a payment header on the first request."
          }
        },
        "parameters": [
          {
            "name": "receipt_id",
            "in": "query",
            "required": true,
            "description": "Identifier of a receipt previously returned by a Kairostamp paid endpoint. Sent as the `receipt_id` query parameter.",
            "schema": {
              "type": "string",
              "format": "uuid",
              "description": "Identifier of a receipt previously returned by a Kairostamp paid endpoint. Sent as the `receipt_id` query parameter.",
              "examples": [
                "85cd424c-b68b-440e-8f4f-e02147799f30"
              ]
            }
          }
        ],
        "x-x402": {
          "protocol": "x402",
          "version": 2,
          "scheme": "exact",
          "network": "eip155:8453",
          "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
          "price": "$0.005",
          "amount_atomic": 5000
        }
      }
    },
    "/api/v1/robots-check": {
      "get": {
        "operationId": "robots_check",
        "summary": "robots.txt check: fetches the origin's /robots.txt server-side and reports whether a given URL path is allowed or blocked for a user agent, with the matched rule, the robots URL, the HTTP status, a timestamp and a tamper-evident receipt",
        "description": "robots.txt check: fetches the origin's /robots.txt server-side and reports whether a given URL path is allowed or blocked for a user agent, with the matched rule, the robots URL, the HTTP status, a timestamp and a tamper-evident receipt. Query parameters: url (required), user_agent (optional, defaults to *). Only robots.txt is fetched; no crawling. Pair with GET /api/v1/link-map or /api/v1/sitemap to plan an allowed fetch.",
        "tags": [
          "paid"
        ],
        "responses": {
          "200": {
            "description": "Result with a time-stamped evidence receipt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "target_url",
                    "decision",
                    "robots_url"
                  ],
                  "properties": {
                    "receipt_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid"
                    },
                    "chain_hash": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Tamper-evident hash-chain value."
                    },
                    "fetched_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    },
                    "note": {
                      "type": "string"
                    },
                    "target_url": {
                      "type": "string",
                      "format": "uri"
                    },
                    "user_agent": {
                      "type": "string"
                    },
                    "robots_url": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uri"
                    },
                    "robots_status": {
                      "type": [
                        "integer",
                        "null"
                      ]
                    },
                    "decision": {
                      "type": "string",
                      "enum": [
                        "allowed",
                        "blocked",
                        "unknown"
                      ]
                    },
                    "matched_rule": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "matched_user_agent": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid or unsupported request."
          },
          "402": {
            "description": "Payment required. The response carries x402 payment terms; a compliant client pays and retries automatically. Do not send a payment header on the first request."
          }
        },
        "parameters": [
          {
            "name": "url",
            "in": "query",
            "required": true,
            "description": "Public http/https URL whose path should be evaluated. Sent as the `url` query parameter.",
            "schema": {
              "type": "string",
              "format": "uri",
              "maxLength": 2048,
              "description": "Public http/https URL whose path should be evaluated. Sent as the `url` query parameter.",
              "examples": [
                "https://example.com/"
              ]
            }
          },
          {
            "name": "user_agent",
            "in": "query",
            "required": false,
            "description": "Crawler user-agent token to evaluate. Defaults to `*`.",
            "schema": {
              "type": "string",
              "maxLength": 200,
              "description": "Crawler user-agent token to evaluate. Defaults to `*`.",
              "examples": [
                "*",
                "GPTBot"
              ]
            }
          }
        ],
        "x-x402": {
          "protocol": "x402",
          "version": 2,
          "scheme": "exact",
          "network": "eip155:8453",
          "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
          "price": "$0.005",
          "amount_atomic": 5000
        }
      }
    },
    "/api/v1/redirect-audit": {
      "get": {
        "operationId": "redirect_audit",
        "summary": "Redirect audit: follows one public http/https URL server-side and returns the ordered redirect chain, hop count, final URL, final HTTP status, whether the destination changed origin and whether HTTPS was downgraded to HTTP, with a timestamp and a tamper-evident receipt",
        "description": "Redirect audit: follows one public http/https URL server-side and returns the ordered redirect chain, hop count, final URL, final HTTP status, whether the destination changed origin and whether HTTPS was downgraded to HTTP, with a timestamp and a tamper-evident receipt. Single GET query parameter (url). No response body is returned.",
        "tags": [
          "paid"
        ],
        "responses": {
          "200": {
            "description": "Result with a time-stamped evidence receipt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "initial_url",
                    "final_url",
                    "redirect_chain",
                    "hop_count",
                    "final_status"
                  ],
                  "properties": {
                    "receipt_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid"
                    },
                    "chain_hash": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Tamper-evident hash-chain value."
                    },
                    "fetched_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    },
                    "note": {
                      "type": "string"
                    },
                    "initial_url": {
                      "type": "string",
                      "format": "uri"
                    },
                    "final_url": {
                      "type": "string",
                      "format": "uri"
                    },
                    "redirect_chain": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "format": "uri"
                      }
                    },
                    "hop_count": {
                      "type": "integer"
                    },
                    "final_status": {
                      "type": "integer"
                    },
                    "cross_origin": {
                      "type": "boolean"
                    },
                    "https_downgrade": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid or unsupported request."
          },
          "402": {
            "description": "Payment required. The response carries x402 payment terms; a compliant client pays and retries automatically. Do not send a payment header on the first request."
          }
        },
        "parameters": [
          {
            "name": "url",
            "in": "query",
            "required": true,
            "description": "Public http/https URL. Sent as the `url` query parameter.",
            "schema": {
              "type": "string",
              "format": "uri",
              "maxLength": 2048,
              "description": "Public http/https URL. Sent as the `url` query parameter.",
              "examples": [
                "https://example.com/"
              ]
            }
          }
        ],
        "x-x402": {
          "protocol": "x402",
          "version": 2,
          "scheme": "exact",
          "network": "eip155:8453",
          "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
          "price": "$0.01",
          "amount_atomic": 10000
        }
      }
    },
    "/api/v1/text-extract": {
      "get": {
        "operationId": "text_extract",
        "summary": "Readable text extraction: fetches one public HTML page server-side and returns clean plain text with the page title, final URL, HTTP status, content type, SHA-256 of the response body, a timestamp and a tamper-evident receipt",
        "description": "Readable text extraction: fetches one public HTML page server-side and returns clean plain text with the page title, final URL, HTTP status, content type, SHA-256 of the response body, a timestamp and a tamper-evident receipt. Single GET query parameter (url). Text is capped at 12000 characters; no JavaScript is executed.",
        "tags": [
          "paid"
        ],
        "responses": {
          "200": {
            "description": "Result with a time-stamped evidence receipt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "url",
                    "text",
                    "char_count",
                    "truncated"
                  ],
                  "properties": {
                    "receipt_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid"
                    },
                    "chain_hash": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Tamper-evident hash-chain value."
                    },
                    "fetched_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    },
                    "note": {
                      "type": "string"
                    },
                    "url": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uri"
                    },
                    "status_code": {
                      "type": [
                        "integer",
                        "null"
                      ]
                    },
                    "content_type": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "sha256": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "SHA-256 of the response body bytes."
                    },
                    "title": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "text": {
                      "type": "string"
                    },
                    "char_count": {
                      "type": "integer"
                    },
                    "max_chars": {
                      "type": "integer"
                    },
                    "truncated": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid or unsupported request."
          },
          "402": {
            "description": "Payment required. The response carries x402 payment terms; a compliant client pays and retries automatically. Do not send a payment header on the first request."
          }
        },
        "parameters": [
          {
            "name": "url",
            "in": "query",
            "required": true,
            "description": "Public http/https URL. Sent as the `url` query parameter.",
            "schema": {
              "type": "string",
              "format": "uri",
              "maxLength": 2048,
              "description": "Public http/https URL. Sent as the `url` query parameter.",
              "examples": [
                "https://example.com/"
              ]
            }
          }
        ],
        "x-x402": {
          "protocol": "x402",
          "version": 2,
          "scheme": "exact",
          "network": "eip155:8453",
          "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
          "price": "$0.02",
          "amount_atomic": 20000
        }
      }
    },
    "/api/v1/link-map": {
      "get": {
        "operationId": "link_map",
        "summary": "Link map: fetches one public HTML page server-side and returns up to 100 normalized, deduplicated http/https links with internal/external classification and counts, the final URL, a timestamp and a tamper-evident receipt",
        "description": "Link map: fetches one public HTML page server-side and returns up to 100 normalized, deduplicated http/https links with internal/external classification and counts, the final URL, a timestamp and a tamper-evident receipt. Single GET query parameter (url). One page only; no recursive crawling. Check crawl permission first with GET /api/v1/robots-check.",
        "tags": [
          "paid"
        ],
        "responses": {
          "200": {
            "description": "Result with a time-stamped evidence receipt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "url",
                    "links",
                    "link_count"
                  ],
                  "properties": {
                    "receipt_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid"
                    },
                    "chain_hash": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Tamper-evident hash-chain value."
                    },
                    "fetched_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    },
                    "note": {
                      "type": "string"
                    },
                    "url": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uri"
                    },
                    "status_code": {
                      "type": [
                        "integer",
                        "null"
                      ]
                    },
                    "links": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "url",
                          "internal"
                        ],
                        "properties": {
                          "url": {
                            "type": "string",
                            "format": "uri"
                          },
                          "internal": {
                            "type": "boolean",
                            "description": "True when the host matches the page host."
                          }
                        }
                      }
                    },
                    "link_count": {
                      "type": "integer"
                    },
                    "internal_count": {
                      "type": "integer"
                    },
                    "external_count": {
                      "type": "integer"
                    },
                    "max_links": {
                      "type": "integer"
                    },
                    "truncated": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid or unsupported request."
          },
          "402": {
            "description": "Payment required. The response carries x402 payment terms; a compliant client pays and retries automatically. Do not send a payment header on the first request."
          }
        },
        "parameters": [
          {
            "name": "url",
            "in": "query",
            "required": true,
            "description": "Public http/https URL. Sent as the `url` query parameter.",
            "schema": {
              "type": "string",
              "format": "uri",
              "maxLength": 2048,
              "description": "Public http/https URL. Sent as the `url` query parameter.",
              "examples": [
                "https://example.com/"
              ]
            }
          }
        ],
        "x-x402": {
          "protocol": "x402",
          "version": 2,
          "scheme": "exact",
          "network": "eip155:8453",
          "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
          "price": "$0.015",
          "amount_atomic": 15000
        }
      }
    },
    "/api/v1/sitemap": {
      "get": {
        "operationId": "sitemap",
        "summary": "Sitemap lookup: locates a site's sitemap from robots.txt or same-origin /sitemap.xml, fetches it server-side and returns up to 100 normalized http/https URLs with the sitemap URL, document kind, count, truncation flag, a timestamp and a tamper-evident receipt",
        "description": "Sitemap lookup: locates a site's sitemap from robots.txt or same-origin /sitemap.xml, fetches it server-side and returns up to 100 normalized http/https URLs with the sitemap URL, document kind, count, truncation flag, a timestamp and a tamper-evident receipt. Single GET query parameter (url). One document only; child sitemaps are not fetched.",
        "tags": [
          "paid"
        ],
        "responses": {
          "200": {
            "description": "Result with a time-stamped evidence receipt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "site_url",
                    "sitemap_url",
                    "urls",
                    "url_count"
                  ],
                  "properties": {
                    "receipt_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uuid"
                    },
                    "chain_hash": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Tamper-evident hash-chain value."
                    },
                    "fetched_at": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    },
                    "note": {
                      "type": "string"
                    },
                    "site_url": {
                      "type": "string",
                      "format": "uri"
                    },
                    "sitemap_url": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "uri"
                    },
                    "sitemap_status": {
                      "type": [
                        "integer",
                        "null"
                      ]
                    },
                    "sitemap_kind": {
                      "type": "string",
                      "enum": [
                        "urlset",
                        "sitemapindex",
                        "unknown"
                      ]
                    },
                    "urls": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "format": "uri"
                      }
                    },
                    "url_count": {
                      "type": "integer"
                    },
                    "max_urls": {
                      "type": "integer"
                    },
                    "truncated": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid or unsupported request."
          },
          "402": {
            "description": "Payment required. The response carries x402 payment terms; a compliant client pays and retries automatically. Do not send a payment header on the first request."
          }
        },
        "parameters": [
          {
            "name": "url",
            "in": "query",
            "required": true,
            "description": "Public http/https site URL. Sent as the `url` query parameter.",
            "schema": {
              "type": "string",
              "format": "uri",
              "maxLength": 2048,
              "description": "Public http/https site URL. Sent as the `url` query parameter.",
              "examples": [
                "https://example.com/"
              ]
            }
          }
        ],
        "x-x402": {
          "protocol": "x402",
          "version": 2,
          "scheme": "exact",
          "network": "eip155:8453",
          "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
          "price": "$0.01",
          "amount_atomic": 10000
        }
      }
    }
  }
}