Web Page to Markdown API
Send the address of one web page and get its content back as Markdown: headings, lists, tables, code blocks and links kept, menus removed, with word and token counts.
- 100 free credits
- No card needed
- No scraper to build or maintain
curl "https://pipefetch.com/v1/web/content?url=https%3A%2F%2Fdocs.apify.com%2Facademy" \
-H "x-api-key: YOUR_API_KEY"const res = await fetch('https://pipefetch.com/v1/web/content?url=https%3A%2F%2Fdocs.apify.com%2Facademy', {
headers: { 'x-api-key': process.env.PIPEFETCH_API_KEY },
});
const { data, credits } = await res.json();import os, requests
res = requests.get(
"https://pipefetch.com/v1/web/content",
params={"url": "https://docs.apify.com/academy"},
headers={"x-api-key": os.environ["PIPEFETCH_API_KEY"]},
)
data = res.json()["data"]What you get
- The content of the page as Markdown, with headings, lists, quotes, tables, code blocks and links kept
- Or, with format=text, the same content without the heading, list and quote marks
- The title, description and language of the page, and its canonical address when it states one
- The headings in page order, as an outline
- A word count and an estimated token count of the content
- A needsJavaScript flag for a page that builds its text in the browser
{
"data": {
"url": "https://docs.apify.com/academy",
"canonicalUrl": "https://docs.apify.com/academy",
"title": "Apify Academy | Academy | Apify Documentation",
"description": "Learn everything about web scraping and automation with our free courses that will turn you into an expert scraper developer.",
"language": "en",
"content": "# Apify Academy\n\nCopy for LLM\n\nLearn everything about web scraping and automation with our free courses that will turn you into an expert scraper deve…",
"wordCount": 241,
"tokenCount": 364,
"headings": [
"Apify Academy",
"Beginner courses"
],
"needsJavaScript": false
},
"credits": {
"used": 1,
"remaining": 99
}
}One GET request
Everything the endpoint accepts. The full reference, with the complete example response, is in the docs.
GET/v1/web/content
Costs 1 credit per request. Only requests that return data are charged.
Parameters
| Name | Type | Description |
|---|---|---|
urlrequired |
string | The full address of one page, path and query included, such as https://docs.apify.com/academy. Only that page is read. |
formatoptional |
string | markdown keeps headings, lists, quotes, tables, code blocks and links as Markdown. text is the same content without the heading, list and quote marks. One of: markdown, text. Default: markdown. |
Good to know
- One request reads one page. Links are not followed, and files such as PDFs and images are not read.
- The page is read as plain HTML and JavaScript is not run. A page that builds its text in the browser comes back with needsJavaScript true and the little text its HTML holds; when it holds none, the request answers 404 needs_javascript.
- Scripts, styles, forms, buttons and images are dropped, and so are menus: blocks made almost entirely of links, and the short link fragments above the first heading and below the last. This is judged from the one page alone, so a stray label or a line of footer text can remain. Links stay as [text](url) in both formats.
- tokenCount is an estimate made from the words and punctuation of the content, not the count of a particular tokenizer.
- robots.txt is respected: a page it closes to crawlers answers 404 not_allowed. A page that does not exist answers 404 page_not_found, an address with almost no text or with a file behind it 404 no_content, a site that refuses automated requests 404 website_blocked and one that does not answer 404 website_unreachable. None of these costs anything.
What people build with it
Give a page to an LLM
Markdown keeps the structure a model reads well and leaves out scripts, styles and menus.
Build a RAG index
Store the content with its headings and token count, and split it to fit your embedding model.
Web reading for AI agents
An agent that needs to read a page gets its text in one tool call.
Watch a page for changes
Fetch a page on a schedule and compare the text with the last one you stored.
Buy credits once. Use them whenever.
This endpoint costs 1 credit per request, and a request that returns no data costs nothing. Move the slider to see what your volume costs.
One credit is one request that returns data. Requests that return nothing are free.
- $2.42 per 1,000 requests
- About $12.08 a month at this pace
- Lasts about 2.4 months at this pace
- Credits never expire
Questions and answers
How is a page turned into Markdown?
The page is fetched as plain HTML and converted tag by tag: headings, paragraphs, lists, quotes, table rows and code blocks become Markdown, and links stay as [text](url). Scripts, styles, forms, buttons, embedded frames and images are dropped.
What is removed from the page?
Menus: blocks made almost entirely of links, and the short link fragments above the first heading and below the last one, which is where navigation and footers sit. This is judged from the one page alone, so a stray label or a line of footer text can remain.
Does it run JavaScript?
No. A page whose HTML holds almost no text because it is built in the browser comes back with needsJavaScript true and the little text there is. When there is no text at all, the request answers 404 needs_javascript and costs nothing.
What can it not read?
A page that the site's robots.txt closes to crawlers answers 404 not_allowed, a site that refuses automated requests answers 404 website_blocked, and a file such as a PDF or an image answers 404 no_content. None of these costs anything. Nothing is sent to log in, so a page behind a login comes back as whatever the site shows a visitor who is not logged in. One request reads one page: links are not followed.
May I store and reuse the content?
The API gives you the text, not the rights to it: those stay with whoever published the page. When a page names people, that is personal data, data-protection law such as the GDPR applies to whoever stores it, and our terms forbid using the API to harass people or to build profiles of private individuals.
Is this an official API of the websites it reads?
No. Pipefetch is an independent service and is not affiliated with the websites it reads. It returns what a page serves to any visitor who is not logged in.
What does a request cost?
One request costs 1 credit. Credit packs start at $9 for 3,000 credits, never expire, and a request that returns no data is not charged. New accounts get 100 free credits without a card.
Step-by-step guides
How to extract email addresses from a website in Python
A requests and Beautiful Soup script for mailto links and contact pages, where it stops, an API for the same job, and what the addresses may be used for.
Read the guideHow to turn a web page into Markdown in Python
html2text, markdownify and trafilatura with code, what to do about menus and pages built in the browser, and an API that returns a page as Markdown.
Read the guideHow to give Claude or Cursor live web data (MCP server)
One config block gives your AI assistant a tool for every endpoint: profiles, posts, search results, transcripts and company websites.
Read the guideHow to give an LLM live Google results with tool calling
The providers' built-in search tools, and your own Google search tool with the complete tool-calling loop in Python, with what each costs.
Read the guideHow to build a LangChain tool that reads web pages and searches Google
Two @tool functions, one that reads a page as Markdown and one that searches Google, wired into create_agent, on free libraries or an API.
Read the guideHow to turn a web page into Markdown in JavaScript for RAG
Turndown and Mozilla's Readability with code, where each one stops, pages built in the browser, and an API that returns a page as Markdown.
Read the guideHow to check robots.txt in Python before you fetch a page
urllib.robotparser as it works today, what RFC 9309 asks of a crawler, the cases the module leaves to you, Protego, and an API that checks robots.txt for you.
Read the guide
Free tools for the same data
HTML to Markdown converter
Paste HTML and get Markdown, tables included, with your choice of heading style, bullet, code blocks and links. It converts what you paste and fetches nothing.
Open the toolcURL to Python converter
Paste a curl command and get the same request as Python code that uses Requests, with a note for any option it does not carry over. The command stays in your browser.
Open the toolcURL to JavaScript fetch converter
Paste a curl command and get the same request as JavaScript fetch code, with a note for anything fetch cannot do. The command stays in your browser.
Open the toolrobots.txt tester
Paste a robots.txt file, a URL and a crawler name to see whether the URL is allowed, and which group and which rule decided it, by the rules of RFC 9309.
Open the toolGoogle search snippet preview
Type a title, a URL and a meta description to see how a Google result might show them, with their length in characters and in pixels, measured in your browser.
Open the toolMeta title and description length checker
Paste a page's HTML source, or type its title and meta description, to check their length in characters and in pixels and see where a result might cut them.
Open the tool
More Websites APIs
-
1 credit
Website Contacts API
The emails, phone numbers and social profiles a website publishes, with its contact page, address and company name.
GET /v1/web/contacts -
1 credit
Brand API
The logo, icon, brand colors, fonts, description and social profiles of a company, read from its website.
GET /v1/web/brand -
1 credit
Website Tech Stack API
The technologies a website runs on, by category, with its hosting, DNS, email setup, tracking ids and security headers.
GET /v1/web/tech
Other sources
YouTubeInstagramTikTokFacebookGoogleThreadsLinkedInApp storesSteamXPinterestAirbnbReal estateKeywordsJob boardsEventbriteShopify storesPublic tenders
Make your first request in a minute
Sign in, copy your key and call an endpoint. Your account starts with 100 free credits.