apyhub
DATA EXTRACTION · DEVELOPER TOOLS

Extract Readable Content from HTML API

What it does

Readable Content Extractor pulls the main article text and title out of HTML using readability algorithms. Send it a page URL, raw HTML, or both, and get back cleaned content you can use without layout noise, navigation, or ads.

The input is a body object with required html, plus an optional url for pages where the source address helps with extraction. The response includes title, short_title, content, and length, so you can decide whether the extraction succeeded and how much text was recovered.

Use Readable Content Extractor when you need to turn web pages into article text for indexing, summarization, content analysis, or storage in a knowledge base. It is useful for crawlers, reading apps, and pipeline steps that need article text instead of full page markup.

If the HTML contains a clear main story or post, this service isolates it and returns a normalized text version you can pass to downstream processing.

POST
Extract main article content and title from HTML using readability algorithms
http://localhost:8080/dosvak/extract-html-readable-content
QUICKSTARTGUIDE

Quickstart

Send the HTML you want to extract readable text from in the request body.

curl -X POST "http://localhost:8080/dosvak/extract-html-readable-content" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"html":"<html><body><h1>Example Article</h1><p>This is a short example.</p></body></html>"}'

What you'll get back

Returns a JSON object with optional top-level title, length, content, and short_title fields.

  • title is a string
  • length is an integer
  • content is a string
  • short_title is a string
{
  "title": "Example Article",
  "length": 24,
  "content": "Example Article This is a short example.",
  "short_title": "Example"
}
TRY ITLIVE · 10 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
body*

About this endpoint

What it does

Extracts the main readable content and title from an HTML document using readability algorithms. The request sends HTML content, and the response returns the extracted title and content metadata.

Request Body

ParameterTypeMandatoryDescription
urlStringNoThe source URL for the HTML, if available.
htmlStringYesThe HTML document to analyze.

Response

Returns a JSON object with title, length, content, and short_title fields. title and short_title are strings, length is an integer, and content is the extracted readable content as a string.

ParameterTypeMandatoryDescription
titleStringNoThe extracted page or article title.
lengthIntegerNoThe length of the extracted content.
contentStringNoThe main readable content extracted from the HTML.
short_titleStringNoA shorter version of the extracted title.

Body

Name
Type
Description
bodyREQUIRED
object
▣ COMMON ERRORS

Errors any endpoint can return

400bad_request

Required parameter missing or malformed body.

401unauthorized

API key missing, revoked, or not authorized for this service.

429rate_limited

Your plan's per-second rate exceeded. Retry with exponential backoff.

503upstream_busy

Backend temporarily unavailable. Try again in a few seconds.