HTML Body Text Nodes
Extract body text nodes in parsed DOM order, retaining their boundaries and original UTF-16 source spans, plus their direct concatenation without invented separators. Native HTML rules decode references and normalize source line endings. Head, script, style, template and noscript content is excluded. This is text-node extraction, not CSS-visible text, layout or Markdown. Limits65536 input UTF-8 bytes,8192 nodes/attributes,depth64,1048576 result JSON bytes. No scripts or fetching.
- Price
- from $0.0012 USDC per request (starting price; the 402 response quotes the exact amount for your input)
- Network
- Base mainnet,
eip155:8453, settled in USDC through the Coinbase CDP facilitator - Method and URL
POST https://market.561.group/v1/data/html-body-text- Response type
application/json- Seller
- Causeway Services (561 Group)
Input contract
Input that fails this contract is refused with a 4xx status before any payment is requested.
{
"maxBytes": 1048576,
"bodySchema": {
"type": "object",
"required": [
"html"
],
"properties": {
"html": {
"type": "string",
"maxLength": 65536,
"description": "Maximum65536decoded UTF-8 bytes; full JSON escaping fits the request envelope."
}
},
"additionalProperties": false
}
}
Example request
{
"method": "POST",
"url": "https://market.561.group/v1/data/html-body-text",
"headers": {
"accept": "application/json",
"content-type": "application/json"
},
"body": {
"html": "<title>Head</title><p>A & B<br>next<script>ignored()</script><template><a href=\"/inert\">hidden</a></template><a href=\"/post?x=&amp;\">link</a>"
}
}
Output
{
"schema": {
"type": "object",
"required": [
"text",
"nodes",
"byteLength",
"sourceByteLength",
"offsetUnit"
],
"properties": {
"text": {
"type": "string"
},
"nodes": {
"type": "array",
"items": {
"type": "object",
"required": [
"text",
"source"
],
"properties": {
"text": {
"type": "string"
},
"source": {
"type": [
"object",
"null"
],
"properties": {
"start": {
"type": "integer"
},
"end": {
"type": "integer"
}
}
}
}
}
},
"byteLength": {
"type": "integer",
"minimum": 0
},
"sourceByteLength": {
"type": "integer",
"minimum": 0
},
"offsetUnit": {
"const": "UTF-16 code units"
}
}
},
"example": {
"text": "A & Bnextlink",
"nodes": [
{
"text": "A & B",
"source": {
"start": 22,
"end": 31
}
},
{
"text": "next",
"source": {
"start": 35,
"end": 39
}
},
{
"text": "link",
"source": {
"start": 141,
"end": 145
}
}
],
"byteLength": 13,
"sourceByteLength": 149,
"offsetUnit": "UTF-16 code units"
}
}
How to buy with x402
- Send the request without payment. The server answers
402 Payment Requiredwith a base64 JSONPAYMENT-REQUIREDheader holding the amount, asset, network and payee. - Have your wallet sign an EIP-3009
transferWithAuthorizationfor exactly those terms (an x402 client library does this for you). - Repeat the identical request with the signed payload in the
PAYMENT-SIGNATUREheader. - The server verifies, runs the operation, settles, and returns
200with the result and aPAYMENT-RESPONSEheader carrying the settlement receipt.
Read the price without paying
curl --include --request POST --header 'accept: application/json' --header 'content-type: application/json' --data-raw '{"html":"<title>Head</title><p>A & B<br>next<script>ignored()</script><template><a href=\"/inert\">hidden</a></template><a href=\"/post?x=&amp;\">link</a>"}' --url 'https://market.561.group/v1/data/html-body-text'
This request authorizes nothing; it returns the live payment terms. Read the full explanation of x402.
Machine-readable
- /.well-known/x402: x402 discovery document for every offer
- /v1/catalog: full catalog with contracts and examples
- /llms.txt: the market in llms.txt form
- services.561.group: Causeway Services