# Website Content Miner (`seeb/website-content-miner`) Actor

Extract clean website content at scale: page titles, meta descriptions, H1-H3 headings, readable main text, and URLs. Includes smart noise removal, Readability fallback, optional internal crawling, and structured output for SEO audits, AI datasets, research, and automation.

- **URL**: https://apify.com/seeb/website-content-miner.md
- **Developed by:** [Techionik](https://apify.com/seeb) (community)
- **Categories:** SEO tools, Developer tools, Automation
- **Stats:** 7 total users, 0 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

$25.00 / 1,000 dataset items

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?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

### Website Content Miner

Extract clean, structured, and human-readable content from websites without writing custom selectors.

Website Content Miner is built for SEO audits, AI preprocessing, research, content analysis, website archiving, and automation workflows. It crawls standard HTML websites and returns organized page-level data including page titles, meta descriptions, headings, clean main text, and source URLs.

### What This Actor Does

Website Content Miner helps you turn website pages into clean structured datasets.

It automatically:

- Extracts page titles
- Extracts meta descriptions
- Extracts H1, H2, and H3 headings
- Extracts readable main page text
- Removes common website noise such as navigation menus, footers, cookie banners, modals, newsletter blocks, and social/share sections
- Uses smart content detection with Mozilla Readability fallback
- Optionally follows internal links with crawl depth control
- Outputs clean dataset items ready for SEO, AI, research, or automation use

### Best For

- SEO content audits
- Website content extraction
- AI dataset preparation
- LLM / RAG preprocessing
- Competitor research
- Content inventory creation
- Website text archiving
- Marketing and content analysis
- Automation workflows using Apify, Make, n8n, Zapier, or custom APIs

### Data Extracted

Each scraped page returns the following fields:

| Field | Description |
|---|---|
| pageTitle | The page title, using Open Graph title or HTML title |
| metaDescription | The page meta description, using standard or Open Graph description |
| headings | Extracted H1, H2, and H3 headings |
| mainText | Clean readable page text with common noise removed |
| pageUrl | Final scraped page URL |
| scrapedAt | ISO timestamp showing when the page was processed |
| crawlDepth | Depth where the page was discovered, starting at 0 for input URLs |
| status | `ok` for extracted pages or `failed` when a request could not be completed |
| errorMessage | Failure reason for rows where `status` is `failed` |

### Input Options

#### Start URLs

Add one or more website URLs to scrape.

Example:

https://example.com

#### Crawl Links

Enable this option if you want the Actor to follow links found on the provided pages.

Default: false

#### Max Enqueue Depth

Controls how deep the scraper should follow links.

Examples:

- 0 = scrape only the provided start URLs
- 1 = scrape start URLs and links found on those pages
- 2 = scrape links found on the next level as well

Default: 1

#### Same Domain Only

When enabled, the Actor only follows links from the same domain as the first start URL.

This is useful for keeping the crawl focused on one website.

Default: true

#### Max Requests per Crawl

Sets the maximum number of pages processed in one run.

Default: 100

### Output Example

{
"pageTitle": "Example Website",
"metaDescription": "A sample website used for demonstration.",
"headings": \[
{
"level": "h1",
"text": "Example Domain"
}
],
"mainText": "This domain is for use in illustrative examples in documents...",
"pageUrl": "https://example.com/",
"scrapedAt": "2026-08-09T09:10:00.000Z",
"crawlDepth": 0,
"status": "ok"
}

### How It Works

1. Website Content Miner starts from the URLs you provide.
2. It loads each page using Crawlee and Cheerio.
3. It detects the main content area using common content selectors such as main, article, #content, .content, and similar structures.
4. It removes common noise elements like headers, navigation menus, footers, forms, scripts, cookie banners, modals, newsletter blocks, and social sharing sections.
5. It extracts titles, descriptions, headings, and readable text.
6. It uses Mozilla Readability first, then applies a stronger fallback strategy for pages where content is not structured like a standard article.
7. It saves each result to the Apify dataset.

### Key Features

- Clean structured output
- No custom selectors required
- Smart main content detection
- Noise removal for cleaner text
- Optional internal link crawling
- Same-domain crawling option
- Crawl depth control
- Request limit control
- SEO and AI-ready dataset format
- Simple input configuration
- Easy integration through Apify API

### Typical Use Cases

#### SEO Audits

Collect page titles, meta descriptions, headings, and page text from websites to review content structure and optimization quality.

#### AI and LLM Preprocessing

Prepare clean website text for AI workflows, embeddings, semantic search, RAG systems, and knowledge base creation.

#### Website Research

Extract readable content from multiple pages for competitor research, market research, or content analysis.

#### Content Inventory

Create a structured inventory of website pages, including titles, URLs, headings, and body text.

#### Website Archiving

Save clean text versions of website pages for documentation, research, or long-term reference.

#### Automation Workflows

Use the output dataset in Apify integrations, Make, n8n, Zapier, Google Sheets, databases, or custom APIs.

### Recommended Settings

#### For a Single Page

- crawlLinks: false
- maxRequestsPerCrawl: 1

#### For a Small Website Audit

- crawlLinks: true
- maxEnqueueDepth: 1
- sameDomainOnly: true
- maxRequestsPerCrawl: 50

#### For a Larger Website Crawl

- crawlLinks: true
- maxEnqueueDepth: 2
- sameDomainOnly: true
- maxRequestsPerCrawl: 100 or higher

### Notes and Limitations

- Best suited for static and semi-static HTML websites
- Not designed for websites that require login
- Not ideal for heavily JavaScript-rendered applications
- Results depend on the quality and structure of the target website
- For websites with strict anti-bot protection, proxy configuration may be required

### Output Access

After the run finishes, you can access the scraped data from:

- Apify Dataset
- Dataset API
- Overview table
- JSON, CSV, Excel, XML, or RSS exports
- Apify integrations and webhooks

### Why Use Website Content Miner

Website Content Miner saves time by automatically extracting clean, structured website content without requiring custom scraping rules for every website.

It is useful for anyone who needs reliable page-level content data for SEO, AI, automation, research, reporting, or content intelligence workflows.

### Technology

Built with:

- Apify SDK
- Crawlee
- CheerioCrawler
- Cheerio
- Mozilla Readability

### Status

Production-ready for general website content extraction.

# Actor input Schema

## `startUrls` (type: `array`):

URLs to start with for scraping.

## `crawlLinks` (type: `boolean`):

If enabled, the scraper will follow links found on pages (up to the depth limit).

## `maxEnqueueDepth` (type: `integer`):

How deep to follow links. 0 = only start URLs, 1 = start URLs + their links, 2 = + links from those pages, etc.

## `sameDomainOnly` (type: `boolean`):

If enabled, only links from the same domain as the start URL(s) will be crawled.

## `maxRequestsPerCrawl` (type: `integer`):

Maximum number of pages to scrape in one run.

## `maxTextLength` (type: `integer`):

Maximum number of characters to keep in the extracted main text for each page.

## `maxRequestRetries` (type: `integer`):

How many times to retry a failed page before writing a failed row to the dataset.

## `requestTimeoutSecs` (type: `integer`):

Maximum seconds to wait for each page request.

## `useApifyProxy` (type: `boolean`):

Enable Apify Proxy for sites that block direct datacenter requests. Leave disabled for normal public pages.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://apify.com/"
    }
  ],
  "crawlLinks": false,
  "maxEnqueueDepth": 1,
  "sameDomainOnly": true,
  "maxRequestsPerCrawl": 100,
  "maxTextLength": 20000,
  "maxRequestRetries": 3,
  "requestTimeoutSecs": 30,
  "useApifyProxy": false
}
```

# 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 = {
    "startUrls": [
        {
            "url": "https://apify.com/"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("seeb/website-content-miner").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 = { "startUrls": [{ "url": "https://apify.com/" }] }

# Run the Actor and wait for it to finish
run = client.actor("seeb/website-content-miner").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 '{
  "startUrls": [
    {
      "url": "https://apify.com/"
    }
  ]
}' |
apify call seeb/website-content-miner --silent --output-dataset

```

## MCP server setup

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

```

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/RR8cnp0ctaJtlOmXX/builds/Udfh8Ga8MwdFHaKd1/openapi.json
