# Website To Markdown Extractor (`absht00/website-to-markdown-extractor`) Actor

Convert any public website into clean LLM-ready Markdown, extract structured JSON-LD data, and find contact information. Perfect for AI builders, n8n/Make workflows, and agencies needing fast, cheap httpx-based extraction without browser overhead.

- **URL**: https://apify.com/absht00/website-to-markdown-extractor.md
- **Developed by:** [Abdellah](https://apify.com/absht00) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 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.

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 Extractor

Convert any public website into clean, LLM-ready Markdown plus structured JSON-LD metadata, contact emails and word counts. Perfect for AI/RAG pipelines, n8n/Make/Zapier workflows and agencies that need fast, cheap extraction without a headless browser.

This Actor fetches public pages with lightweight HTTP requests, strips navigation, ads, cookie banners and boilerplate, and returns clean Markdown that LLMs, embeddings and documentation tools can actually use. No browser overhead means runs finish in seconds, cost a fraction of browser-based scrapers, and scale to hundreds of pages without timing out. It is built for builders who need reliable website content as data, not as messy HTML.

### Features

- Clean Markdown conversion with preserved headings, links, lists and tables
- JSON-LD structured data extraction when present on the page
- Contact email detection for lead research workflows
- Word count per page for content planning and SEO analysis
- HTTP status code per URL so you can filter failed pages easily
- Multiple URLs in a single run, results in the default dataset
- Works on any public website, no login required
- Fast, lightweight and maintained by Abdellah

### How to use

1. Click Try for free / Start on this page.
2. Enter one or more public website URLs in the Input tab. The prefilled example works instantly.
3. Click Start and wait a few seconds.
4. Open the Output tab to preview results, or download the dataset as JSON/CSV.
5. Use the Apify API to integrate results into n8n, Make, Zapier or your own pipeline.

### Input

Enter your target URLs in the Input fields shown in the Console. Use the default prefilled example to test instantly, or replace it with your own public URLs. No API keys or logins are required.

### Output

Each run pushes one record per extracted URL to the default dataset. The dataset view shows these fields: url (source page link), title (page title), word_count (number of words extracted), and status_code (HTTP status). Records also contain the extracted Markdown content, JSON-LD metadata and any contact emails found on the page. Example record: {"url": "https://example.com/", "title": "Example Domain", "word_count": 42, "status_code": 200, "markdown": "# Example Domain", "emails": \[]}. Check the Output tab for the exact fields of your run.

### Perfect for

AI builders and RAG pipelines who need clean training and retrieval data, n8n/Make/Zapier users who need fresh website content in automations, agencies and freelancers doing content audits and competitor research, SEO teams analysing readable text at scale, and lead researchers collecting contact emails alongside page content in one pass.

### Pricing

Pay per usage: $0.01 per Actor start plus $0.002 per extracted page/result. You only pay for pages actually extracted. No browser compute, no idle time, no monthly fee to start. Ideal for occasional extractions and for high-volume pipelines alike.

### Why not a browser scraper?

Browser Actors launch Chrome and render JavaScript, so they are slower and far more expensive per page. For static and mostly-static public websites, HTTP extraction delivers the same clean content at a fraction of the cost and time. Use this Actor first for speed and savings, and combine it with a browser Actor only when a page truly requires JavaScript rendering.

### FAQ

Do I need to log in to websites? No, public pages only. What if a page has no JSON-LD or emails? Those fields will be empty for that record. Can I extract many pages at once? Yes, provide multiple URLs and download the complete dataset afterwards.

### Support

Maintained by Abdellah. Fast, reliable data extraction and AI-ready web automation tools. For issues, open an issue on this Actor page.

# Actor input Schema

## `start_url` (type: `string`):

Public website URL to extract (must be accessible without login).

## `include_markdown` (type: `boolean`):

Generate clean, LLM-ready Markdown from the page content.

## `include_jsonld` (type: `boolean`):

Extract structured JSON-LD (schema.org) metadata found on the page.

## `extract_emails` (type: `boolean`):

Find and return public email addresses listed on the page.

## `max_pages` (type: `integer`):

Maximum number of pages to process (default 1 for single-page extraction).

## `respect_robots_txt` (type: `boolean`):

Respect robots.txt exclusion rules.

## Actor input object example

```json
{
  "start_url": "https://example.com",
  "include_markdown": true,
  "include_jsonld": true,
  "extract_emails": true,
  "max_pages": 1,
  "respect_robots_txt": true
}
```

# Actor output Schema

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

Dataset containing all extracted markdown records

# 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 = {
    "start_url": "https://example.com",
    "include_markdown": true,
    "include_jsonld": true,
    "extract_emails": true,
    "max_pages": 1,
    "respect_robots_txt": true
};

// Run the Actor and wait for it to finish
const run = await client.actor("absht00/website-to-markdown-extractor").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 = {
    "start_url": "https://example.com",
    "include_markdown": True,
    "include_jsonld": True,
    "extract_emails": True,
    "max_pages": 1,
    "respect_robots_txt": True,
}

# Run the Actor and wait for it to finish
run = client.actor("absht00/website-to-markdown-extractor").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 '{
  "start_url": "https://example.com",
  "include_markdown": true,
  "include_jsonld": true,
  "extract_emails": true,
  "max_pages": 1,
  "respect_robots_txt": true
}' |
apify call absht00/website-to-markdown-extractor --silent --output-dataset

```

## MCP server setup

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

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/hkGxU0S0DUoqD8d62/builds/gCV0kO8uGeArzM7Az/openapi.json
