Español

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

  1. Add an HTTP Request node. Set Method to GET and URL to the page address, for example https://example.com/article.
  2. Open Options, then Response, and set Response Format to Text. The HTML of the page lands in a field called data.
  3. Add a Markdown node after it and set Mode to HTML to Markdown.
  4. In HTML, write {{ $json.data }}.
  5. 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:

  1. Add an HTML node with the HTML from the previous step as input.
  2. Set the operation to Extract HTML Content, Source Data to JSON and JSON Property to data.
  3. Add a value with Key title, CSS Selector h1 and Return Value Text.

Where the free way falls short

The API way: Cofferdock URL to Markdown

When the free way isn't enough, add an HTTP Request node that calls the Cofferdock API:

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:

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 }.

OptionDefaultWhat it does
formatmarkdownmarkdown, text (plain text) or metadata (only title, description, image and similar)
main_contenttruetrue keeps only the main content. false returns the whole page, which helps on home pages and listings
include_linkstrueKeeps the links in the text
include_imagesfalsetrue adds images as Markdown links
max_chars200000Cuts 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

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.