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
    }
  }'
Kepler Web Scraper API
Extract precise data from any website using CSS selectors. Perfect for targeted data extraction with powerful selector support.
GEThttps://www.web2md.site/api/kepler
Query Parameters
url(string, required)

The URL of the webpage to scrape. Protocol optional (defaults to http://)

selector(string, required)

CSS selector to target elements. Supports multiple selectors separated by commas

attr(string, optional)

Extract a specific HTML attribute instead of text content (e.g., href, src, class)

spaced(boolean, optional)

Add spaces between HTML tags when extracting text (default: false)

pretty(boolean, optional)

Format JSON response with indentation (default: false)

Response Examples

Single Element Result

{
  "result": "Example Domain"
}

Multiple Elements Result

{
  "result": [
    "First paragraph text",
    "Second paragraph text",
    "Third paragraph text"
  ]
}

Multiple Selectors Result

{
  "result": {
    "h1": ["Example Domain"],
    "p": [
      "This domain is for use in illustrative examples",
      "More information..."
    ]
  }
}
Usage Examples
Extract page title
curl "https://www.web2md.site/api/kepler?url=https://example.com&selector=h1&pretty=true"
Key Features
CSS Selector Support

Use any CSS selector including complex combinations, pseudo-selectors, and attribute selectors.

Multiple Selectors

Extract different elements with comma-separated selectors in a single request.

Attribute Extraction

Extract HTML attributes like href, src, class, or any custom attributes.

CORS Enabled

Ready for browser-based applications with full CORS support.