# Page to Markdown Intel: LLM-Ready Web Content (`54m_music/page-to-markdown-intel`) Actor

Turn web pages into clean Markdown with token count, reading time, language, content-quality score, page type, heading outline, JSON-LD types, content hash and a blocked-or-empty flag. Plain HTTP, robots.txt respected, no JavaScript rendering.

- **URL**: https://apify.com/54m_music/page-to-markdown-intel.md
- **Developed by:** [Sam](https://apify.com/54m_music) (community)
- **Categories:** AI, Developer tools, Agents
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

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

## Page to Markdown Intel: LLM-ready web content with quality scores

Give it web page URLs and get the **main content as clean Markdown**, plus the numbers you would
otherwise compute yourself: token estimate, reading time, language, content-quality score (0-100),
page type, heading outline, JSON-LD types, canonical URL, a content hash for change detection and a
**blocked-or-empty flag**. Use it to feed an AI agent or RAG index only pages worth reading, to
budget context windows before you send text to a model, and to detect when a page changed.

**Plain HTTP only.** The Actor does not run JavaScript, so single-page apps that render in the
browser come back flagged `js_rendered_shell` instead of as text. It obeys `robots.txt`, makes
one request per second at most to any single host, never logs in, and never tries to get past bot
protection: a wall is detected and reported, not bypassed.

### What you get for each page

| Field | What it means |
| --- | --- |
| `url`, `finalUrl`, `httpStatus` | The URL you gave, where it ended after redirects, and the HTTP status |
| `title`, `description`, `canonicalUrl` | From `<title>`, the meta description (or `og:description`) and `<link rel="canonical">` |
| `markdown` | Main content only, as Markdown with ATX headings, absolute links, tables and lists. Images, navigation, footers, forms, cookie banners, share buttons and comment blocks are removed |
| `markdownTruncated` | `true` when the Markdown was cut at `maxMarkdownChars` |
| `language` | Primary language code: the `<html lang>` attribute, else the content-language meta tag, else a stop-word guess (en, es, fr, de, it, pt, nl), else `null` |
| `wordCount` | Whitespace-separated words in the main content (CJK text: every two characters count as one word) |
| `tokenEstimate` | `ceil(non-CJK characters / 4 + CJK characters)` of the Markdown. A planning number, not a tokenizer result |
| `readingTimeMin` | `wordCount / 238` words per minute, one decimal |
| `boilerplateRatio` | `1 - (main-content characters / whole-page visible characters)`, 0 to 1. High means most of the page is menus, footers and widgets |
| `linkDensity` | Characters inside links divided by all characters in the main content. Above 0.5 usually means an index or menu page |
| `qualityScore` | 0-100, see formula below. `0` when the page is blocked or empty |
| `pageType` / `pageTypeSignal` | `home`, `article`, `product`, `docs`, `listing` or `other`, and the rule that decided it (for example `jsonld:Product`, `og:type=article`, `path:docs`) |
| `outline` | Up to 60 headings of the main content: `{level, text}` |
| `jsonLdTypes` | Every schema.org `@type` found in JSON-LD blocks, sorted |
| `contentHash` | First 32 hex characters of SHA-256 of the main-content text with whitespace collapsed. Link and formatting changes do not change it; a text change does. Compare runs to detect updates |
| `blockedOrEmpty` / `blockedReason` | `true` only when `includeBlockedPages` is on (otherwise such pages go to `SKIPPED`), with `bot_wall_or_js_required`, `js_rendered_shell` or `empty_page` when there is nothing readable to use |
| `fetchedAt` | UTC time of the fetch |

#### Quality score (0-100)

`35 x min(words / 600, 1)` + `20 x (1 - linkDensity)` + `15 x (1 - boilerplateRatio)` +
heading structure (`10` with an h1, `5` with other headings, `0` with none) + metadata (`4` title,
`3` description, `3` canonical) + `10 x min(average paragraph length in words / 20, 1)`.
Rounded to a whole number. A thin menu page lands under 50; a long, well-structured article lands above 80.

#### Page type rules (first match wins)

1. Path is `/` (or `/index.html`): `home`.
2. JSON-LD type: `Product` / `Offer` gives `product`; `Article`, `NewsArticle`, `BlogPosting` give `article`; `TechArticle`, `APIReference`, `FAQPage` give `docs`; `ItemList`, `CollectionPage` give `listing`.
3. `og:type` of `article` or `product`.
4. Host starting `docs.`, `developer.` or `api.`: `docs`.
5. URL path hints (`/docs/`, `/blog/`, `/products/`, `/category/` and similar). A bare `/blog/` or `/news/` index, or a page with many article cards, is `listing`.
6. A price next to "in stock" or "add to cart" wording: `product`.
7. Many links and little text, or three or more `<article>` blocks: `listing`.
8. A `<time>` element and at least 250 words: `article`. Otherwise `other`.

### Input

| Field | Default | Notes |
| --- | --- | --- |
| `urls` | two example pages | http(s) page URLs. Duplicates are dropped |
| `includeLinks` | `true` | Keep hyperlinks as Markdown links. Turn off for cheaper plain text |
| `maxMarkdownChars` | 100000 | Per-page cap; the cut falls on a line break |
| `includeBlockedPages` | `false` | Return pages detected as blocked or empty as rows (charged) instead of listing them in `SKIPPED` |

```json
{ "urls": ["https://www.python.org/", "https://docs.apify.com/academy"], "includeLinks": false }
```

### Output example

```json
{
  "url": "https://wordpress.org/news/2026/11/wordpress-7-2-beta-5/",
  "title": "WordPress 7.2 Beta 5 | WordPress News",
  "language": "en",
  "pageType": "article",
  "pageTypeSignal": "og:type=article",
  "markdown": "# WordPress 7.2 Beta 5\n\nWordPress 7.2 Beta 5 is ready for download and testing! ...",
  "wordCount": 682,
  "tokenEstimate": 1490,
  "readingTimeMin": 2.9,
  "boilerplateRatio": 0.337,
  "linkDensity": 0.122,
  "qualityScore": 93,
  "outline": [{ "level": 1, "text": "WordPress 7.2 Beta 5" }, { "level": 2, "text": "How to Test WordPress 7.2 Beta 5" }],
  "jsonLdTypes": [],
  "canonicalUrl": "https://wordpress.org/news/2026/11/wordpress-7-2-beta-5/",
  "contentHash": "b7a6d40035688fa06b72d4c61a7aaf9f",
  "blockedOrEmpty": false,
  "blockedReason": null
}
```

### Pricing

Pay per event: you pay for each page converted and written to the dataset (see the Pricing tab),
plus the standard Apify start event. Skipped pages are never in the dataset, so they are free. No proxy or browser is used, so runs are small
and fast: five pages take about four seconds.

### Output: dataset and SKIPPED record

The **dataset** holds only converted pages, one row each; every row is charged. The **key-value store** record **`SKIPPED`** is one JSON list of `{url, reason, detail}` for everything left out. It is never charged.

### What is skipped (and not charged)

A URL is skipped, listed in the run's `SKIPPED` key-value record with a reason, and not charged when:

- `robots_disallowed`: the site's `robots.txt` forbids the fetch, or `robots.txt` could not be read (server error).
- `http_4xx` / `http_5xx`: the server refused or failed. After three 403 or 429 answers in a row from one host, the Actor stops asking that host (`host_stopped`).
- `blocked_or_empty`: the page answered but has nothing readable (bot wall, JavaScript-only shell, empty page). `detail` says which. Set `includeBlockedPages` to get these as rows instead.
- `not_html`: the URL is a PDF, image or other non-text file.
- `network_error`, `too_many_redirects`.

The run **fails with a clear message** when no page at all could be converted, so an empty run costs you only the start event.

### Limits

- No JavaScript rendering. Pages built entirely in the browser return `js_rendered_shell`.
- Responses are read up to 2 MB per page.
- Bot walls, CAPTCHAs and logins are detected, never bypassed.
- Personal data: author bylines, author and profile links, e-mail addresses and phone numbers are
  removed from the Markdown. Names that appear inside the article text itself stay, because they are part of the page.
- The language guess and page type are heuristics. Check `pageTypeSignal` when it matters.

### FAQ

**How is this different from a plain fetch Actor?** A fetch Actor returns HTML or text. This one
returns only the main content, then judges it: how long, how clean, what kind of page, whether it
changed since last time, whether it was blocked. You can filter on `qualityScore >= 60` and
`blockedOrEmpty = false` before spending tokens.

**How do I watch a page for changes?** Schedule the Actor and compare `contentHash` between runs.
It ignores layout and link changes and reacts to text changes.

**Why is my page in `SKIPPED` as `blocked_or_empty`?** Either the site shows a challenge page to automated
clients, or the content is drawn by JavaScript. `detail` (or `blockedReason` with `includeBlockedPages`) tells you which. Use a browser-based
Actor for those pages.

# Actor input Schema

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

Web pages to convert to Markdown. Plain http(s) pages only: the Actor does not run JavaScript, log in or bypass bot protection, and it obeys robots.txt.

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

Keep hyperlinks as Markdown links with absolute URLs. Turn off for plain text that costs fewer tokens.

## `maxMarkdownChars` (type: `integer`):

Cut the Markdown at a line break after this many characters. The row says when it was cut.

## `includeBlockedPages` (type: `boolean`):

Off by default: pages detected as blocked, empty or JavaScript-only go to the SKIPPED record and are not charged. Turn on to get them as rows with blockedOrEmpty set to true (charged like any row).

## Actor input object example

```json
{
  "urls": [
    "https://wordpress.org/news/2026/11/wordpress-7-2-beta-5/",
    "https://www.python.org/"
  ],
  "includeLinks": true,
  "maxMarkdownChars": 100000,
  "includeBlockedPages": false
}
```

# Actor output Schema

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

Every row in the default dataset, overview table view.

## `allFields` (type: `string`):

Every row with all fields.

# 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://wordpress.org/news/2026/11/wordpress-7-2-beta-5/",
        "https://www.python.org/"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("54m_music/page-to-markdown-intel").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://wordpress.org/news/2026/11/wordpress-7-2-beta-5/",
        "https://www.python.org/",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("54m_music/page-to-markdown-intel").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://wordpress.org/news/2026/11/wordpress-7-2-beta-5/",
    "https://www.python.org/"
  ]
}' |
apify call 54m_music/page-to-markdown-intel --silent --output-dataset

```

## MCP server setup

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

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/Je6DIp52yu4L3jjwL/builds/PPY9wNNZTAmbtahlz/openapi.json
