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.
titleis a stringlengthis an integercontentis a stringshort_titleis a string
{
"title": "Example Article",
"length": 24,
"content": "Example Article This is a short example.",
"short_title": "Example"
}Loading your default key…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
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
| url | String | No | The source URL for the HTML, if available. |
| html | String | Yes | The 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.
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
| title | String | No | The extracted page or article title. |
| length | Integer | No | The length of the extracted content. |
| content | String | No | The main readable content extracted from the HTML. |
| short_title | String | No | A shorter version of the extracted title. |