Web Page to Markdown | Character Limit for AI Agents
Pricing
from $1.00 / 1,000 converted pages
Web Page to Markdown | Character Limit for AI Agents
Convert one public HTML page into Markdown for an AI prompt or RAG pipeline. Set maxChars to cap the output in Unicode characters. Each result includes the page title, final URL, original length and a flag showing whether the Markdown was truncated. Works with static HTML.
Pricing
from $1.00 / 1,000 converted pages
Rating
0.0
(0)
Developer
Wayturn Hung
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
11 days ago
Last modified
Categories
Features
Share
Give a research agent the main text of one public, static HTML page. Set a character budget before fetching it. The result includes Markdown, the title and the final URL for citation.
Try a 200-character excerpt
In a test with the page below, the extracted Markdown was 9,349 Unicode characters long. This input returned exactly 200 characters with truncated set to true. The source page can change over time.
{"url": "https://docs.apify.com/platform/proxy/google-serp-proxy","maxChars": 200}
Input
| Field | Type | Default | Description |
|---|---|---|---|
url | string | https://example.com/ | Public http(s) URL. Private, loopback and link-local addresses are blocked, including via DNS and redirects. |
maxChars | integer | 8000 | Maximum Unicode characters in markdown (100 to 200000). |
Output
One dataset item:
| Field | Description |
|---|---|
url | The URL you requested |
finalUrl | The URL after redirects |
title | Page title |
markdown | Main content as Markdown (headings, links and lists preserved) |
truncated | true if the content was cut to maxChars |
originalLength | Length of the full Markdown in Unicode characters |
How it works
- Validates the URL and the
maxCharsrange. - Resolves the hostname and blocks any private or reserved address. Each redirect hop is re-checked.
- Fetches static HTML with a 20 second timeout, a 5 MB body cap and up to 5 redirects.
- Removes scripts, styles, navigation, headers, footers, sidebars and forms.
- Uses
<main>,<article>or[role=main]when present, otherwise<body>. - Converts to Markdown and truncates by Unicode code point.
Failures stop the run with an explicit message, for example an HTTP error, a timeout, a non-HTML content type, or a blocked private address.
Limits
- Static HTML only. Pages that need JavaScript to render their content return little or no text.
- No login, cookies or custom headers.
Cost
A converted page costs $0.001. The start fee is $0.00005 per allocated GB (minimum one event). At 1 GB, converting one page costs $0.00105.
Local development
npm installapify run
Put a test input in storage/key_value_stores/default/INPUT.json, for example {"url": "https://example.com/", "maxChars": 500}.