{
  "x402Version": 2,
  "id": 32590,
  "slug": "32590",
  "resource": "https://x402.hydratrader.ai/v1/document-extract",
  "description": "Extract JSON from a PDF or long document into your schema, with a verified source quote and page number for every field. Public PDF/HTML URL or pasted text, up to 40 pages. $0.30 USDC on Base via x402. No API key. Text PDFs only (no OCR); no login/paywall sources.",
  "type": "http",
  "resourceType": "AI Inference",
  "accepts": [
    {
      "scheme": "exact",
      "network": "eip155:8453",
      "payTo": "0x55d06e282a699710e03088c218a9e79d2b1616fc",
      "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
      "amount": "300000",
      "amountUsd": 0.3,
      "maxTimeoutSeconds": 300
    }
  ],
  "outputSchema": {
    "properties": {
      "example": {
        "type": "object"
      },
      "type": {
        "type": "string"
      }
    },
    "required": [
      "type"
    ],
    "type": "object"
  },
  "extensions": {
    "bazaar": {
      "info": {
        "input": {
          "body": {
            "client_ref": "demo-1",
            "schema": {
              "properties": {
                "author": {
                  "type": "string"
                },
                "category": {
                  "type": "string"
                },
                "published": {
                  "type": "string"
                },
                "rfc_number": {
                  "type": "integer"
                },
                "title": {
                  "type": "string"
                }
              },
              "required": [
                "rfc_number",
                "title"
              ],
              "type": "object"
            },
            "source": {
              "type": "public_url",
              "url": "https://www.rfc-editor.org/rfc/pdfrfc/rfc2119.txt.pdf"
            }
          },
          "bodyType": "json",
          "method": "POST",
          "type": "http"
        },
        "output": {
          "example": {
            "client_ref": "demo-1",
            "confidence": 0.95,
            "coverage": 1,
            "data": {
              "author": "S. Bradner",
              "category": "Best Current Practice",
              "published": "March 1997",
              "rfc_number": 2119,
              "title": "Key words for use in RFCs to Indicate Requirement Levels"
            },
            "endpoint": "document-extract",
            "evidence": {
              "author": {
                "confidence": 0.95,
                "page": 1,
                "quote": "S. Bradner"
              },
              "category": {
                "confidence": 0.95,
                "page": 1,
                "quote": "Category: Best Current Practice"
              },
              "published": {
                "confidence": 0.95,
                "page": 1,
                "quote": "March 1997"
              },
              "rfc_number": {
                "confidence": 0.95,
                "page": 1,
                "quote": "Request for Comments: 2119"
              },
              "title": {
                "confidence": 0.95,
                "page": 1,
                "quote": "Key words for use in RFCs to Indicate Requirement Levels"
              }
            },
            "missing": [],
            "next_tasks": [
              {
                "endpoint": "https://x402.hydratrader.ai/v1/summarize",
                "example_body": {
                  "client_ref": "demo-1",
                  "input": "{\"rfc_number\":2119,…}"
                },
                "method": "POST",
                "price_usd": "0.01",
                "task": "summarize",
                "why": "Short plain-language reading of the extracted record"
              }
            ],
            "ok": true,
            "schema_valid": true,
            "source_meta": {
              "chars": 9000,
              "pages_read": 3,
              "pages_total": 3,
              "sha256": "…",
              "truncated": false,
              "type": "pdf",
              "url": "https://www.rfc-editor.org/rfc/pdfrfc/rfc2119.txt.pdf"
            },
            "usage": {
              "input_tokens": 3600,
              "latency_ms": 6000,
              "llm_calls": 1,
              "model": "grok-4.20-0309-non-reasoning",
              "model_cost_est_usdc": "0.0051",
              "output_tokens": 250,
              "price_usdc": "0.30"
            },
            "warnings": []
          },
          "type": "json"
        }
      },
      "schema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "properties": {
          "input": {
            "additionalProperties": false,
            "properties": {
              "body": {
                "properties": {
                  "client_ref": {
                    "type": "string"
                  },
                  "instructions": {
                    "description": "Optional formatting hints (e.g. 'amounts in USD')",
                    "maxLength": 1000,
                    "type": "string"
                  },
                  "pages": {
                    "description": "Optional PDF page selection like '1-20,25' (≤40 pages; required when the PDF has >40 pages)",
                    "type": "string"
                  },
                  "schema": {
                    "description": "JSON Schema (type=object) for the record you want; 1–40 top-level properties; nested objects/arrays allowed",
                    "type": "object"
                  },
                  "source": {
                    "properties": {
                      "text": {
                        "description": "Pasted document text (type=text)",
                        "maxLength": 160000,
                        "type": "string"
                      },
                      "type": {
                        "enum": [
                          "text",
                          "public_url"
                        ],
                        "type": "string"
                      },
                      "url": {
                        "description": "Public http(s) PDF, HTML or text URL (type=public_url); ≤10 MB",
                        "format": "uri",
                        "type": "string"
                      }
                    },
                    "required": [
                      "type"
                    ],
                    "type": "object"
                  }
                },
                "required": [
                  "source",
                  "schema"
                ]
              },
              "bodyType": {
                "enum": [
                  "json",
                  "form-data",
                  "text"
                ],
                "type": "string"
              },
              "method": {
                "enum": [
                  "POST",
                  "PUT",
                  "PATCH"
                ],
                "type": "string"
              },
              "type": {
                "const": "http",
                "type": "string"
              }
            },
            "required": [
              "type",
              "method",
              "bodyType",
              "body"
            ],
            "type": "object"
          },
          "output": {
            "properties": {
              "example": {
                "type": "object"
              },
              "type": {
                "type": "string"
              }
            },
            "required": [
              "type"
            ],
            "type": "object"
          }
        },
        "required": [
          "input"
        ],
        "type": "object"
      }
    }
  },
  "tags": [
    "bazaar"
  ],
  "sourceHost": "x402.hydratrader.ai",
  "lastUpdated": "2026-10-10T17:03:14.932Z",
  "quality": {
    "calls30d": 1,
    "uniquePayers30d": 1,
    "lastCalledAt": "2026-10-10T17:03:14.592Z"
  },
  "metadata": {
    "extensions": {
      "bazaar": {
        "info": {
          "input": {
            "body": {
              "client_ref": "demo-1",
              "schema": {
                "properties": {
                  "author": {
                    "type": "string"
                  },
                  "category": {
                    "type": "string"
                  },
                  "published": {
                    "type": "string"
                  },
                  "rfc_number": {
                    "type": "integer"
                  },
                  "title": {
                    "type": "string"
                  }
                },
                "required": [
                  "rfc_number",
                  "title"
                ],
                "type": "object"
              },
              "source": {
                "type": "public_url",
                "url": "https://www.rfc-editor.org/rfc/pdfrfc/rfc2119.txt.pdf"
              }
            },
            "bodyType": "json",
            "method": "POST",
            "type": "http"
          },
          "output": {
            "example": {
              "client_ref": "demo-1",
              "confidence": 0.95,
              "coverage": 1,
              "data": {
                "author": "S. Bradner",
                "category": "Best Current Practice",
                "published": "March 1997",
                "rfc_number": 2119,
                "title": "Key words for use in RFCs to Indicate Requirement Levels"
              },
              "endpoint": "document-extract",
              "evidence": {
                "author": {
                  "confidence": 0.95,
                  "page": 1,
                  "quote": "S. Bradner"
                },
                "category": {
                  "confidence": 0.95,
                  "page": 1,
                  "quote": "Category: Best Current Practice"
                },
                "published": {
                  "confidence": 0.95,
                  "page": 1,
                  "quote": "March 1997"
                },
                "rfc_number": {
                  "confidence": 0.95,
                  "page": 1,
                  "quote": "Request for Comments: 2119"
                },
                "title": {
                  "confidence": 0.95,
                  "page": 1,
                  "quote": "Key words for use in RFCs to Indicate Requirement Levels"
                }
              },
              "missing": [],
              "next_tasks": [
                {
                  "endpoint": "https://x402.hydratrader.ai/v1/summarize",
                  "example_body": {
                    "client_ref": "demo-1",
                    "input": "{\"rfc_number\":2119,…}"
                  },
                  "method": "POST",
                  "price_usd": "0.01",
                  "task": "summarize",
                  "why": "Short plain-language reading of the extracted record"
                }
              ],
              "ok": true,
              "schema_valid": true,
              "source_meta": {
                "chars": 9000,
                "pages_read": 3,
                "pages_total": 3,
                "sha256": "…",
                "truncated": false,
                "type": "pdf",
                "url": "https://www.rfc-editor.org/rfc/pdfrfc/rfc2119.txt.pdf"
              },
              "usage": {
                "input_tokens": 3600,
                "latency_ms": 6000,
                "llm_calls": 1,
                "model": "grok-4.20-0309-non-reasoning",
                "model_cost_est_usdc": "0.0051",
                "output_tokens": 250,
                "price_usdc": "0.30"
              },
              "warnings": []
            },
            "type": "json"
          }
        },
        "schema": {
          "$schema": "https://json-schema.org/draft/2020-12/schema",
          "properties": {
            "input": {
              "additionalProperties": false,
              "properties": {
                "body": {
                  "properties": {
                    "client_ref": {
                      "type": "string"
                    },
                    "instructions": {
                      "description": "Optional formatting hints (e.g. 'amounts in USD')",
                      "maxLength": 1000,
                      "type": "string"
                    },
                    "pages": {
                      "description": "Optional PDF page selection like '1-20,25' (≤40 pages; required when the PDF has >40 pages)",
                      "type": "string"
                    },
                    "schema": {
                      "description": "JSON Schema (type=object) for the record you want; 1–40 top-level properties; nested objects/arrays allowed",
                      "type": "object"
                    },
                    "source": {
                      "properties": {
                        "text": {
                          "description": "Pasted document text (type=text)",
                          "maxLength": 160000,
                          "type": "string"
                        },
                        "type": {
                          "enum": [
                            "text",
                            "public_url"
                          ],
                          "type": "string"
                        },
                        "url": {
                          "description": "Public http(s) PDF, HTML or text URL (type=public_url); ≤10 MB",
                          "format": "uri",
                          "type": "string"
                        }
                      },
                      "required": [
                        "type"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "source",
                    "schema"
                  ]
                },
                "bodyType": {
                  "enum": [
                    "json",
                    "form-data",
                    "text"
                  ],
                  "type": "string"
                },
                "method": {
                  "enum": [
                    "POST",
                    "PUT",
                    "PATCH"
                  ],
                  "type": "string"
                },
                "type": {
                  "const": "http",
                  "type": "string"
                }
              },
              "required": [
                "type",
                "method",
                "bodyType",
                "body"
              ],
              "type": "object"
            },
            "output": {
              "properties": {
                "example": {
                  "type": "object"
                },
                "type": {
                  "type": "string"
                }
              },
              "required": [
                "type"
              ],
              "type": "object"
            }
          },
          "required": [
            "input"
          ],
          "type": "object"
        }
      }
    }
  },
  "liveness": {
    "reliability": null
  },
  "verified": false,
  "featured": false,
  "provider": {
    "host": "x402.hydratrader.ai",
    "manifest_name": "x402.hydratrader.ai",
    "source": "cdp-mirror",
    "source_manifest_url": "https://api.cdp.coinbase.com/platform/v2/x402/discovery/resources",
    "submitted_at": "2026-10-14T01:15:01.050Z"
  },
  "exampleResponse": {
    "client_ref": "demo-1",
    "confidence": 0.95,
    "coverage": 1,
    "data": {
      "author": "S. Bradner",
      "category": "Best Current Practice",
      "published": "March 1997",
      "rfc_number": 2119,
      "title": "Key words for use in RFCs to Indicate Requirement Levels"
    },
    "endpoint": "document-extract",
    "evidence": {
      "author": {
        "confidence": 0.95,
        "page": 1,
        "quote": "S. Bradner"
      },
      "category": {
        "confidence": 0.95,
        "page": 1,
        "quote": "Category: Best Current Practice"
      },
      "published": {
        "confidence": 0.95,
        "page": 1,
        "quote": "March 1997"
      },
      "rfc_number": {
        "confidence": 0.95,
        "page": 1,
        "quote": "Request for Comments: 2119"
      },
      "title": {
        "confidence": 0.95,
        "page": 1,
        "quote": "Key words for use in RFCs to Indicate Requirement Levels"
      }
    },
    "missing": [],
    "next_tasks": [
      {
        "endpoint": "https://x402.hydratrader.ai/v1/summarize",
        "example_body": {
          "client_ref": "demo-1",
          "input": "{\"rfc_number\":2119,…}"
        },
        "method": "POST",
        "price_usd": "0.01",
        "task": "summarize",
        "why": "Short plain-language reading of the extracted record"
      }
    ],
    "ok": true,
    "schema_valid": true,
    "source_meta": {
      "chars": 9000,
      "pages_read": 3,
      "pages_total": 3,
      "sha256": "…",
      "truncated": false,
      "type": "pdf",
      "url": "https://www.rfc-editor.org/rfc/pdfrfc/rfc2119.txt.pdf"
    },
    "usage": {
      "input_tokens": 3600,
      "latency_ms": 6000,
      "llm_calls": 1,
      "model": "grok-4.20-0309-non-reasoning",
      "model_cost_est_usdc": "0.0051",
      "output_tokens": 250,
      "price_usdc": "0.30"
    },
    "warnings": []
  }
}