# Website to Markdown Crawler - Batch URLs to LLM-Ready Text (`bin_ai_tools/ai-web-crawler`) Actor

Pay per delivered row: $0.001 per result row. Failed rows are not charged.

- **URL**: https://apify.com/bin_ai_tools/ai-web-crawler.md
- **Developed by:** [Bin Bin](https://apify.com/bin_ai_tools) (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

$1.00 / 1,000 converted pages

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

## AI Web Crawler — Batch URLs to Clean Markdown for LLMs

Pay per delivered row: $0.001 per result row. Failed rows are not charged.

Turn batches of web pages into clean, LLM-ready Markdown. Paste a list of URLs and get back the article content of every page — title, description, clean Markdown body, word count and outlinks — with navigation, ads and boilerplate stripped out.

Need a whole website discovered from its sitemap instead of a URL list? Use [Sitemap to Markdown](https://apify.com/bin_ai_tools/sitemap-to-markdown) — it crawls the sitemap and converts every page the same way.

### Example

Input — copy, paste, run:

```json
{
  "urls": ["https://news.ycombinator.com"],
  "includeLinks": true,
  "maxPages": 50
}
```

Output — one dataset row per delivered page (real run, 2026-11-23; `markdown` and `links` shortened):

```json
{
  "url": "https://news.ycombinator.com/",
  "title": "Hacker News",
  "markdown": "**[Hacker News](news)** [new](newest) | [past](front) | [comments](newcomments) | … (567 words in the full row)",
  "wordCount": 567,
  "links": ["https://news.ycombinator.com/", "https://news.ycombinator.com/news", "https://news.ycombinator.com/newest"]
}
```

### What it is for

- Feeding RAG pipelines and AI agents with reliable page content
- Building text datasets from lists of URLs
- Monitoring pages whose content changes (docs, pricing, changelogs)

### Input

- **urls** — the pages to fetch (one per line, batches welcome)
- **crawlSite** — optionally follow same-domain links from the start URLs
- **maxDepth / maxPages** — crawl controls and run cap
- **includeLinks** — attach each page's outlink list

### Output (one row per delivered page)

`url`, `title`, `description`, `markdown`, `wordCount`, `links`, `crawledAt`

You are charged per delivered page only. Pages that fail or carry no extractable content are listed in the run's OUTPUT record and are never charged.

### Output fields

- `url` — URL of the result row.
- `title` — Title of the result row.
- `markdown` — Markdown of the result row.
- `wordCount` — Word Count of the result row.
- `links` — Links of the result row.
- `description` — Description of the result row.
- `crawledAt` — Crawled At of the result row.

Each run returns one dataset row per input item. Rows that fail are returned as error rows with an error code and message, and are not charged.

# Actor input Schema

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

Web pages to convert to Markdown. Paste one URL per line; batches of hundreds are fine.

## `crawlSite` (type: `boolean`):

Follow links within the same domain starting from the start URLs (respecting max depth and page cap).

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

How many link hops to follow when site crawling is on.

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

Overall cap on pages fetched in one run.

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

Attach the list of links found on each page.

## Actor input object example

```json
{
  "urls": [
    "https://example.com"
  ],
  "crawlSite": false,
  "maxDepth": 1,
  "maxPages": 50,
  "includeLinks": true
}
```

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

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

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

```

## MCP server setup

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