---
title: Convert Webpages to Markdown API
slug: convert-webpages-to-markdown
url: https://apyhub.com/martin10291/service/convert-webpages-to-markdown
provider: Martin Petrov
categories: [Ingestion Kit, Retrieval Kit, Media Kit]
tags: [web-scraping, markdown-conversion, website-crawling, content-extraction, html-to-markdown]
auth: api_key
version: 1.0
service_type: sync
endpoints: 1
atoms: 100
mcp: true
---

# Convert Webpages to Markdown API

Webpages to Markdown API converts public URLs to Markdown. Send `startUrls` and get page text, headings, links, images, and errors. Free tier, no card.

## Endpoints

| Method | URL | Description | Atoms |
| --- | --- | --- | --- |
| POST | `https://api.eu.apyhub.com/martin10291/convert-webpages-to-markdown` | What it does Converts one or more web pages into Markdown and returns the fetched page records in a… | 100 |

## Endpoint reference

### Web Fetch - URL to Markdown, $1/1k Pages, 3s Runs

`POST https://api.eu.apyhub.com/martin10291/convert-webpages-to-markdown` · 100 atoms · accepts `application/json` · returns `application/json`

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `crawl` | body | boolean | no | When on, the actor also follows links that stay on the same domain as each start URL, up to Max crawl depth and Max pages. Example: `false`. |
| `maxDepth` | body | integer | no | Only used when crawling. 1 = start URLs plus the pages they link to. Example: `1`. |
| `maxPages` | body | integer | no | Hard limit on pages fetched in one run (also limits what you pay for). Failed pages count too. Example: `20`. |
| `startUrls` | body | array of string | no | Web pages to convert to clean Markdown, one full URL per entry (http or https). Public pages only, no login pages. Example: `["https://en.wikipedia.org/wiki/Web_scraping","https://blog.apify.com/intr… |
| `timeoutSecs` | body | integer | no | Give up on a page that does not answer within this time. Example: `20`. |
| `includeLinks` | body | boolean | no | Add the page links to every result as internalLinks and externalLinks lists (absolute URLs, up to 200 each). Example: `false`. |
| `includeFailed` | body | boolean | no | When on, pages that fail (blocked by robots.txt, HTTP error, timeout) are also saved with an error message and are charged like normal results. When off, failures are only listed in the RUN_SUMMARY r… |
| `includeImages` | body | boolean | no | Add the page images (absolute URL and alt text, up to 100) to every result. Example: `false`. |
| `maxCharsPerPage` | body | integer | no | Cut markdown and text after this many characters to fit LLM context windows. 0 = no limit. The truncated flag tells you when a page was cut. Example: `0`. |

#### Quickstart

Send one or more public URLs to convert their pages into clean Markdown.

```bash
curl -X POST "https://api.eu.apyhub.com/martin10291/convert-webpages-to-markdown" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"startUrls":["https://en.wikipedia.org/wiki/Web_scraping"]}'
```

#### What you'll get back

Returns a JSON object with `billed` and `count` integers, plus an `items` array of result objects.

Each item includes fields such as `url`, `title`, `finalUrl`, `headings`, `language`, `markdown`, `extractor`, `fetchedAt`, `truncated`, `wordCount`, `statusCode`, `contentHash`, `description`, `publishedDate`, and `error` when present.

```json
{
  "billed": 1,
  "count": 1,
  "items": [
    {
      "url": "https://en.wikipedia.org/wiki/Web_scraping",
      "title": "Web scraping",
      "author": null,
      "finalUrl": "https://en.wikipedia.org/wiki/Web_scraping",
      "headings": ["Web scraping"],
      "language": "en",
      "markdown": "# Web scraping\n...",
      "extractor": "url-to-markdown",
      "fetchedAt": "2026-11-14T00:00:00.000Z",
      "truncated": false,
      "wordCount": 1234,
      "statusCode": 200,
      "contentHash": "abc123",
      "description": null,
      "publishedDate": "2024-01-01"
    }
  ]
}
```

## About

## What it does

The Webpages to Markdown API converts public web pages to Markdown in one request. Send one or more `startUrls`, such as `https://en.wikipedia.org/wiki/Web_scraping`. You get the page title, headings, language, Markdown text, word count, and source details for each page.

Set `crawl` to true to follow links on the same domain. Use `maxDepth` from 1 to 5, and `maxPages` to cap the run. Send `timeoutSecs` to stop waiting after 3 to 120 seconds. Turn on `includeLinks` for internal and external links, or `includeImages` for page images with alt text.

Teams use the Webpages to Markdown API to save pages for search, LLM input, and content checks. They also use it to turn live pages into text that is easier to store and compare.

When a page fails, `includeFailed` can save the error row too. Set `maxCharsPerPage` to cut long text for LLM context windows, and use `truncated` to see when a page was cut.

## Usage

Base URL: `https://api.eu.apyhub.com` (default region — see
`GET https://apyhub.com/api/public/regions` for the rest).

Authenticate with an ApyHub API key in the `apy-token` header.
Full docs and a live playground: https://apyhub.com/martin10291/service/convert-webpages-to-markdown
