# Fast HTTP Markdown Crawler (RAG, llms.txt & MCP) (`deliberate_gratitude_shj/fast-http-markdown-crawler`) Actor

Zero-browser HTTP-to-Markdown crawler in 128 MB RAM. Extracts clean LLM/RAG-ready Markdown, page metadata, word/token counts, internal/external links, and auto-parses /llms.txt, /llms-full.txt, and sitemaps.

- **URL**: https://apify.com/deliberate_gratitude_shj/fast-http-markdown-crawler.md
- **Developed by:** [Apex Automation Labs](https://apify.com/deliberate_gratitude_shj) (community)
- **Features:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$1.00 / 1,000 pages extracted

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

## 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

## Website to Markdown Crawler for RAG, llms.txt & n8n

Convert any webpage, batch URL list, same-domain site tree, or XML sitemap into **clean, LLM/RAG-ready Markdown**—plus **page metadata**, **word & estimated token counts**, **deduplicated internal/external links**, and **automatic `/llms.txt` & `/llms-full.txt` discovery**—at **$1.00 per 1,000 extracted pages** (`$0.001 / page`, **$0 start fee**) inside **128 MB RAM**.

Built in pure Node.js + TypeScript (`fetch` + `cheerio`) by **Apex Automation Labs**—**zero Playwright, zero Puppeteer, zero headless browsers**.

#### Verified Apify Cloud Benchmark (128 MB RAM)

- **Live Cloud Run (`Eulb9VPaP66yQNYcu`):** Crawled 5 real sites (`docs.apify.com/academy`, `modelcontextprotocol.io/introduction`, `hono.dev/docs/`, `simonwillison.net/`, `en.wikipedia.org/wiki/Model_Context_Protocol`) in **2.97s total** (**0.62s** crawl & extraction time), extracting **9,055 words** (**25,062 estimated tokens**) and discovering `/llms.txt` + `/llms-full.txt` across all 3 documentation domains.
- **Memory Footprint:** **39.8 MB peak RAM** (`22.8 MB` average) inside a `128 MB` container.
- **Compute Efficiency:** **`0.0001031` Compute Units** (`~0.0206 CU / 1,000 pages`, **$0.0001536** platform cost, **99.1%+ net compute margin**).

***

### Zero-Browser HTTP API vs Headless Browser Scrapers

| Metric / Capability | Website to Markdown Crawler (This Actor) | Headless Browser Website Content Crawlers (Chromium / Playwright) |
|---|---|---|
| **Container RAM Footprint** | **39.8 MB peak** (**22.8 MB avg**, runs in **128 MB RAM**) | 2,048–4,096+ MB RAM per container |
| **Runtime Speed (5 Sites)** | **2.97s total** (**0.62s** crawl & conversion) | 25–75+ seconds (browser launch + hydration) |
| **Compute Cost per 1,000 Pages** | **~0.0206 CU** (~$0.008 Apify compute) | 0.50–2.50+ CU ($0.20–$1.00+ compute) |
| **Pricing per 1,000 Pages** | **$1.00 / 1,000 pages** (`$0` start fee) | $3.00–$10.00+ / 1,000 pages |
| **`/llms.txt` & `/llms-full.txt` Support** | Probes each origin once, validates against soft-404s & computes word/token stats | Typically ignores `/llms.txt` AI discovery files |
| **Token & Boilerplate Hygiene** | Strips `<nav>`, `<footer>`, cookie modals & `Copy` buttons; outputs `wordCount` + `estimatedTokens` | Often retains navbar/footer clutter that inflates vector DB tokens |
| **Billing on 404 / Non-HTML URLs** | **$0.00 charge** (only bills `ok: true` extracted Markdown pages) | Often charges runtime / start fees even on failed pages |

***

### Key RAG, Crawl & `llms.txt` Capabilities

- **3 Flexible Crawl Modes (`urls_only`, `same_domain`, `sitemap`):** Extract exact URL batches, breadth-first crawl same-domain documentation trees, or auto-discover URLs from `/robots.txt` `Sitemap:` directives, `/sitemap.xml`, and `/sitemap_index.xml`.
- **Automatic `/llms.txt` & `/llms-full.txt` Discovery:** Probes each target origin once per run, rejects SPA HTML soft-404s, and parses `llmstxt.org` sections, links, and `/llms-full.txt` word/token counts.
- **Surgical Boilerplate Stripping:** Removes `<nav>`, `<footer>`, `<script>`, `<style>`, UI `Copy` buttons inside `<pre>`, cookie consent modals, and ad containers while preserving GFM tables, fenced code blocks with language tags, nested lists, and absolute links.
- **Rich RAG Metadata + Token Budgeting:** Outputs `title`, `description`, `canonicalUrl`, `language`, `publishedAt`, `author`, `siteName`, `wordCount`, `estimatedTokens`, `internalLinks`, and `externalLinks`.

***

### Quick Start Input JSON

Click **Start** immediately using the built-in defaults, or paste this JSON:

```json
{
  "urls": [
    "https://docs.apify.com/academy",
    "https://modelcontextprotocol.io/introduction",
    "https://hono.dev/docs/",
    "https://simonwillison.net/",
    "https://en.wikipedia.org/wiki/Model_Context_Protocol"
  ],
  "crawlMode": "urls_only",
  "maxPages": 10,
  "detectLlmsTxt": true,
  "stripBoilerplate": true,
  "extractMainContent": true,
  "includeLinks": true
}
```

#### Crawl Modes & Key Parameters

- **`urls` / `url`**: Pass a batch list of URLs (`urls`) or a quick single `url` shorthand for MCP tool calls.
- **`crawlMode`**:
  - `urls_only` *(default)*: Extract clean Markdown for the exact input URL(s).
  - `same_domain`: Breadth-first crawl of same-domain internal links up to `maxDepth` and `maxPages`.
  - `sitemap`: Auto-discover URLs from `/robots.txt`, `/sitemap.xml`, or `/sitemap_index.xml`.
- **`maxPages`**: Cost-safety cap (`1`–`5000`, default `10`).
- **`detectLlmsTxt`**: Automatically detect and parse `/llms.txt` and `/llms-full.txt` per origin (`default: true`).
- **`maxMarkdownChars`**: Optional boundary truncation (`0` = unlimited) for tight LLM context windows.

***

### Sample Output JSON (Verified Live Cloud Run)

```json
{
  "url": "https://hono.dev/docs/",
  "finalUrl": "https://hono.dev/docs",
  "ok": true,
  "statusCode": 200,
  "redirected": true,
  "redirectHops": 1,
  "redirectChain": [
    {
      "url": "https://hono.dev/docs/",
      "statusCode": 307
    }
  ],
  "contentType": "text/html",
  "isHtml": true,
  "title": "Hono - Web framework built on Web Standards",
  "description": "Web framework built on Web Standards for Cloudflare Workers, Fastly Compute, Deno, Bun, Vercel, Node.js, and others.",
  "canonicalUrl": null,
  "language": "en-US",
  "publishedAt": "2026-12-04T08:19:22.000Z",
  "markdown": "# Hono\n\nHono - ***means flame🔥 in Japanese*** - is a small, simple, and ultrafast web framework built on Web Standards...",
  "wordCount": 828,
  "estimatedTokens": 1955,
  "internalLinksCount": 93,
  "externalLinksCount": 22,
  "internalLinks": ["https://hono.dev/", "https://hono.dev/llms.txt"],
  "externalLinks": ["https://cdnjs.com/", "https://github.com/honojs/node-server"],
  "llmsTxt": {
    "detected": true,
    "llmsTxtUrl": "https://hono.dev/llms.txt",
    "title": "Hono",
    "sectionsCount": 1,
    "linksCount": 146,
    "hasLlmsFullTxt": true,
    "llmsFullTxtUrl": "https://hono.dev/llms-full.txt",
    "llmsFullTxtBytes": 402923,
    "llmsFullTxtWordCount": 52861,
    "llmsFullTxtEstimatedTokens": 100585
  },
  "skippedReason": null,
  "error": null,
  "responseTimeMs": 1948,
  "depth": 0,
  "crawledAt": "2026-12-05T12:24:38.900Z"
}
```

***

### MCP & n8n Quick-Start

#### Native MCP Integration (`mcp.apify.com`)

Connect this Actor directly to **Claude Desktop**, **Cursor**, or **Windsurf** via Apify's official Streamable HTTP MCP server. Replace `<YOUR_APIFY_TOKEN>` with your Apify API token.

##### Claude Desktop (`claude_desktop_config.json`)

```json
{
  "mcpServers": {
    "apify-markdown-crawler": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote",
        "https://mcp.apify.com/?actors=deliberate_gratitude_shj/fast-http-markdown-crawler",
        "--header",
        "Authorization: Bearer <YOUR_APIFY_TOKEN>"
      ]
    }
  }
}
```

##### Cursor (`.cursor/mcp.json`) & Windsurf (`mcp_config.json`)

```json
{
  "mcpServers": {
    "apify-markdown-crawler": {
      "url": "https://mcp.apify.com/?actors=deliberate_gratitude_shj/fast-http-markdown-crawler",
      "headers": {
        "Authorization": "Bearer <YOUR_APIFY_TOKEN>"
      }
    }
  }
}
```

*(In Windsurf `~/.codeium/windsurf/mcp_config.json`, replace `"url"` with `"serverUrl"`.)*

##### Ready-to-Use AI Agent Prompts

1. **RAG Knowledge Ingestion:** *"Use `fast-http-markdown-crawler` with `crawlMode: 'sitemap'` and `maxPages: 30` on `https://hono.dev` to pull clean Markdown docs and check its `/llms.txt` token footprint."*
2. **Single-URL Article Reader:** *"Fetch `https://modelcontextprotocol.io/introduction` via `fast-http-markdown-crawler` (`stripBoilerplate: true`) and summarize the protocol architecture."*

#### n8n & Make.com Synchronous API Setup

Import-ready workflow JSON is available in [`distribution/n8n_workflow.json`](https://github.com/tikzyre8-cmyk/fast-http-markdown-crawler/blob/main/distribution/n8n_workflow.json).

- **Method:** `POST`
- **URL:** `https://api.apify.com/v2/acts/deliberate_gratitude_shj~fast-http-markdown-crawler/run-sync-get-dataset-items?token=<YOUR_APIFY_TOKEN>`
- **Headers:** `Content-Type: application/json`
- **Body:**

```json
{
  "urls": [
    "https://docs.apify.com/platform",
    "https://modelcontextprotocol.io/introduction"
  ],
  "crawlMode": "urls_only",
  "maxPages": 10,
  "detectLlmsTxt": true,
  "stripBoilerplate": true
}
```

- **Make.com:** Add **Apify -> Run an Actor** (`deliberate_gratitude_shj/fast-http-markdown-crawler`, **Run synchronously** enabled), then send clean `markdown`, `title`, and `estimatedTokens` into Pinecone, Qdrant, Supabase pgvector, or OpenAI Assistants.

***

### Transparent Pay-Per-Event Pricing

Simple, predictable **Pay-Per-Event (PPE)** billing — **$0.00 actor start fee** and **$0.001 per extracted page** (**$1.00** per `1,000` pages). Test free with Apify's monthly $5 free developer credit (up to 5,000 pages/month free).

| Extracted Pages | Event Rate (`page-extracted`) | Estimated Total Cost |
|---:|---:|---:|
| **10 pages** (Default Batch) | $0.001 / page | **$0.01** |
| **100 pages** | $0.001 / page | **$0.10** |
| **1,000 pages** | $0.001 / page | **$1.00** |
| **5,000 pages** | $0.001 / page | **$5.00** |

*404 responses, timeouts, and skipped non-HTML assets are returned cleanly in the dataset at **$0.00 charge**.*

***

### Frequently Asked Questions (FAQ)

**1. How is this crawler different from heavy Playwright website-content crawlers for RAG?**\
Most documentation sites, blogs, wikis, and SSR marketing pages render full content in initial HTML. Skipping Chromium cuts RAM to **39.8 MB peak**, drops 5-site runtime to **2.97s**, and reduces cost to **$1.00 / 1,000 pages** with **$0 start fee**.

**2. Are `404` pages, timeouts, or PDF/image URLs billed?**\
No. The `page-extracted` event (`\$0.001`) only fires when `ok: true` and clean Markdown was extracted—errors and skipped non-HTML resources cost **$0.00**.

**3. How does automatic `/llms.txt` and `/llms-full.txt` detection work?**\
Each unique origin is probed once per run for `/llms.txt`. The crawler verifies `text/plain` or Markdown content (rejecting SPA HTML soft-404 pages), parses sections/links, and also measures `/llms-full.txt` byte, word, and token counts if referenced.

**4. Can I crawl an entire documentation section automatically without listing every URL?**\
Yes. Pass the root URL and switch `crawlMode` to `"sitemap"` (auto-discovers `/robots.txt` sitemaps and `/sitemap.xml`) or `"same_domain"` (breadth-first crawl up to `maxDepth` and `maxPages`).

**5. Can I audit the same pages for broken links, `#fragment` anchors, and SEO health?**\
Yes—use our companion [Technical SEO Broken Link Checker & Redirect Auditor](https://apify.com/deliberate_gratitude_shj/http-seo-link-auditor) (`\$2.00 / 1k pages`, 59.1 MB RAM) to validate every link, redirect hop, canonical tag, and JSON-LD block.

***

### More Fast Zero-Browser Tools by Apex Automation Labs

| Tool | Primary Use Case | Pricing (PPE, $0 Start) | Verified Peak RAM & Speed | Apify Store Link |
|---|---|---|---|---|
| **ATS Job Board Scraper API** | Greenhouse, Lever, Ashby, Workable, SmartRecruiters & `/careers` discovery | **$2.00 / 1k jobs** | 75.1 MB RAM · 3.39s (3 boards) | [Open in Apify Store](https://apify.com/deliberate_gratitude_shj/ats-jobs-extractor) |
| **Technical SEO Broken Link Checker** | 4xx/5xx links, `#fragment` anchors, redirects, JSON-LD & `llms.txt` | **$2.00 / 1k pages** | 59.1 MB RAM · 4.23s (5 pages) | [Open in Apify Store](https://apify.com/deliberate_gratitude_shj/http-seo-link-auditor) |
| **Domain Security & Tech Stack API** | DNS, email host, SPF/DMARC score, RDAP age, SSL/TLS & CDN stack | **$2.00 / 1k domains** | 58.5 MB RAM · 2.45s analysis (5 domains) | [Open in Apify Store](https://apify.com/deliberate_gratitude_shj/domain-intel-api) |
| **Shopify Product & Price Scraper API** | Catalogs, variants, compare-at discounts, SKUs, stock & sitemaps | **$1.00 / 1k products** | 54.1 MB RAM · 2.59s (30 products) | [Open in Apify Store](https://apify.com/deliberate_gratitude_shj/shopify-catalog-monitor) |
| **B2B Website Email & Contact Extractor** | Role vs. personal emails, phones, 7 social profiles & JSON-LD | **$2.00 / 1k domains** | 101.1 MB RAM · 5.06s extraction (5 domains) | [Open in Apify Store](https://apify.com/deliberate_gratitude_shj/b2b-contact-social-extractor) |
| **Universal E-Commerce JSON-LD Price Scraper** | Cross-platform JSON-LD (`Product`/`ProductGroup`), OG & Microdata | **$1.50 / 1k products** | 39.7 MB RAM · 2.91s (3 fast URLs) | [Open in Apify Store](https://apify.com/deliberate_gratitude_shj/universal-ecommerce-schema-api) |

*Explore the open-source portfolio hub on GitHub: [Apex Automation Labs (`tikzyre8-cmyk`)](https://github.com/tikzyre8-cmyk/tikzyre8-cmyk) · [All Actors on Apify Store](https://apify.com/deliberate_gratitude_shj).*

# Actor input Schema

## `urls` (type: `array`):

One or more HTTP/HTTPS URLs (or bare domains) to convert to Markdown. Automatically normalized and deduplicated.

## `url` (type: `string`):

Optional single URL shorthand (handy for single-page MCP tool calls from Claude, Cursor, or n8n). Overrides default urls when provided alone.

## `crawlMode` (type: `string`):

urls_only = crawl only the provided URL(s); same_domain = follow same-domain internal links up to maxDepth; sitemap = discover and crawl URLs from sitemap.xml / robots.txt.

## `maxPages` (type: `integer`):

Maximum total pages to crawl and extract. Acts as a strict Pay-Per-Event spending cap ($0.001 / page).

## `maxDepth` (type: `integer`):

Link depth when Crawl Mode is 'same_domain'. 0 = seed URLs only, 1 = seeds + direct internal links, etc.

## `detectLlmsTxt` (type: `boolean`):

Automatically probe each target origin once for /llms.txt and /llms-full.txt and attach structured sections, links, and token counts.

## `stripBoilerplate` (type: `boolean`):

Remove <nav>, <footer>, <script>, <style>, UI copy buttons, cookie consent modals, and ad containers for clean RAG Markdown.

## `extractMainContent` (type: `boolean`):

Automatically target <main>, \[role=main], or <article> when present with substantial content. Disable to convert the entire <body>.

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

Include deduplicated internalLinks and externalLinks URL arrays on each output record. Disable for ultra-compact MCP/LLM payloads.

## `maxMarkdownChars` (type: `integer`):

Optional character cap to cleanly truncate long pages at paragraph/word boundaries for small LLM context windows (0 = no truncation).

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

Skip following discovered links or sitemap URLs disallowed for User-agent: \* in robots.txt (explicit seed URLs are still fetched).

## `concurrency` (type: `integer`):

Maximum number of HTTP page requests executed in parallel.

## `timeoutMs` (type: `integer`):

Strict HTTP timeout in milliseconds per page request.

## Actor input object example

```json
{
  "urls": [
    "https://docs.apify.com/academy",
    "https://modelcontextprotocol.io/introduction",
    "https://hono.dev/docs/",
    "https://simonwillison.net/",
    "https://en.wikipedia.org/wiki/Model_Context_Protocol"
  ],
  "crawlMode": "urls_only",
  "maxPages": 10,
  "maxDepth": 1,
  "detectLlmsTxt": true,
  "stripBoilerplate": true,
  "extractMainContent": true,
  "includeLinks": true,
  "maxMarkdownChars": 0,
  "respectRobotsTxt": true,
  "concurrency": 5,
  "timeoutMs": 12000
}
```

# Actor output Schema

## `dataset` (type: `string`):

No description

## `summary` (type: `string`):

No description

# 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 = {
    "urls": [
        "https://docs.apify.com/academy",
        "https://modelcontextprotocol.io/introduction",
        "https://hono.dev/docs/",
        "https://simonwillison.net/",
        "https://en.wikipedia.org/wiki/Model_Context_Protocol"
    ],
    "maxPages": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("deliberate_gratitude_shj/fast-http-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 = {
    "urls": [
        "https://docs.apify.com/academy",
        "https://modelcontextprotocol.io/introduction",
        "https://hono.dev/docs/",
        "https://simonwillison.net/",
        "https://en.wikipedia.org/wiki/Model_Context_Protocol",
    ],
    "maxPages": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("deliberate_gratitude_shj/fast-http-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 '{
  "urls": [
    "https://docs.apify.com/academy",
    "https://modelcontextprotocol.io/introduction",
    "https://hono.dev/docs/",
    "https://simonwillison.net/",
    "https://en.wikipedia.org/wiki/Model_Context_Protocol"
  ],
  "maxPages": 10
}' |
apify call deliberate_gratitude_shj/fast-http-markdown-crawler --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,deliberate_gratitude_shj/fast-http-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/eWSJAJceJY9sWFJN1/builds/RsIDHgg20D0Lt12yq/openapi.json
