Free plan

Web Page to Markdown

Save a web page as clean, simple text without ads
POST
/v1/documents/web-to-markdown

About this tool

This tool takes a web page and turns its main article into Markdown, which is plain text with simple marks, such as # for headings and - for lists. Menus, ads and scripts are left out. You can keep links and pictures or not. Give a web address, or paste the page code.
For example, you save a long article into your notes app without the menus and ads.

How to use it

  1. Choose this tool.
  2. Type the web address, or paste the page code.
  3. Choose whether to keep links and pictures.
  4. Press Generate.
  5. Copy the Markdown or download it.

What you get back

You get the cleaned article as Markdown on screen to copy or download. Pages that need a login cannot be read.
GOOD TO KNOW
A web address or page source in, one Markdown file out. The page is only read as text: no script runs and nothing else is loaded. Counts as one document.
TEST IT LIVE

Try Web Page to Markdown in the Studio

One click opens the Studio with this tool already selected. Add your file and see the result in seconds.
Open in the Studio
Family
Documents
Plan
Free
Method
POST
Endpoint
/v1/documents/web-to-markdown
Tool ID
documents.web-to-markdown
Authentication
API key
Accepts
Text and settings
Background jobs
Yes
Usage group
Documents
For developers

Use it from your code

cURL

curl -X POST "https://app.h2i.davixlabs.io/v1/documents/web-to-markdown" \
  -H "X-Api-Key: $DAVIX_H2I_API_KEY" \
  -F 'url=https://example.com/blog/my-post' \
  -F 'selector=article.post' \
  -F 'base_url=https://example.com/blog/'

Node.js

const { DavixH2I } = require('@davixlabs/h2i-sdk');

const h2i = new DavixH2I({ apiKey: process.env.DAVIX_H2I_API_KEY, baseUrl: process.env.DAVIX_H2I_URL });
const result = await h2i.documents.webToMarkdown({
    "url": "https://example.com/blog/my-post",
    "selector": "article.post",
    "base_url": "https://example.com/blog/"
  });
console.log(result.data, result.requestId);

PHP

<?php
require 'vendor/autoload.php';

$h2i = new \Davix\H2I\Client(['apiKey' => getenv('DAVIX_H2I_API_KEY'), 'baseUrl' => getenv('DAVIX_H2I_URL')]);
$result = $h2i->documents()->webToMarkdown([
    'url' => 'https://example.com/blog/my-post',
    'selector' => 'article.post',
    'base_url' => 'https://example.com/blog/',
]);
echo $result->requestId;
FAQ

Frequently asked questions

Turn a web page into clean Markdown: the main article with its headings, lists, tables, code blocks and links, without menus, ads and scripts. Give a web address or the page source.

Web Page to Markdown works from text and settings, so no file is needed. Every input is optional.

Web Page to Markdown is included in every plan, including Free. Each run uses credits from your monthly allowance.

Send a POST request to /v1/documents/web-to-markdown with your API key in the X-Api-Key header. Official SDKs for Node.js, Python, PHP, Go, Java, .NET and Ruby do the same for you, and the code box on this page shows ready-to-copy examples. For large work it can also run as a background job, so your request returns straight away.