Render HTML to Plain Text
web.render_plaintext
Overview
You send HTML and we give you back the words, laid out so they still read well: headings and paragraphs separated by a blank line, list items on their own line with a marker, table rows flattened, and line breaks respected. Scripts, styles, and elements marked hidden are dropped, and the readable profile also sets aside navigation and footers. No browser is involved, nothing is fetched, and no JavaScript runs, so this is not the place to go for pixel-accurate output. Accepts file input via file_ref — no need to extract file content first.
Stripping tags with a pattern leaves the words run together and the structure gone, and spinning up a browser to read a page is a lot of machinery for text.
Reliability
Same markup and same options always give the same text, and nothing leaves the platform. Two limits of working without a browser are worth knowing: we cannot tell that a stylesheet hides something, so text hidden only by CSS still appears, while an element carrying the hidden attribute is removed; and the layout is structural, so a table becomes one line per row rather than aligned columns. Text past maxOutputCharacters is cut on a character boundary that keeps surrogate pairs intact, and you get a warning plus _meta.truncated rather than an error. One failure stops the call: HTML_NODE_LIMIT_EXCEEDED — the document holds more than 200000 elements, so split it or narrow it down before trying again, because the same input will fail the same way. Bad input is rejected outright too — sending neither html nor file_ref, an unrecognised profile or tableMode, a file reference we cannot read for you, or content beyond 2097152 bytes.
Context footprint
The whole rendered text comes back inline, usually far smaller than the markup; lower maxOutputCharacters when you need a hard ceiling on the reply. A successful call costs 1 execution credit.
When to use it
When you hold markup and want the readable words out of it, structure intact.
When exact browser layout matters, or when the page still needs fetching.
Runs on jsoup, a tolerant HTML parser that never executes what it reads.
Scope
Non-goals
- Does not run any JavaScript on the page
- Does not apply CSS, so content hidden by a stylesheet still comes through
- Does not fetch the page or anything it links to
- Does not reproduce a browser's layout, spacing, or column widths
Properties
Capabilities
Cost & billing
Flat rate per invocation
File handling
File limits
Constraints this skill applies to your input and generated files. The “Limited by” column shows the static source of each cap; none of these can be raised by upgrading your plan.
| Limit | Value | Limited by |
|---|---|---|
| Maximum size per input file | 2 MiB | Skill maximum |
How we handle your data
What this means
This skill may receive sensitive content, but it does not target sensitive data and returns only a structured non-sensitive result.
Squillify guarantees
- Runs inside Squillify
- This skill runs inside Squillify.
- Payloads are not sent to an external service by this skill.
- Squillify does not permanently store submitted payloads.
- Telemetry records metadata only, not submitted content.
- Submitted payloads are not used for training.
- Submitted payloads are not reviewed by humans.
- This skill does not target sensitive data.
- The response does not contain submitted content.
Your responsibility
Squillify does not determine whether submitted content is sensitive. Your application is responsible for deciding what data it is allowed to submit. Your application is responsible for securing the response.
Input schema
| Field | Type | Required | Description |
|---|---|---|---|
| html | string | No | Bounded inline source. Required unless file_ref is provided. |
| file_ref | string | No | Tenant-scoped opaque file reference. Omit it when inline source is supplied. |
| baseUrl | string | No | Optional absolute base URL for rendered links; omit it to preserve destinations. |
| profile | string | No | Plaintext rendering profile; omit it for readable. |
| options | object | No | Purpose-bound bounded plaintext option object; omit it to use profile defaults. It contains from 0 through 256 purpose-bound properties — unconstrained RFC 8259 JSON items. |
Output schema
| Field | Type | Required | Description |
|---|---|---|---|
| text | string | Yes | Rendered bounded plaintext. |
| stats | object | Yes | Closed rendering-statistics receipt with character, link, image, and block counts. Its documented web receipt properties are bounded to 128 entries — unconstrained RFC 8259 JSON items. |
| warnings | array | No | Bounded array of non-fatal safe warning strings. The item shape is defined by the nested schema and the array contains from 0 through 20000 items. |
| _meta | object | Yes | Closed renderer metadata receipt with applied profile and options. Its documented web receipt properties are bounded to 128 entries — unconstrained RFC 8259 JSON items. |
API contract
POST /v1/executecurl -sS -X POST "$BASE/v1/execute" -H "Authorization: Bearer $KEY" -H 'Content-Type: application/json' -d '{"skillKey":"web.render_plaintext","input":{"html":"<p>Hello</p>"}}'import { Squillify } from "@squillify/sdk";
const sq = new Squillify({ apiKey: process.env.SQUILLIFY_API_KEY });
const { output } = await sq.execute("web.render_plaintext", {"html":"<article><h1>Title</h1><p>Hello<br>world</p></article>"});Errors
| Code | HTTP | Retryable | Description |
|---|---|---|---|
| VALIDATION_ERROR | 400 | No | The request payload failed schema validation. |
| UNAUTHORIZED | 401 | No | Missing or invalid API key. |
| SKILL_NOT_ACCESSIBLE | 403 | No | The API key is not granted access to this skill. |
| SKILL_NOT_AVAILABLE_FOR_PLAN | 403 | No | This skill is not included in your current plan. |
| PLAN_ELIGIBILITY_UNAVAILABLE | 503 | Yes | Plan eligibility could not be decided. Retry after backoff. |
| SKILL_NOT_FOUND | 404 | No | The requested skill or version does not exist. |
| TENANT_RATE_LIMITED | 429 | Yes | Request rate limit exceeded. Retry after backoff. |
| QUOTA_EXCEEDED | 429 | Yes | Plan quota exhausted. Retryable once the quota period resets. |
| EXECUTION_TIMEOUT | 504 | Yes | Execution exceeded the allowed time budget. |
| HTML_NODE_LIMIT_EXCEEDED | 429 | No | A size, quota, rate, or time limit was exceeded. |
Other limits
| Limit | Value |
|---|---|
| Recommended inline bytes | 32 KiB |
Limitations
- Does not run any JavaScript on the page
- Does not apply CSS, so content hidden by a stylesheet still comes through
- Does not fetch the page or anything it links to
- Does not reproduce a browser's layout, spacing, or column widths
- Reproducing how a browser would lay the page out
- Fetching the page — bring the markup with you
How to call
POST /v1/execute (requires authentication)
{
"skillKey": "web.render_plaintext",
"input": {
"html": "<article><h1>Title</h1><p>Hello<br>world</p></article>"
}
}Examples
Article with heading and line break
{
"html": "<article><h1>Title</h1><p>Hello<br>world</p></article>"
}{
"_meta": {
"profile": "readable",
"truncated": false,
"renderProfile": "html-plaintext-1"
},
"text": "Title\n\nHello\nworld",
"warnings": [],
"stats": {
"links": 0,
"images": 0,
"words": 3,
"blocks": 3,
"characters": 18
}
}Keeping navigation with the all_visible profile
{
"html": "<nav>Menu</nav><p>Body</p>",
"profile": "all_visible"
}{
"_meta": {
"profile": "all_visible",
"truncated": false,
"renderProfile": "html-plaintext-1"
},
"text": "Menu\n\nBody",
"warnings": [],
"stats": {
"links": 0,
"images": 0,
"words": 2,
"blocks": 1,
"characters": 10
}
}Recommended use cases
- Shrink a page into text a model can read without the markup noise
- Pull the article out of a saved page and leave the navigation behind
- Produce the plain-text half of an HTML email
Avoid for
- Reproducing how a browser would lay the page out
- Fetching the page — bring the markup with you
Related skills
Composable with
Safety & privacy
- Runs without calling any external service.
- Your payloads are never stored permanently.
- Telemetry captures metadata only — never your payload contents.
- We never train models on your payloads.
- No human reviews your payloads.