# Website to Markdown: Clean LLM-Ready Text from Any URL (`hydrafetch/website-to-markdown`) Actor

Turn a list of URLs into clean markdown for LLMs, RAG and AI agents, with navigation, banners and boilerplate removed.

- **URL**: https://apify.com/hydrafetch/website-to-markdown.md
- **Developed by:** [Hydrafetch](https://apify.com/hydrafetch) (community)
- **Categories:** AI, Developer tools, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.70 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

<div align="center">

<img src="https://hydrafetch.com/brand/mark-512.png" alt="Hydrafetch" height="64" />

## Website to Markdown: Clean LLM-Ready Text from Any URL

**Turn a list of URLs into clean markdown for LLMs, RAG and AI agents, with navigation, banners and boilerplate removed.**

`Pay per result` · `$3 per 1,000 URLs` · `No API key` · Powered by [Hydrafetch](https://hydrafetch.com?utm_source=apify\&utm_medium=readme\&utm_content=website-to-markdown)

</div>

***

### Website to Markdown at a glance

- **Input:** A list of URLs.
- **Output:** one row per URL with 8 fields, including title, wordCount, markdown.
- **Price:** $3 per 1,000 URLs, charged only for results.
- **You need:** nothing else. No cookies, no logins, no proxies and no API keys.
- **Export:** JSON, CSV, Excel or XML, or straight into your own tools with the Apify API and MCP.

### What is Website to Markdown?

Converts any web page into clean markdown built for language models. It keeps the main content and its structure, headings, lists, tables and links, and removes navigation, cookie banners, footers and ads. JavaScript-heavy sites work too, with nothing to configure. Each result carries the title, description, language, page type and word count, so you can budget tokens before sending anything to a model. Built for RAG pipelines, AI agents and anyone who needs readable text from the web without writing cleanup code.

- **Clean markdown.** The main content of each page, with navigation, cookie banners, footers and ads removed.
- **Structure kept.** Headings, lists, tables and links stay in place, so a model can follow the page.
- **Metadata.** Title, description, language and page type for every URL.
- **Word count.** So you can budget tokens before you send anything to a model.
- **JavaScript-heavy sites.** Handled automatically, with nothing to configure.

### What data can I extract with Website to Markdown?

Every result is one row per URL, with these fields:

| Field | What it holds |
| --- | --- |
| `url` | The URL you asked for |
| `finalUrl` | Where the URL ended up after redirects |
| `title` | Page title |
| `description` | Page description |
| `language` | Detected language |
| `pageType` | Kind of page, such as article, listing or docs |
| `wordCount` | Words in the markdown |
| `markdown` | The page content as clean markdown |

The table view in Apify shows URL, Title, Words, Markdown. The full record is in the JSON, CSV, Excel and XML exports, and over the API.

### How to use Website to Markdown

1. Open Website to Markdown in the Apify Console. A free Apify account is enough to try it.
2. Paste your URLs, one per line, or upload a list.
3. Click **Start**. Each URL is processed on its own, so one bad entry never loses the batch.
4. Download the results as JSON, CSV or Excel, or send them to your own tools with an integration.

### Input

One field: **URLs**. Use full URLs, including `https://`.

Every line is checked before the run starts. Each must be a web address like https://stripe.com/pricing; a run with any other line is refused with that line named, so a typo never costs you anything.

```json
{
  "urls": [
    "https://stripe.com",
    "https://vercel.com"
  ]
}
```

### Output

A URL we cannot resolve is skipped rather than returned empty, and you are not charged for it. The run log names every one that was skipped, so a short result is never a mystery.

```json
{
  "url": "https://stripe.com/pricing",
  "title": "Pricing & Fees | Stripe",
  "language": "en",
  "pageType": "listing",
  "wordCount": 1480,
  "markdown": "# Pricing built for businesses of all sizes\n\n## Payments\n\n..."
}
```

### How much does Website to Markdown cost?

Website to Markdown costs **$3 per 1,000 URLs** returned, which is $0.003 each, with no separate compute charge. 10,000 URLs cost $30.

- **You pay only for results.** A URL that cannot be resolved is skipped and free.
- **Try it on the free plan.** Each free Apify account can run up to 50 URLs through this Actor. On a paid plan, $5 covers about 1,666 URLs.
- **Volume discounts.** Scale plans pay 5% less per result and Business plans 10% less.
- **Cap any run.** Set a maximum cost per run in the run options and the Actor stops cleanly when it is reached.

### Common use cases

- **RAG and knowledge bases.** Load docs, blogs and help centres into a vector store without writing cleanup code.
- **AI agents.** Give an agent readable pages instead of raw HTML that burns its context window.
- **Content monitoring.** Store clean text from a list of pages and compare it over time.
- **Research datasets.** Collect readable text from hundreds of sources in one run.

### Integrate Website to Markdown with other apps

Website to Markdown works with the integrations on the Apify platform, including [Make](https://apify.com/integrations/make), [Zapier](https://apify.com/integrations/zapier), [n8n](https://apify.com/integrations/n8n), [Google Sheets](https://apify.com/integrations/google-sheets), [Slack](https://apify.com/integrations/slack), [Airbyte](https://apify.com/integrations/airbyte), [LangChain](https://apify.com/integrations/langchain), [LlamaIndex](https://apify.com/integrations/llamaindex), [Pinecone](https://apify.com/integrations/pinecone), [Qdrant](https://apify.com/integrations/qdrant). Results can also go anywhere with a [webhook](https://docs.apify.com/platform/integrations/webhooks) when a run finishes.

To keep a list current, save your input as a task and put it on a [schedule](https://docs.apify.com/platform/schedules).

### Website to Markdown API

Run Website to Markdown from your own code with the Apify API clients.

**JavaScript**

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

const client = new ApifyClient({ token: 'YOUR_APIFY_TOKEN' });
const run = await client.actor('hydrafetch/website-to-markdown').call({ urls: ["https://stripe.com","https://vercel.com"] });
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

**Python**

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_APIFY_TOKEN")
run = client.actor("hydrafetch/website-to-markdown").call(run_input={"urls": ["https://stripe.com","https://vercel.com"]})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)
```

AI agents can call it too. Connect Claude, Cursor or any MCP client to the [Apify MCP server](https://mcp.apify.com) and add `hydrafetch/website-to-markdown` as a tool.

### FAQ

#### Why markdown rather than HTML?

It keeps the structure a model needs, headings, lists and tables, at a fraction of the tokens. Raw HTML spends most of its length on markup.

#### Does it work on JavaScript-heavy sites?

Yes, automatically. There is no mode to pick; you get the readable page either way.

#### Am I charged for pages that fail?

No. A page that is blocked, empty or unreachable is not returned and not charged.

#### Can it crawl a whole site?

Yes, with Website Crawler to Markdown, which follows a site for you. This Actor converts exactly the URLs you give it.

#### Do I need cookies, a login or proxies?

No. Website to Markdown works without cookies, accounts, proxies or API keys. Paste your URLs and run it; everything else is handled for you.

#### Is it legal to use Website to Markdown?

Website to Markdown collects only publicly available web page content. As with any data collection, you are responsible for how you use the results: follow the terms of the websites you work with and data protection laws such as GDPR wherever personal data is involved. If you are unsure about your use case, check with a lawyer.

#### Does Website to Markdown have an API?

Yes. Every run is available through the Apify API, with the JavaScript and Python examples above, and through the Apify MCP server for AI agents.

### Other Actors by Hydrafetch

- [Company Enrichment API](https://apify.com/hydrafetch/company-enrichment-api): turn a list of domains into full company records: name, description, logo, brand colors, fonts, socials and industry.
- [Bulk Company Logo Finder](https://apify.com/hydrafetch/bulk-company-logo-finder): give it a list of domains and get a direct image URL for each company logo, with dimensions and dominant color.
- [Website Color Palette Extractor](https://apify.com/hydrafetch/website-color-palette-extractor): read a site's real design system: colors by role with contrast ratios, the type scale, corner radius and button styling.
- [AI SEO & GEO Audit](https://apify.com/hydrafetch/ai-seo-geo-audit): check whether an LLM or AI agent can actually read your pages, and get the specific reasons when it cannot.
- [Article Extractor](https://apify.com/hydrafetch/article-extractor): extract the full text, author, publish date and site details from any article or blog post URL.
- [Company Social Links Finder](https://apify.com/hydrafetch/company-social-links-finder): find the LinkedIn company page and every social profile a company links from its own website, from just the domain.
- [LinkedIn Company Scraper](https://apify.com/hydrafetch/linkedin-company-scraper): get industry, company size, headcount, followers, headquarters and more from LinkedIn company pages, by URL or by domain.
- [Tech Stack Detector](https://apify.com/hydrafetch/website-tech-stack-detector): find the CMS, ecommerce platform, analytics, frameworks, hosting and payment tools any website runs, from just the domain.
- [PDF to Markdown](https://apify.com/hydrafetch/pdf-to-markdown): convert PDF links into clean markdown with headings and tables intact, ready for LLMs, RAG and search.
- [Website Crawler to Markdown](https://apify.com/hydrafetch/website-crawler-to-markdown): crawl a whole website or docs section into clean markdown for LLMs, RAG and AI agents, one row per page.
- [Company Jobs Scraper](https://apify.com/hydrafetch/company-jobs-scraper): get every open job at a company from just its domain: titles, teams, locations, pay and full descriptions, from the hiring platform it uses.
- [YouTube Transcript Scraper](https://apify.com/hydrafetch/youtube-transcript-scraper): get the full transcript of any YouTube video with timestamps, title and channel, ready for AI summaries, RAG and search.
- [Google Ads Library Scraper](https://apify.com/hydrafetch/google-ads-library-scraper): get every Google ad a company runs from just its domain: creatives, formats and first and last shown dates, from the public Ads Transparency Center.
- [Company Website Finder](https://apify.com/hydrafetch/company-website-finder): turn a list of company names into their official websites and domains, each checked against the company homepage so directories never slip through.
- [Website Screenshot API](https://apify.com/hydrafetch/website-screenshot-api): capture screenshots of any web pages as hosted PNG links, full page or first screen, rendered in a real browser and priced per screenshot.

### Terms of use

**Your results are yours.** We claim no rights in the inputs you submit or the data you get back. Full terms: [hydrafetch.com/terms](https://hydrafetch.com/terms?utm_source=apify\&utm_medium=readme\&utm_content=website-to-markdown)

### Your feedback

Something not working, or a field you need? Open an issue on the Issues tab with the input you used, and we read every one.

***

<div align="center">
Built by <a href="https://hydrafetch.com?utm_source=apify&utm_medium=readme&utm_content=website-to-markdown">Hydrafetch</a>. Clean web data for developers and agents.
</div>

# Actor input Schema

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

The URLs to process, one per line. Full URLs including https://.

## Actor input object example

```json
{
  "urls": [
    "https://stripe.com"
  ]
}
```

# Actor output Schema

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

Website to Markdown: Clean LLM-Ready Text from Any URL records (the run's default dataset).

# 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://stripe.com"
    ]
};

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

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

```

## MCP server setup

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