# Website to Markdown Crawler: URL to Markdown for LLMs (`emttn/website-markdown-crawler`) Actor

Website to markdown crawler: crawl one website from a start URL and get every page under it as clean markdown, for AI agents, LLMs and RAG. Same site only, respects robots.txt, charged per page delivered; failed pages are free.

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

## Pricing

$2.00 / 1,000 page delivered as markdowns

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/running/actors-in-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 AI Agents

Give it the URL of a docs site, help center or blog and get every page under it back as clean markdown, for AI agents and RAG pipelines that need a whole site, not one page. You get one dataset item per page.

- Starts at your URL and follows links on the same site, only under that URL's folder: `https://example.com/docs/` crawls `/docs/...`, not `/blog/`.
- Main content only: menus, footers and cookie banners are left out; headings, lists, tables and links stay.
- Respects robots.txt for every page and every redirect, fetches at most 5 pages at a time and identifies itself as `Skimmer`.
- Charged per page delivered; failed, blocked or empty pages are free.

More: [Website to Markdown Crawler on frameskim.dev](https://frameskim.dev/website-to-markdown)

### What you get

```json
{
  "url": "https://example.com/docs/setup",
  "depth": 1,
  "title": "Setup",
  "markdown": "# Setup\n\n...",
  "truncated": false
}
```

- `depth` is 0 for the start URL, 1 for the pages it links to, and so on.
- `truncated` is `true` when the page passed 3 MB or the markdown passed 200,000 characters and was cut.
- A page that could not be delivered has `error` instead of `markdown`, with the reason, and is not charged.
- When pages were delivered, the run's status message says how many, how many links robots.txt kept out, and why the crawl ended; when none was, the run still ends as succeeded, with the first page's error (also in the dataset), or why the crawl ended if no page was tried, and nothing was charged.

### Input

| Field | What it does |
|---|---|
| `startUrl` | Where the crawl starts. |
| `maxPages` | The most pages visited in a run, 1 to 500 (default 50). |

### Pricing

This actor bills one event, nothing else:

- `page`: one per page delivered as markdown.

Pages that fail, redirect outside the crawled site, have no readable text or are left after a stop are not charged, and links that `robots.txt` disallows are skipped without a charge. Each page stays charged once delivered, even if the run later stops or fails. If no page is delivered, the run still ends as succeeded and nothing was charged. The run never charges more than the maximum you set: it stops before a page that would not fit. Current prices are on the Pricing tab.

### How pages are read

- Pages are fetched over HTTP with the user agent `Skimmer`, at most 5 at a time and at most one batch per second.
- `robots.txt` is read once per host and run, and a page is fetched only if the rules for `Skimmer`, `FrameskimCrawl` (its earlier name), `FrameskimFetch` and `*` all allow it, for the page and again on every redirect. If a site's `robots.txt` cannot be read because of a server error, a timeout or a network error, its pages are not fetched and come back with an error, without a charge.
- Each page gets 10 seconds, at most 5 redirects and 3 MB, and one more try after a timeout, a server error or a dropped connection when there is time left.
- Pages go through Apify's datacenter proxy; private or local network addresses are refused.

### Limits

- No browser: JavaScript is not run, so pages that only render in a browser may come back without text (and are not charged).
- No sitemaps: pages are found through the links of the pages already read.
- One start URL per run, and only its site and folder.
- At most 500 pages per run.

### Site owners

To keep your pages out, disallow `Skimmer` in your `robots.txt`; rules for `FrameskimCrawl`, its earlier name, are still honored, and disallowing `FrameskimFetch` works too. Each run reads a host's `robots.txt` once, so a run already in progress may not see the change; runs that start after it read the new file. Rights holders and people whose personal data appears in a page can also write to support@frameskim.dev. Neither a `robots.txt` rule nor a request removes pages from datasets that users already hold.

### Terms and privacy

Website to Markdown Crawler for AI Agents is operated by Emttn LLC and is not affiliated with, endorsed by or sponsored by the sites it reads. You need a lawful basis to fetch, copy and use each page of the site you crawl, and you are responsible for following each site's terms, copyright and privacy law; a public page or a `robots.txt` allow is not a license to its content. The markdown is an automatic extraction and may be incomplete or inaccurate. Terms: https://frameskim.dev/terms. Privacy: https://frameskim.dev/privacy. Questions: support@frameskim.dev.

# Actor input Schema

## `startUrl` (type: `string`):

Where the crawl starts (http or https). Only pages on the same host and under this URL's folder are crawled.

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

The most pages visited in this run, from 1 to 500. Each page delivered as markdown is one page event.

## `failWhenEmpty` (type: `boolean`):

Internal: the run ends as failed, instead of succeeded with error items, when no page is delivered. Used by health checks.

## Actor input object example

```json
{
  "startUrl": "https://www.rfc-editor.org/rfc/rfc9309.html",
  "maxPages": 50,
  "failWhenEmpty": false
}
```

# Actor output Schema

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

Dataset items: url, depth, title, markdown and truncated; pages that could not be delivered carry 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 = {
    "startUrl": "https://www.rfc-editor.org/rfc/rfc9309.html"
};

// Run the Actor and wait for it to finish
const run = await client.actor("emttn/website-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 = { "startUrl": "https://www.rfc-editor.org/rfc/rfc9309.html" }

# Run the Actor and wait for it to finish
run = client.actor("emttn/website-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 '{
  "startUrl": "https://www.rfc-editor.org/rfc/rfc9309.html"
}' |
apify call emttn/website-markdown-crawler --silent --output-dataset

```

## MCP server setup

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