# URL to Markdown API

> URL to Markdown converts any webpage URL into structured Markdown text. Each response delivers the page title, converted text, word count, and element counts, with paid plans adding optional link and image syntax.

**Endpoint:** `POST https://api.apiverve.com/v1/urltomarkdown`  
**Category:** Data Conversion  
**Cost:** 10 credits per call  
**Canonical page:** https://apiverve.com/marketplace/urltomarkdown

## Overview

This URL to Markdown and website to markdown API converts a webpage to Markdown in one call: send any public URL and get back the page title, the Markdown text and a word count, ready for LLM, RAG and docs pipelines. Headings, paragraphs, lists, tables, code blocks, quotes and emphasis are kept as Markdown, while navigation, headers, footers, sidebars, cookie banners and scripts are removed, so what is left is the main content of the page.

Teams use it to feed articles and documentation into language models, build knowledge bases from help centres, archive pages as plain text, or turn a competitor's changelog into something a script can read. The response also counts the images and links found in the content, which helps you decide whether a page is worth processing further.

On the Free plan links are reduced to their text and images are left out. Paid plans can turn on includeLinks and includeImages to keep full Markdown link syntax and image references with absolute URLs.

## Authentication

Every call carries your key in an `x-api-key` header. The same key works across the whole
APIVerve catalog — there are no per-API subscriptions. Responses always use the same three
top-level keys: `status`, `error`, and `data`.

## Example request

```bash
curl -X POST "https://api.apiverve.com/v1/urltomarkdown" \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://example.com/","includeImages":true,"includeLinks":true}'
```

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `url` | string | Yes | The URL of the webpage to convert to Markdown; without a scheme, https:// is assumed. url |
| `includeImages` | boolean | No | Whether to include image references in the Markdown output. default false. Premium field |
| `includeLinks` | boolean | No | Whether to include hyperlinks in the Markdown output. default false. Premium field |

## Response fields

- `url` — string · The original URL that was converted
- `title` — string · Page title extracted from the webpage
- `markdown` — string · The converted Markdown content
- `wordCount` — number · Number of words in the extracted content
- `imageCount` — number · Number of images found in the content
- `linkCount` — number · Number of links found in the content

## Sample response

```json
{
  "status": "ok",
  "error": null,
  "data": {
    "url": "https://example.com/",
    "title": "Example Domain",
    "markdown": "# Example Domain\n\n\nThis domain is for use in documentation examples without needing permission. Avoid use in operations.\n\n\n[Learn more](https://iana.org/domains/example)",
    "wordCount": 20,
    "imageCount": 0,
    "linkCount": 1
  }
}
```

## Use cases

- **Static Site Migration** — Developers moving legacy blogs to static site generators extract page titles and converted text to generate clean Markdown source files automatically.
- **Offline Documentation Readers** — Technical writers turn public product docs into offline Markdown manuals, tracking extracted word counts across pages to structure revision bundles.
- **Knowledge Base Ingestion** — Feed live help center URLs to internal knowledge bases, stripping unnecessary HTML markup while preserving document headings and lists for local search.
- **Web Page Archiving** — Before third-party guides go offline, research teams store target articles as version-controlled Markdown text plus recorded image and link counts.

## SDKs

- **npm** — `npm install @apiverve/urltomarkdown` (https://www.npmjs.com/package/@apiverve/urltomarkdown)
- **NuGet** — `dotnet add package APIVerve.API.URLtoMarkdown` (https://www.nuget.org/packages/APIVerve.API.URLtoMarkdown)
- **Source** — https://github.com/apiverve/urltomarkdown-api

## More

- Full reference: https://docs.apiverve.com/ref/urltomarkdown
- Get an API key: https://dashboard.apiverve.com
- Full catalog: https://apiverve.com/marketplace
