Skip to main content

Squillify development is paused indefinitely. Read why, and discover what this experiment achieved. Read the story

MicroSkills Reference

Render HTML to Plain Text

web.render_plaintext

ProductionEngine wrapper (Class A)Deterministicstrictfastv1.0.0
File inputNo network

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

Note
We turn markup you already hold into plain text that still reads like the page.

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

IdempotentRetry safeStreaming supportedFile input supportedRequires external service

Capabilities

data-transformationparsing

Cost & billing

Flat rate per invocation

MetercallsBillable onsuccessCost per call1 credit

File handling

Accepts file_refProduces file_refMax input2 MBMax file size2 MB

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.

LimitValueLimited by
Maximum size per input file2 MiBSkill maximum

How we handle your data

Sensitive input, safe output
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.

Read the Microskill Data Handling Policy

Input schema

FieldTypeRequiredDescription
htmlstringNoBounded inline source. Required unless file_ref is provided.
file_refstringNoTenant-scoped opaque file reference. Omit it when inline source is supplied.
baseUrlstringNoOptional absolute base URL for rendered links; omit it to preserve destinations.
profilestringNoPlaintext rendering profile; omit it for readable.
optionsobjectNoPurpose-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

FieldTypeRequiredDescription
textstringYesRendered bounded plaintext.
statsobjectYesClosed 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.
warningsarrayNoBounded 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.
_metaobjectYesClosed 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/execute
curl
curl -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>"}}'
Integrations
TypeScript SDK
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

CodeHTTPRetryableDescription
VALIDATION_ERROR400NoThe request payload failed schema validation.
UNAUTHORIZED401NoMissing or invalid API key.
SKILL_NOT_ACCESSIBLE403NoThe API key is not granted access to this skill.
SKILL_NOT_AVAILABLE_FOR_PLAN403NoThis skill is not included in your current plan.
PLAN_ELIGIBILITY_UNAVAILABLE503YesPlan eligibility could not be decided. Retry after backoff.
SKILL_NOT_FOUND404NoThe requested skill or version does not exist.
TENANT_RATE_LIMITED429YesRequest rate limit exceeded. Retry after backoff.
QUOTA_EXCEEDED429YesPlan quota exhausted. Retryable once the quota period resets.
EXECUTION_TIMEOUT504YesExecution exceeded the allowed time budget.
HTML_NODE_LIMIT_EXCEEDED429NoA size, quota, rate, or time limit was exceeded.

Other limits

LimitValue
Recommended inline bytes32 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)

Request bodyjson
{
  "skillKey": "web.render_plaintext",
  "input": {
    "html": "<article><h1>Title</h1><p>Hello<br>world</p></article>"
  }
}

Examples

Article with heading and line break

Inputjson
{
  "html": "<article><h1>Title</h1><p>Hello<br>world</p></article>"
}
Expected outputjson
{
  "_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

Inputjson
{
  "html": "<nav>Menu</nav><p>Body</p>",
  "profile": "all_visible"
}
Expected outputjson
{
  "_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
  }
}
  • 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

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.

Tags

texthtmlweb