apyhub
DATA EXTRACTION · DEVELOPER TOOLS

Extract Web Text

What it does

Web Text Extractor pulls the visible text from a webpage and returns it as either a single string or an array of lines. Send a url, and optionally set preserve_paragraphs to keep paragraph structure instead of splitting the text into discrete lines.

Use it when you need page content without HTML noise: indexing articles, feeding webpage text into search or analysis pipelines, or capturing the readable body of a page for downstream processing. The /split endpoint returns data as an array of strings, while the other GET endpoint returns data as one string.

This is useful for scraping content that should ignore menus, scripts, and other non-visible elements. If you are building a crawler, a content summariser, or a monitoring job that watches page copy for changes, Web Text Extractor gives you a clean text layer from a URL.

▣ ENDPOINT 01 / 02
GET
Extract visible text from a webpage (array of lines)
https://api.eu.apyverse.com/apyhub/extract-web-text/split

QUICKSTART

GUIDE

Quickstart

Extract the text from a web page by passing its URL as a query parameter.

curl -X GET "https://api.eu.apyverse.com/apyhub/extract-web-text/split?url=https%3A%2F%2Fexample.com" \
  -H "apy-token: $APY_TOKEN"

What you'll get back

Returns a JSON object with a data array of strings — each string is one extracted line of text from the page.

{
  "data": [
    "Welcome to the sample page.",
    "This is visible body text."
  ]
}
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.

About this endpoint

What it does

Extracts the visible text from a webpage identified by a URL and returns it as an array of text lines. You can optionally preserve paragraph grouping instead of splitting the extracted text into discrete lines.

Query Parameter(s)

AttributeTypeMandatoryDescription
urlStringYesWebpage URL to extract text from. Must be a valid URI.
preserve_paragraphsBooleanNoWhen true, preserves paragraph grouping in the extracted text. Default: false.

Response

Returns a JSON object with a data string array field containing the extracted visible text split into discrete lines, unless preserve_paragraphs is true.

ParameterTypeMandatoryDescription
dataString ArrayYesExtracted text split into discrete lines, unless preserve_paragraphs is true.

Query parameters

Name
Type
Description
urlREQUIRED
string
preserve_paragraphsOPTIONAL
boolean
DEFAULT false
▣ ENDPOINT 02 / 02
GET
Extract visible text from a webpage (single string)
https://api.eu.apyverse.com/apyhub/extract-web-text

QUICKSTART

GUIDE

Quickstart

Fetch the visible text from a webpage by passing its URL as a query parameter.

curl -X GET "https://api.eu.apyverse.com/apyhub/extract-web-text?url=https%3A%2F%2Fexample.com" \
  -H "apy-token: $APY_TOKEN"

What you'll get back

Returns a JSON object with a data string field containing the extracted visible text from the webpage.

{
  "data": "Welcome to the sample page. This is visible body text."
}
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.

About this endpoint

What it does

Extracts the visible text from a webpage and returns it as a single string. You provide the webpage URL, and the response contains the extracted text in data.

Query Parameter(s)

AttributeTypeMandatoryDescription
urlStringYesWebpage URL to extract text from. Must be a valid URI.
preserve_paragraphsBooleanNoWhen true, preserves paragraph separation in the extracted text. Default: false.

Response

Returns a JSON object with a data string field containing the extracted visible text from the webpage.

ParameterTypeMandatoryDescription
dataStringYesExtracted visible text from the webpage.

Query parameters

Name
Type
Description
urlREQUIRED
string
preserve_paragraphsOPTIONAL
boolean
DEFAULT false
▣ 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.