# Fast Markdown Crawler - URL to LLM-ready Markdown (`projecthax/fast-markdown-crawler`) Actor

Turn any public URL into clean, LLM-ready Markdown, text or HTML. HTTP-first (fast and cheap) with automatic headless-browser fallback only for JavaScript-only pages. Boilerplate removal, same-domain crawling, robots.txt aware.

- **URL**: https://apify.com/projecthax/fast-markdown-crawler.md
- **Developed by:** [ProjectHax](https://apify.com/projecthax) (community)
- **Categories:** AI, Developer tools
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-usage

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Fast Markdown Crawler - URL to LLM-ready Markdown

Turn any public web page into **clean, LLM-ready Markdown** (or plain text, or cleaned HTML) for RAG pipelines, AI agents, vector databases and fine-tuning datasets.

- **Fast and cheap:** plain HTTP first. A headless browser starts only when a page is empty or JavaScript-only, and you pay the browser price only for those pages.
- **Clean output:** navigation, headers, footers, cookie banners and sidebars are removed. Tables, headings, lists and code blocks are kept.
- **Crawl or convert:** convert a list of URLs, or follow same-domain links from each start URL (breadth-first) up to your page limit.
- **Polite by default:** respects `robots.txt` (you can turn this off for your own sites).
- **Metadata included:** title, meta description, language, word count, final URL after redirects, HTTP status, and all links on the page.

### How to use it

1. Add one or more **Start URLs**.
2. Leave **Max pages per start URL** at `1` to convert just those pages, or raise it (for example `200`) to crawl the site.
3. Click **Start**. Download the results as JSON, CSV, Excel or JSONL, or read them through the Apify API, Python and JS clients, MCP server, LangChain or LlamaIndex loaders.

#### Input example

```json
{
  "startUrls": [{ "url": "https://docs.apify.com/academy/web-scraping-for-beginners" }],
  "maxPagesPerStart": 50,
  "outputFormat": "markdown",
  "removeBoilerplate": true,
  "includeLinks": false,
  "respectRobotsTxt": true
}
```

| Field | Default | What it does |
|---|---|---|
| `startUrls` | required | Pages to convert (http/https). |
| `maxPagesPerStart` | `1` | `1` converts only the start URL. Higher values follow same-domain links until this many pages are done for each start URL. |
| `outputFormat` | `markdown` | `markdown`, `text` or `html`. The content field is named after the format. |
| `removeBoilerplate` | `true` | Keep only the main content. Turn off to convert the whole page. |
| `includeLinks` | `false` | Keep `[text](url)` links inside the content. The `links` field is always filled either way. |
| `respectRobotsTxt` | `true` | Skip pages disallowed by robots.txt. Skipped pages are listed with an error and are not charged. |
| `maxTotalPages` | none | Hard cap for the whole run. |
| `browserFallback` | `true` | Render JavaScript-only pages in headless Chromium. Turn off to never use (or pay for) the browser. |
| `maxConcurrency` | `10` | Parallel HTTP requests. Browser pages run at most 3 at a time. |
| `requestTimeoutSecs` | `20` | Per-request timeout. |
| `proxyConfiguration` | off | Use Apify Proxy for sites that block datacenter IPs. |

#### Output example

One dataset item per page:

```json
{
  "url": "https://en.wikipedia.org/wiki/Markdown",
  "finalUrl": "https://en.wikipedia.org/wiki/Markdown",
  "statusCode": 200,
  "title": "Markdown - Wikipedia",
  "description": null,
  "markdown": "# Markdown\n\n**Markdown** is a lightweight markup language for creating formatted text using a plain-text editor. John Gruber created Markdown in 2004 ...",
  "wordCount": 3161,
  "language": "en",
  "links": ["https://en.wikipedia.org/wiki/Main_Page", "..."],
  "fetchedWith": "http",
  "crawlDepth": 0,
  "crawledAt": "2026-11-09T13:39:10Z",
  "error": null
}
```

Pages that fail (DNS errors, timeouts, 4xx/5xx, robots.txt blocks, unsupported file types) are still listed with an `error` message, so you can see what happened to every URL. **Failed pages are never charged.**

A run summary (`httpPages`, `browserPages`, `failedPages`, `robotsBlocked`) is saved to the key-value store under `RUN_SUMMARY`.

### Pricing

**Currently free to use.** Pay-per-event pricing is coming soon (planned from late November 2026); the planned prices are below. Until then you only pay Apify platform usage, and free-plan runs are limited to 5 pages (see below).

Planned pricing: pay per event, you pay only for pages that were converted successfully.

| Event | Price | When |
|---|---|---|
| Page converted (HTTP) | **$0.003** ($3 per 1,000 pages) | Page fetched over plain HTTP and converted. |
| Page converted (browser fallback) | **$0.008** ($8 per 1,000 pages) | JavaScript-only page rendered in headless Chromium. Charged instead of the HTTP price, never both. |

Platform usage (compute, storage) is included in these prices. In our test on 20 mixed real-world URLs (news, docs, Wikipedia, GitHub, government, single-page apps), 19 of 20 pages succeeded and 18 of the 19 were converted over plain HTTP, so most crawls cost close to $3 per 1,000 pages.

Set **Maximum cost per run** in the run options to stop at a budget you choose. The crawler stops cleanly when the budget is reached.

#### Free Apify plan

Free-plan runs are limited to **5 pages per run**. Every item from a capped run carries a `notice` field explaining the cap. Any paid Apify plan removes the limit.

### Fast Markdown Crawler vs. Website Content Crawler

Apify's [Website Content Crawler](https://apify.com/apify/website-content-crawler) is excellent and very flexible. Its default setup renders pages in a browser and asks for 8 GB of memory per run, and you pay for that platform usage. Fast Markdown Crawler is built for the common case of mostly static pages:

- Plain HTTP first, with the browser used only per page and only when needed.
- A flat price per page, so cost does not depend on memory settings or how long a run takes.
- 100 static pages converted in about 6 seconds in our tests (concurrency 10, 92 MB RAM).

If you need login flows, clicking, infinite scroll or file downloads (PDF/DOCX), use Website Content Crawler.

### FAQ

**Does it handle JavaScript websites?**
Yes. If plain HTTP returns an empty page or a JavaScript app shell (React, Vue, Next.js and similar), the page is re-rendered in headless Chromium automatically. Turn off `browserFallback` to never use the browser.

**Why is a page missing content?**
Boilerplate removal is tuned for articles and documentation. For landing pages or product grids, set `removeBoilerplate` to `false` to convert the whole page.

**Can it crawl a whole website?**
Yes. Raise `maxPagesPerStart`. Only links on the same domain (subdomain `www.` included) are followed, and links to images, PDFs, archives and other files are skipped.

**Does it obey robots.txt?**
Yes, by default (user-agent token `FastMarkdownCrawler`, plus `*` rules). Turn it off only for sites you own or have permission to crawl.

**Can it read PDFs?**
Not yet. Non-HTML responses are reported with an `Unsupported content type` error and are not charged. Plain-text pages (`text/plain`) are supported.

**Is it legal?**
The Actor reads public pages only. You are responsible for following each site's terms and for any personal data you collect. Respecting robots.txt is on by default.

### Use with AI agents

The Actor is available through the [Apify MCP server](https://mcp.apify.com), so agents in Claude, Cursor and other MCP clients can call it to read web pages as Markdown. Typical agent input: `{"startUrls": [{"url": "<page>"}]}`.

### Changelog

- **0.1** (2026-11-09): First release. HTTP-first crawling with browser fallback, Markdown/text/HTML output, same-domain crawling, robots.txt support, pay-per-event pricing.

# Actor input Schema

## `startUrls` (type: `array`):

Pages to convert. Each URL is fetched over plain HTTP first; a headless browser is used only if the page is empty or JavaScript-only.

## `maxPagesPerStart` (type: `integer`):

1 = only the start URL. Higher values follow links on the same domain (breadth-first) until this many pages are crawled for each start URL.

## `outputFormat` (type: `string`):

Format of the main content field. The field name equals the format (markdown, text or html).

## `removeBoilerplate` (type: `boolean`):

Keep only the main content (drops navigation, headers, footers, cookie banners, sidebars).

## `includeLinks` (type: `boolean`):

Keep [text](url) links inside the Markdown/HTML. The separate links\[] output field is always filled.

## `respectRobotsTxt` (type: `boolean`):

Skip URLs disallowed by the site's robots.txt. Skipped URLs are reported with an error and are not charged.

## `maxTotalPages` (type: `integer`):

Optional hard cap on pages for the whole run (across all start URLs). Leave empty for no cap.

## `browserFallback` (type: `boolean`):

Render empty/JavaScript-only pages in headless Chromium. Disable to never use (or pay for) the browser.

## `maxConcurrency` (type: `integer`):

Parallel HTTP requests (browser pages are limited to 3 in parallel).

## `requestTimeoutSecs` (type: `integer`):

Timeout for each HTTP request. Browser pages get 1.5x this value.

## `proxyConfiguration` (type: `object`):

Optional. Most sites work without a proxy; use Apify Proxy for sites that block datacenter IPs.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://docs.apify.com/academy/web-scraping-for-beginners"
    }
  ],
  "maxPagesPerStart": 1,
  "outputFormat": "markdown",
  "removeBoilerplate": true,
  "includeLinks": false,
  "respectRobotsTxt": true,
  "browserFallback": true,
  "maxConcurrency": 10,
  "requestTimeoutSecs": 20,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `results` (type: `string`):

One row per crawled URL: clean Markdown, title, word count, language, HTTP status and whether a browser was needed. Pages that failed are listed with an error and are not charged.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "startUrls": [
        {
            "url": "https://docs.apify.com/academy/web-scraping-for-beginners"
        }
    ],
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("projecthax/fast-markdown-crawler").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "startUrls": [{ "url": "https://docs.apify.com/academy/web-scraping-for-beginners" }],
    "proxyConfiguration": { "useApifyProxy": False },
}

# Run the Actor and wait for it to finish
run = client.actor("projecthax/fast-markdown-crawler").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "startUrls": [
    {
      "url": "https://docs.apify.com/academy/web-scraping-for-beginners"
    }
  ],
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}' |
apify call projecthax/fast-markdown-crawler --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,projecthax/fast-markdown-crawler"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/0qeBZ6tJNlYEO5CAg/builds/ym9gHZNq63ud7D7Nt/openapi.json
