Lee este artículo en español.
n8n Web Scraping: Get Any Page as Clean Markdown (Free or API)
Short answer: The free way is an HTTP Request node (Method
GET, Response Format Text) followed by a Markdown node in mode HTML to Markdown. It works on normal pages that don't need JavaScript. Use the Cofferdock API only when the page needs JavaScript to show its content, or when you want just the main text without picking CSS selectors.
Many people want to feed a web page to an AI, save an article, or watch a site for changes. Raw HTML is hard to read and full of menus and scripts, so what you want is the text in Markdown. This guide shows the free way inside n8n first, and then explains when an API saves you time.
The free way: HTTP Request + Markdown node
- Add an HTTP Request node. Set Method to
GETand URL to the page address, for examplehttps://example.com/article. - Open Options, then Response, and set Response Format to Text. The HTML of the page lands in a field called
data. - Add a Markdown node after it and set Mode to HTML to Markdown.
- In HTML, write
{{ $json.data }}. - Set Destination Key to
markdown. The clean text is now in{{ $json.markdown }}.
Tip: In the options of the Markdown node, use Ignored Elements to drop the parts you don't want, such as nav, footer, header, script and style. This removes most of the noise.
Only a few fields? Use the HTML node
If you only need one or two pieces of data, such as the title, the HTML node is lighter:
- Add an HTML node with the HTML from the previous step as input.
- Set the operation to Extract HTML Content, Source Data to JSON and JSON Property to
data. - Add a value with Key
title, CSS Selectorh1and Return Value Text.
Where the free way falls short
- It doesn't run JavaScript. Pages that build their content with JavaScript come back almost empty.
- It takes the whole page. Menus, footers and banners come too, unless you drop those elements one by one.
- Selectors change from site to site. A selector that works on one site may break on the next.
The API way: Cofferdock URL to Markdown
When the free way isn't enough, add an HTTP Request node that calls the Cofferdock API:
- Method:
POST - URL:
https://api.cofferdock.com/web-to-markdown - Send Headers: on. Add
x-api-keywith your key, andContent-Typewithapplication/json. - Send Body: on, with Body Content Type set to JSON and the body
{ "url": "{{ $json.url }}" }.
The text arrives in {{ $json.content }} and the page title in {{ $json.title }}. Keep your API key private, since anyone who can open the workflow can read it.
What makes it different from the free way:
- It opens the page in a real browser (Chromium) with JavaScript on, so it also reads sites that build their content with JavaScript.
- By default it keeps only the main content, using the same detection as Firefox's reader view, so menus and footers are left out.
- It also returns details such as the author, site name, published date, language and description, when the page declares them.
A quick example
Say you have a list of 30 article URLs in a spreadsheet. Connect that list to the HTTP Request node above. n8n calls the API once per URL, and you can then save each content to a document, or pass it to an AI step that summarises it.
If an AI reads the text, remember that it comes from someone else's website and may contain sentences that look like instructions. Treat it as data, not as commands.
Options you can tweak
Add these fields to the JSON body, next to url, for example { "url": "...", "main_content": false }.
| Option | Default | What it does |
|---|---|---|
format | markdown | markdown, text (plain text) or metadata (only title, description, image and similar) |
main_content | true | true keeps only the main content. false returns the whole page, which helps on home pages and listings |
include_links | true | Keeps the links in the text |
include_images | false | true adds images as Markdown links |
max_chars | 200000 | Cuts the text at this length (100 to 1,000,000). If it is cut, truncated is true |
Prefer to see it in code?
The same call from a terminal:
curl -X POST "https://api.cofferdock.com/web-to-markdown" \
-H "x-api-key: YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"url": "https://example.com/article"}'
How much does it cost?
Each page read costs 1 credit, and failed calls are not charged. The free plan includes 50 credits a month with no card. The same credits work for every Cofferdock tool.
FAQ
Can n8n scrape websites for free? Yes. The HTTP Request node plus the Markdown or HTML node is enough for pages that don't need JavaScript.
What about pages built with JavaScript? Use the Cofferdock API. It opens the page in a real browser with JavaScript on. The free way gets almost empty HTML from those pages.
Can it read a whole site at once? No. Each call reads one page. To read many pages, put their addresses in a list and run the call for each one.
Is scraping allowed? Only read pages you are allowed to read, and respect each site's terms. The API can't read pages that sit behind a login.
Related guides
- Give your n8n AI agent the power to read web pages
- Website to Markdown: 6 ways
- Screenshot a website in n8n
- URL to PDF in n8n
Try it yourself
Try the URL to Markdown tool on a page you already know. You can create a free account at cofferdock.com/register, with 50 credits a month and no card needed.