URL-to-Markdown web extraction and context compression for AI agents
URL-to-Markdown web extraction and context compression for AI agents. Fetch a public web page and return clean, task-relevant, citation-verifiable LLM context with exact excerpts, locators, hashes, and estimated tokens saved. Use before an agent summarizes, a…
by context-relay.contextrelay.workers.dev · discovered, not yet claimed by its owner · updated 2026-10-11
Mirrored from Coinbase's public x402 Bazaar. The description is the provider's own text and has not been reviewed here; the payment requirements are copied as published.
What it does
URL-to-Markdown web extraction and context compression for AI agents. Fetch a public web page and return clean, task-relevant, citation-verifiable LLM context with exact excerpts, locators, hashes, and estimated tokens saved. Use before an agent summarizes, answers questions from, or cites a long or noisy URL. Deterministic and model-free. Public HTML only; no PDFs, logins, or JavaScript-only pages.
Tags: url-to-markdown · web-extraction · context-compression · ai-agent · citations · bazaar
Call contract
- Method
- POST
- Input
- json
- Output
- json
- Last paid call
- 2026-10-11
{
"max_price_usd": 0.005,
"max_tokens": 2000,
"question": "What is x402 designed to enable for agents and APIs?",
"url": "https://docs.cdp.coinbase.com/x402/welcome"
}{
"context": {
"citations": [
{
"excerpt": "x402 enables HTTP-native payments for APIs and agents.",
"excerpt_sha256": "0000000000000000000000000000000000000000000000000000000000000000",
"id": "c1",
"locator": "p[2]"
}
],
"estimated_tokens_saved": 1200,
"markdown": "# Welcome to x402\n\n## c1 · p[2]\n\nx402 enables HTTP-native payments for APIs and agents.",
"raw_token_estimate": 1250,
"returned_token_estimate": 50,
"token_estimate_method": "characters_divided_by_4"
},
"context_id": "ctx_0123456789abcdef",
"delivery": {
"cache_status": "miss",
"cost_class": "fresh_static",
"currency": "USDC",
"economics": {
"estimate_basis": "configured_route_estimate",
"estimated_gross_margin": 0.8,
"estimated_gross_profit_usd": 0.004,
"estimated_variable_cost_usd": 0.001
},
"generated_at": "2026-01-01T00:00:00.250Z",
"latency_ms": 250,
"network": "eip155:8453",
"payment": {
"failed_delivery_charge_policy": "not_settled_when_handler_status_is_400_or_higher",
"protocol": "x402",
"settlement_receipt_header": "PAYMENT-RESPONSE",
"settlement_status": "reported_in_response_header",
"verification_status": "verified"
},
"price_usd": 0.005,
"route": "public_html_direct",
"status": "delivered"
},
"receipt_id": "rcpt_01234567-89ab-cdef-0123-456789abcdef",
"safety": {
"prompt_injection_signals": [],
"public_source_only": true,
"robots_policy": "allowed",
"shared_cache_eligible": true,
"source_directives": []
},
"schema_version": "context-receipt.v1",
"source": {
"canonical_url": "https://docs.cdp.coinbase.com/x402/welcome",
"content_sha256": "0000000000000000000000000000000000000000000000000000000000000000",
"content_type": "text/html; charset=utf-8",
"fetched_at": "2026-01-01T00:00:00.000Z",
"final_url": "https://docs.cdp.coinbase.com/x402/welcome",
"requested_url": "https://docs.cdp.coinbase.com/x402/welcome",
"title": "Welcome to x402"
},
"transformation": {
"max_tokens": 2000,
"method": "deterministic_extract",
"model_used": false,
"pipeline_version": "html-deterministic.v1",
"question": "What is x402 designed to enable for agents and APIs?"
}
}Use with an agent
- Discover. Agents find this listing with
GET https://bazaar.saylorinnovations.com/discovery/search?query=…, the MCP toolsearch_resources, or/discovery/resources. - Inspect. Fetch
/resources/28677.jsonfor the price and payment options. - Pay. Call
GET https://context-relay.contextrelay.workers.dev/api/v1/context. The provider answers402with its payment requirements. An x402 client signs one of the options below and retries withPAYMENT-SIGNATURE. - Execute. The provider returns
200with the data. Agent Bazaar is not in the request path and never sees your payment.
For humans
You don't need an account or an API key; you need a wallet holding a small amount of USDC on Base, and an x402-capable client (see the examples below). Call the endpoint unpaid first to see exactly what it asks for.
Pricing & payment
- Price
- $0.005 / request
- Protocol
- x402 v2
- Auth
- No account or API key. Pay per request.
- Networks
- Base
- Demand
- 4 calls · 4 unique payers in 30d (public x402 Bazaar data)
x402 payment requirements
| Scheme | Network | Asset | Amount | Pay to | Timeout |
|---|---|---|---|---|---|
| exact | Base eip155:8453 | USDC | $0.005 | 0x08B11EA90aEb253eF0F954BE108A12E6783D8189 | 300s |
accepts[] (raw JSON)
[
{
"scheme": "exact",
"network": "eip155:8453",
"payTo": "0x08B11EA90aEb253eF0F954BE108A12E6783D8189",
"asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"amount": "5000",
"amountUsd": 0.005,
"maxTimeoutSeconds": 300
}
]Schemas
Output schema (JSON Schema)
{
"properties": {
"example": {
"additionalProperties": false,
"properties": {
"context": {
"additionalProperties": false,
"properties": {
"citations": {
"items": {
"additionalProperties": false,
"properties": {
"excerpt": {
"type": "string"
},
"excerpt_sha256": {
"pattern": "^[a-f0-9]{64}$",
"type": "string"
},
"id": {
"type": "string"
},
"locator": {
"type": "string"
}
},
"required": [
"id",
"locator",
"excerpt",
"excerpt_sha256"
],
"type": "object"
},
"minItems": 1,
"type": "array"
},
"estimated_tokens_saved": {
"minimum": 0,
"type": "integer"
},
"markdown": {
"type": "string"
},
"raw_token_estimate": {
"minimum": 1,
"type": "integer"
},
"returned_token_estimate": {
"minimum": 1,
"type": "integer"
},
"token_estimate_method": {
"const": "characters_divided_by_4"
}
},
"required": [
"markdown",
"citations",
"raw_token_estimate",
"returned_token_estimate",
"estimated_tokens_saved",
"token_estimate_method"
],
"type": "object"
},
"context_id": {
"type": "string"
},
"delivery": {
"additionalProperties": false,
"properties": {
"cache_status": {
"enum": [
"hit",
"miss"
]
},
"cost_class": {
"enum": [
"cached",
"fresh_static"
]
},
"currency": {
"const": "USDC"
},
"economics": {
"additionalProperties": false,
"properties": {
"estimate_basis": {
"const": "configured_route_estimate"
},
"estimated_gross_margin": {
"type": "number"
},
"estimated_gross_profit_usd": {
"type": "number"
},
"estimated_variable_cost_usd": {
"minimum": 0,
"type": "number"
}
},
"required": [
"estimate_basis",
"estimated_variable_cost_usd",
"estimated_gross_profit_usd",
"estimated_gross_margin"
],
"type": "object"
},
"generated_at": {
"format": "date-time",
"type": "string"
},
"latency_ms": {
"minimum": 0,
"type": "integer"
},
"network": {
"type": "string"
},
"payment": {
"additionalProperties": false,
"properties": {
"failed_delivery_charge_policy": {
"const": "not_settled_when_handler_status_is_400_or_higher"
},
"protocol": {
"const": "x402"
},
"settlement_receipt_header": {
"enum": [
"PAYMENT-RESPONSE",
"x402/payment-response",
null
]
},
"settlement_status": {
"enum": [
"reported_in_response_header",
"reported_in_mcp_meta",
"not_applicable"
]
},
"verification_status": {
"enum": [
"verified",
"internal_unverified"
]
}
},
"required": [
"protocol",
"verification_status",
"settlement_status",
"settlement_receipt_header",
"failed_delivery_charge_policy"
],
"type": "object"
},
"price_usd": {
"minimum": 0,
"type": "number"
},
"route": {
"enum": [
"cache",
"public_html_direct"
]
},
"status": {
"const": "delivered"
}
},
"required": [
"status",
"route",
"cache_status",
"price_usd",
"currency",
"network",
"cost_class",
"economics",
"latency_ms",
"generated_at",
"payment"
],
"type": "object"
},
"receipt_id": {
"type": "string"
},
"safety": {
"additionalProperties": false,
"properties": {
"prompt_injection_signals": {
"items": {
"type": "string"
},
"type": "array"
},
"public_source_only": {
"const": true
},
"robots_policy": {
"enum": [
"allowed",
"not_present",
"unavailable_4xx"
]
},
"shared_cache_eligible": {
"type": "boolean"
},
"source_directives": {
"items": {
"type": "string"
},
"type": "array"
}
},
"required": [
"public_source_only",
"shared_cache_eligible",
"source_directives",
"robots_policy",
"prompt_injection_signals"
],
"type": "object"
},
"schema_version": {
"const": "context-receipt.v1"
},
"source": {
"additionalProperties": false,
"properties": {
"canonical_url": {
"format": "uri",
"type": "string"
},
"content_sha256": {
"pattern": "^[a-f0-9]{64}$",
"type": "string"
},
"content_type": {
"type": "string"
},
"fetched_at": {
"format": "date-time",
"type": "string"
},
"final_url": {
"format": "uri",
"type": "string"
},
"requested_url": {
"format": "uri",
"type": "string"
},
"title": {
"type": "string"
}
},
"required": [
"requested_url",
"canonical_url",
"final_url",
"title",
"fetched_at",
"content_type",
"content_sha256"
],
"type": "object"
},
"transformation": {
"additionalProperties": false,
"properties": {
"max_tokens": {
"maximum": 12000,
"minimum": 250,
"type": "integer"
},
"method": {
"const": "deterministic_extract"
},
"model_used": {
"const": false
},
"pipeline_version": {
"const": "html-deterministic.v1"
},
"question": {
"type": [
"string",
"null"
]
}
},
"required": [
"pipeline_version",
"method",
"question",
"max_tokens",
"model_used"
],
"type": "object"
}
},
"required": [
"schema_version",
"receipt_id",
"context_id",
"source",
"transformation",
"context",
"delivery",
"safety"
],
"type": "object"
},
"type": {
"type": "string"
}
},
"required": [
"type"
],
"type": "object"
}Example shape — generated from the schema, not a captured live response
{
"example": {
"context": {
"citations": [
{
"excerpt": "string",
"excerpt_sha256": "string",
"id": "string",
"locator": "string"
}
],
"estimated_tokens_saved": 0,
"markdown": "string",
"raw_token_estimate": 0,
"returned_token_estimate": 0,
"token_estimate_method": null
},
"context_id": "string",
"delivery": {
"cache_status": "hit",
"cost_class": "cached",
"currency": null,
"economics": {
"estimate_basis": null,
"estimated_gross_margin": 0,
"estimated_gross_profit_usd": 0,
"estimated_variable_cost_usd": 0
},
"generated_at": "2026-01-01T00:00:00Z",
"latency_ms": 0,
"network": "string",
"payment": {
"failed_delivery_charge_policy": null,
"protocol": null,
"settlement_receipt_header": "PAYMENT-RESPONSE",
"settlement_status": "reported_in_response_header",
"verification_status": "verified"
},
"price_usd": 0,
"route": "cache",
"status": null
},
"receipt_id": "string",
"safety": {
"prompt_injection_signals": [
"string"
],
"public_source_only": null,
"robots_policy": "allowed",
"shared_cache_eligible": true,
"source_directives": [
"string"
]
},
"schema_version": null,
"source": {
"canonical_url": "https://example.com",
"content_sha256": "string",
"content_type": "string",
"fetched_at": "2026-01-01T00:00:00Z",
"final_url": "https://example.com",
"requested_url": "https://example.com",
"title": "string"
},
"transformation": {
"max_tokens": 0,
"method": null,
"model_used": null,
"pipeline_version": null,
"question": "string"
}
},
"type": "string"
}Examples
curl "https://context-relay.contextrelay.workers.dev/api/v1/context"
# -> 402 Payment Required, accepts[] lists how to pay
# retry with a PAYMENT-SIGNATURE (or PAYMENT header) once paidconst res = await fetch("https://context-relay.contextrelay.workers.dev/api/v1/context");
if (res.status === 402) {
const { accepts } = await res.json();
// pay one of accepts[] via an x402 client, then retry with the payment header
}import httpx
res = httpx.get("https://context-relay.contextrelay.workers.dev/api/v1/context")
if res.status_code == 402:
accepts = res.json()["accepts"]
# pay one of accepts[] via an x402 client, then retry with the payment headerDetails
- Provider
- context-relay.contextrelay.workers.dev
- Endpoint
- https://context-relay.contextrelay.workers.dev/api/v1/context
- Machine-readable
/resources/28677.json