# Website to Markdown for AI - Pages & PDF, $1/1k (`librevlad/website-to-markdown`) Actor

Turn web pages and PDFs into clean Markdown and plain text for LLMs, RAG and AI agents. Respects robots.txt, no logins. $1.00 per 1,000 pages, pay only for successful ones.

- **URL**: https://apify.com/librevlad/website-to-markdown.md
- **Developed by:** [Владислав Новік](https://apify.com/librevlad) (community)
- **Categories:** AI, Developer tools, Automation
- **Features:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 page converteds

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 for AI

**Pricing:** $1.00 per 1,000 pages, one Markdown document per URL. Failed pages are free.

Turn web pages and PDF files into clean Markdown and plain text, ready for LLMs, RAG pipelines and AI agents. Navigation, ads and footers are stripped; headings, lists, tables and (optionally) links and images are kept.

### Who is it for

- **RAG and search**: feed a list of docs, blog or help-center URLs and get chunk-ready Markdown.
- **LLM apps and agents**: give a model the text of a page instead of raw HTML and save tokens.
- **Research**: collect articles and PDF papers into one dataset with titles and word counts.

### Input

| Field | Description | Default |
|---|---|---|
| `urls` | Pages or PDF files to convert (required). | `["https://example.com"]` |
| `outputFormat` | `markdown`, `text` or `both`. | `both` |
| `includeLinks` | Keep hyperlinks in the Markdown. | `true` |
| `includeImages` | Keep image references in the Markdown. | `false` |
| `maxConcurrency` | Pages read in parallel, 1-20. | `5` |
| `respectRobotsTxt` | Skip pages that robots.txt disallows. | `true` |

```json
{ "urls": ["https://example.com", "https://example.org/paper.pdf"], "outputFormat": "both" }
```

### Output

One dataset row per URL:

```json
{
  "url": "https://example.com",
  "finalUrl": "https://example.com/",
  "status": "ok",
  "title": "Example Domain",
  "markdown": "# Example Domain\n\nThis domain is for use in illustrative examples...",
  "text": "Example Domain\n\nThis domain is for use in illustrative examples...",
  "wordCount": 19,
  "contentType": "text/html",
  "fetchedAt": "2026-11-27T10:00:00Z",
  "error": null
}
```

`status` is `ok`, `error` or `skipped` (blocked by robots.txt). PDFs: text is extracted from the first 50 pages.

### Pricing

$1.00 per 1,000 pages, pay only for successful pages. Rows with status `error` or `skipped` are free. If your spending limit is reached, the run stops cleanly.

### Honest reading

- robots.txt is respected by default; disallowed pages come back as `skipped`.
- You are responsible for the pages you submit: make sure you have the right to read and use them and respect each site's terms of use. The Actor does not log in, use cookies or bypass any protection.
- No login, no cookies, no stealth or fingerprint tricks. The actor identifies itself as `website-to-markdown/0.1 (Apify actor)`.
- Private, local and internal network addresses are blocked.
- Limits: 3 MB per HTML page, 15 MB per PDF, about 25 seconds per URL.
- JavaScript is not executed: pages that render content only in the browser may come back empty.

### FAQ

**Does it work on JavaScript-only sites?** No, it reads the server-sent HTML. Pages that need a browser to show content may return an error.

**Can it read pages behind a login or paywall?** No. It never logs in or sends cookies.

**Scanned PDFs?** No OCR; only PDFs with a text layer give text.

**Why `skipped`?** The site's robots.txt does not allow reading that address. You can turn the check off, but you are then responsible for having the right to read the page.

**Am I charged for errors?** No, only for rows with status `ok`.

### More actors from the same developer

Pay only for results, no logins:

- [Website Crawler to Markdown](https://apify.com/librevlad/website-crawler-markdown) — crawl a website or docs section into clean Markdown for RAG and LLMs.
- [Website Screenshot & PDF](https://apify.com/librevlad/page-screenshot-pdf) — full-page and mobile screenshots, URL to PDF.
- [YouTube Transcript Scraper](https://apify.com/librevlad/youtube-transcripts-fast) — transcripts as plain text, timestamped segments or SRT.
- [YouTube Search & Channel Videos](https://apify.com/librevlad/youtube-search-channel-videos) — search results and every video of a channel.
- [YouTube Shorts Scraper](https://apify.com/librevlad/youtube-shorts-scraper-fast) — Shorts from keyword search and from channels' Shorts tab.
- [App Store Scraper](https://apify.com/librevlad/app-store-scraper) — app details, keyword search positions and reviews from Apple's public API.
- [Google Trends Scraper](https://apify.com/librevlad/google-trends-scraper-fast-cheap) — interest over time, interest by region and related queries.
- [Threads Scraper](https://apify.com/librevlad/threads-scraper) — public Threads posts and profiles without login.

# Actor input Schema

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

Web pages or PDF files to convert. One address per line.

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

Which fields to fill: Markdown, plain text, or both.

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

Keep hyperlinks in the Markdown output.

## `includeImages` (type: `boolean`):

Keep image references in the Markdown output.

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

How many pages are read at the same time (1-20).

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

Skip pages that the site's robots.txt does not allow. Recommended.

## Actor input object example

```json
{
  "urls": [
    "https://example.com"
  ],
  "outputFormat": "both",
  "includeLinks": true,
  "includeImages": false,
  "maxConcurrency": 5,
  "respectRobotsTxt": true
}
```

# Actor output Schema

## `overview` (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://example.com"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("librevlad/website-to-markdown").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://example.com"] }

# Run the Actor and wait for it to finish
run = client.actor("librevlad/website-to-markdown").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://example.com"
  ]
}' |
apify call librevlad/website-to-markdown --silent --output-dataset

```

## MCP server setup

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

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/OdOpqIciHiwdqf5BE/builds/hVFxtmfC0ca3bPXt3/openapi.json
