Back to Converter

API Documentation

Learn how to integrate the Web2MD API into your applications with our comprehensive guide

Available API Services

Overview
The Web2MD API allows you to convert any webpage into clean Markdown format with a simple HTTP request
POSThttps://www.web2md.site/api/convert
Request Format

Headers

Content-Type: application/json

Body Parameters

url(string, required)

The URL of the web page you want to convert

options(object, optional)

Conversion options object

includeTitle (boolean) - Include page title
includeLinks (boolean) - Preserve links
improveReadability (boolean) - Extract main content
Response Format
{
  "markdown": "# Page Title\n\nContent...",
  "title": "Page Title"
}
Code Examples
curl -X POST https://www.web2md.site/api/convert \
  -H 'Content-Type: application/json' \
  -d '{
    "url": "https://example.com/docs",
    "options": {
      "includeTitle": true,
      "includeLinks": true,
      "improveReadability": true
    }
  }'
Crawler API Overview
The /api/crawler endpoint lets you crawl a website and retrieve all discovered URLs, with flexible options for scope and performance.
POSThttps://www.web2md.site/api/crawler
Request Format

Headers

Content-Type: application/json

Body Parameters

url(string, required)

The starting URL to crawl

options(object, optional)

Crawling options object

maxUrls (number) - Max URLs to crawl (default: 100)
sameDomain (boolean) - Restrict to same domain (default: true)
timeout (number) - Per-request timeout in ms (default: 5000)
delay (number) - Delay between requests in ms (default: 1000)
Response Format
{
  "urls": [
    "https://example.com/",
    "https://example.com/about",
    "https://example.com/contact"
  ],
  "errors": [],
  "totalProcessed": 3
}
Code Examples
curl -X POST https://www.web2md.site/api/crawler   -H 'Content-Type: application/json'   -d '{
    "url": "https://example.com/",
    "options": {
      "maxUrls": 10,
      "sameDomain": true,
      "timeout": 5000,
      "delay": 1000
    }
  }'