Web Page API
Web Page API is a hosted REST API that turns any public URL into a link preview (title, description, images, favicons, Open Graph and Twitter card fields) or into the page's main content as clean Markdown for LLM prompts and RAG, both behind one API key. It fetches without a headless browser, refuses private-network and cloud-metadata addresses, and stores nothing.
Get an API key
Quick start
Link preview for a URL:
curl "https://web-page-api.p.rapidapi.com/v1/preview?url=https://en.wikipedia.org/wiki/Markdown" \ -H "X-RapidAPI-Key: YOUR_KEY" -H "X-RapidAPI-Host: web-page-api.p.rapidapi.com"
The same page as clean Markdown:
curl "https://web-page-api.p.rapidapi.com/v1/markdown?url=https://en.wikipedia.org/wiki/Markdown&include_links=true" \ -H "X-RapidAPI-Key: YOUR_KEY" -H "X-RapidAPI-Host: web-page-api.p.rapidapi.com"
For this small sample page (https://example.com/blog/launch), the preview response is (real extractor output, trimmed):
{
"url": "https://example.com/blog/launch",
"final_url": "https://example.com/blog/launch",
"status": 200,
"title": "We launched",
"description": "What we built, and what comes next.",
"site_name": "Example Blog",
"canonical": "https://example.com/blog/launch",
"lang": "en",
"type": "article",
"images": [{"url": "https://example.com/img/launch.png", "width": 1200, "height": 630, "source": "og"}],
"favicons": [{"url": "https://example.com/favicon.ico", "rel": "icon"}],
"twitter": {"card": "summary_large_image"},
"image": "https://example.com/img/launch.png"
}
and the Markdown response is:
{
"title": "We launched",
"markdown": "# We launched\n\nAfter a year of work the product is live. This post explains what it does.\n\n## What comes next\n\n- An API\n- A mobile app",
"word_count": 25,
"reading_time_minutes": 1,
"truncated": false
}
Endpoints
| Method | Path | What it does |
|---|---|---|
| GET | /v1/preview?url= | Link preview: title, description, site_name, canonical, lang, type, image and images[] (absolute, with width, height and alt when declared), videos[], favicons[], theme_color, author, published_time, modified_time, keywords, oembed, twitter{card, site, creator, title, description, image} |
| GET | /v1/markdown?url= | Fetches the page and returns its main content as Markdown, with title, description, lang, image, word_count, reading_time_minutes, truncated and links[] |
| POST | /v1/markdown | Same, for HTML you already have: {"html": "...", "base_url": "..."}. Nothing is fetched |
Every URL response also has final_url, status, redirects, content_type, fetch_ms and cached. Non-HTML URLs (an image, a PDF) get a minimal preview with type from the content type instead of an error.
Parameters
| Name | Endpoints | Default | What it does |
|---|---|---|---|
url | GET preview, GET markdown | required | Absolute http(s) URL, up to 2,048 characters. Ports 80 and 443 only |
include_links | markdown | false | Keep hyperlinks in the Markdown and return a links list |
include_images | markdown | false | Keep images as  |
max_chars | markdown | 100,000 | Truncate the Markdown to this many characters (100 to 1,000,000) |
html, base_url | POST markdown | html required | The HTML (up to 3,000,000 characters) and the URL it came from, used only to resolve relative links |
Full schema: openapi.json. Crawler details: /bot.
Safety and limits
- Private, loopback, link-local, CGNAT, reserved and cloud-metadata addresses are refused in every IPv4 and IPv6 spelling, as are internal names such as
localhostand*.internal. - DNS is resolved once, checked, and the connection goes to that exact IP (no DNS rebinding). Every redirect hop is checked again, at most 5.
- One 8-second deadline for the whole fetch, 3 MB maximum page size (compressed or not).
/v1/markdownhonours robots.txt for the tokenWebPageAPI./v1/previewdoes not, like Slack and Discord link unfurlers.- No headless browser: JavaScript is not run.
- Nothing is written to disk; responses are cached in memory for 10 minutes.
Pricing
One request is one call to either endpoint.
| Plan | Price | Requests | Over the limit |
|---|---|---|---|
| BASIC (RapidAPI) | Free | 300 / month | Hard limit |
| PRO (RapidAPI) | $9.99 / month | 20,000 / month | $0.001 per request |
| ULTRA (RapidAPI) | $29.99 / month | 100,000 / month | $0.0008 per request |
| MEGA (RapidAPI) | $79.99 / month | 400,000 / month | $0.0005 per request |
| Apify Actor | Pay per result | Up to 1,000 URLs per run | $0.0015 per page; failed pages free |
How it compares
| Option | What it does | Price |
|---|---|---|
| Web Page API | Link previews and clean Markdown behind one key; no browser; SSRF-safe | Free 300/month; $9.99 for 20,000; Apify $1.50 per 1,000 |
| link-preview4 (RapidAPI) | Link previews only | Cheaper per request, but no Markdown |
| Microlink | Link previews plus screenshots and PDFs via a headless browser | Free 100/month; Pro $49 for 46,000 (about $1.07 per 1,000) |
| Firecrawl | Scraping and crawling to Markdown, renders JavaScript | Free 1,000 credits; Hobby $19/month for 5,000 pages |
| Jina Reader | URL to Markdown by prefixing r.jina.ai | Free at 20 requests/minute without a key; token-based billing with a key |
Competitor prices checked on their own pricing pages on 2026-10-24.
Frequently asked questions
How do I get a link preview (title, image, description) for a URL with an API?
Call GET /v1/preview?url=... on Web Page API. It returns the title, description, site name, canonical URL, language, images with width and height, favicons, theme colour, author, publish date, oEmbed endpoint and Twitter card fields, all as absolute URLs. It falls back from Open Graph to Twitter cards to plain HTML, so pages without social tags still give a usable card.
How do I convert a web page to Markdown for ChatGPT, Claude or a RAG pipeline?
Call GET /v1/markdown?url=... on Web Page API. It returns only the main content (article, docs page, README) as Markdown without menus, footers or cookie banners, plus word count, reading time and an optional list of links. max_chars caps the size (default 100,000, up to 1,000,000). If you already have the HTML, POST it to /v1/markdown and nothing is fetched.
Is there one API for both link previews and URL to Markdown?
Yes. Web Page API does both with one key and one quota: /v1/preview for link unfurling and /v1/markdown for clean article text. Most alternatives do only one of the two.
Is it safe to let users submit any URL? What about SSRF?
Web Page API is built for untrusted URLs. It refuses private, loopback, link-local, CGNAT and cloud-metadata addresses (such as 169.254.169.254) and internal names, in every IPv4 and IPv6 spelling; it resolves DNS once and connects to that exact IP, so DNS rebinding does not work; it re-checks every redirect hop (at most 5); and it allows only ports 80 and 443.
Does Web Page API respect robots.txt?
Markdown requests do: /v1/markdown honours robots.txt for the token WebPageAPI (else *) and returns robots_disallowed when a site opts out. Link previews do not, the same as Slack, Discord and iMessage unfurlers, because a preview is a one-off, user-initiated read of public head metadata.
Does it render JavaScript?
No. There is no headless browser, which keeps responses fast and cheap. Pages that build their content with JavaScript return what the server sends; that is usually still enough for a preview, but single-page apps may give little Markdown.
How fast is it and what are the limits?
Most pages answer in well under a second. One 8-second deadline covers DNS, connect, TLS, redirects and body, pages over 3 MB are refused, and results are cached for 10 minutes. Errors are JSON with stable codes such as blocked_address, robots_disallowed, timeout and upstream_error.
How much does Web Page API cost?
On RapidAPI: free for 300 requests a month, then $9.99 for 20,000, $29.99 for 100,000 and $79.99 for 400,000 a month. On Apify it is pay per result at $0.0015 per page ($1.50 per 1,000), up to 1,000 URLs per run.
Does it store the pages or URLs I send?
No. Nothing is written to disk and there is no database. Responses are kept in memory for 10 minutes so repeated requests are fast, then dropped.
Free tools
- URL to Markdown converter: paste a URL or HTML, get clean Markdown
Last updated 2026-10-24. Machine-readable summary: llms.txt.