Skip to main content

Overview

The Web2MD REST API lets you convert any webpage or raw HTML to clean Markdown programmatically. Use it to build pipelines, automate content ingestion, or integrate Web2MD into your own tools.
The REST API requires a PRO plan. Generate your API key from the Web2MD dashboard.

Machine-readable specs

Use the OpenAPI spec to auto-generate client SDKs or import into tools like Postman, Swagger UI, or AI agent frameworks.

Authentication

All requests must include your API key in the Authorization header:
API keys are prefixed with w2m_ and are tied to your account.

Endpoint

POST https://web2md.org/api/v1/convert

Request body

Provide either url or html, not both. The request will fail with a 400 error if both are present or neither is provided.

Options

Response

A successful response returns:

Rate limits

API requests are rate-limited to 60 requests per minute per API key. If you exceed the limit, the API returns a 429 status code. Wait for the reset window before retrying.

Error responses

All error responses follow this shape:

Examples

Convert a URL with curl

Convert raw HTML with curl

JavaScript (fetch)

Store your API key in an environment variable rather than hardcoding it. For example, use process.env.WEB2MD_API_KEY in Node.js.