# Web to Markdown, $0.0015 per page (hidden text listed) (`hiddenstrip/web-to-markdown`) Actor

Webpage to markdown API: public pages to LLM-ready Markdown for RAG. $0.0015 per page; JS mode $0.004, needs 2048 MB. Common hidden text is removed and listed. Failed pages are free. Start fee $0.00005 per GB, min. one. Run from n8n or Make. Respects robots.txt. No bot-protection bypass or logins.

- **URL**: https://apify.com/hiddenstrip/web-to-markdown.md
- **Developed by:** [HiddenStrip](https://apify.com/hiddenstrip) (community)
- **Features:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 pages read

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/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

## Web to Markdown

Give it public page URLs and get LLM-ready Markdown back, with common hidden text removed and listed. You can call it as a webpage to markdown API through Apify. This lists common hidden text that could carry instructions; it does not detect or block attacks. The Markdown is in the `text` field of each dataset item.

Use it from a RAG pipeline, a scraping script, or n8n or Make via Apify, as an HTML to Markdown converter or an LLM web scraping API. For each URL you get the page's visible text as Markdown, a record of any hidden content that was removed (CSS-hidden, off-screen, tiny or transparent text, aria-hidden elements, HTML comments, clipped text), and best-effort flags. Some kinds of hiding are not covered.

By default it reads static HTML. For pages that need JavaScript, turn on **JS mode** (`renderJs: true`). A page rendered in the browser is charged **$0.004** (`page-read-js`), and the run must be set to **2048 MB** of memory (other memory sizes refuse to start). Pages that read fine as static HTML stay at **$0.0015** (`page-read`). It does not bypass bot protection, captchas or logins, and it respects robots.txt.

The Actor id is `hiddenstrip/web-to-markdown`. Results go to the run's default dataset. This is a normal Actor run, not a real-time or Standby API.

### Getting started

#### Apify Console

1. Open [Web to Markdown](https://apify.com/hiddenstrip/web-to-markdown) and start a run.
2. Enter one or more public `https://` URLs in `urls`.
3. Leave JS mode off for static pages. For pages that need JavaScript, set `renderJs` to true and set the run memory to **2048 MB** in the run options (memory is not an input field).
4. Start the run. When it finishes, open the default dataset. The Markdown is in `text`.

#### JSON input

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

JS mode (also set the run memory to 2048 MB):

```json
{
  "urls": ["https://example.com/"],
  "renderJs": true
}
```

The only input fields are `urls` (required), `renderJs`, `maxPages` and `timeoutSecs`. See [Input](#input).

#### JavaScript (`apify-client`)

```js
import { ApifyClient } from "apify-client";
const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor("hiddenstrip/web-to-markdown").call({
  urls: ["https://example.com/"],
  maxPages: 5,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
// Markdown is in items[0].text
```

For JS mode, pass `renderJs: true` in the input and set memory in the client options, not in the input:

```js
const run = await client.actor("hiddenstrip/web-to-markdown").call(
  { urls: ["https://example.com/"], renderJs: true },
  { memory: 2048 },
);
```

#### Python (`apify-client`)

```python
import os
from apify_client import ApifyClient

client = ApifyClient(os.environ["APIFY_TOKEN"])
run = client.actor("hiddenstrip/web-to-markdown").call(
    run_input={"urls": ["https://example.com/"]},
)
items = client.dataset(run["defaultDatasetId"]).list_items().items
## Markdown is in items[0]["text"]
```

For JS mode:

```python
run = client.actor("hiddenstrip/web-to-markdown").call(
    run_input={"urls": ["https://example.com/"], "renderJs": True},
    memory_mbytes=2048,
)
```

#### curl

This starts a normal Actor run, waits for it to finish, and returns the dataset items. It is not a Standby or real-time endpoint. Apify's sync endpoint returns HTTP 408 if the run takes longer than 300 seconds. For a longer job, start the run with the `runs` endpoint and read the dataset afterwards. If you already received a 408, check that run rather than starting another.

```bash
curl "https://api.apify.com/v2/acts/hiddenstrip~web-to-markdown/run-sync-get-dataset-items" \
  -X POST \
  -H "Authorization: Bearer $APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"urls":["https://example.com/"]}'
```

JS mode (2048 MB is a run option, not an input field):

```bash
curl "https://api.apify.com/v2/acts/hiddenstrip~web-to-markdown/run-sync-get-dataset-items?memory=2048" \
  -X POST \
  -H "Authorization: Bearer $APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"urls":["https://example.com/"],"renderJs":true}'
```

### Pricing

- **page-read:** $0.0015 for each page read successfully from static HTML.
- **page-read-js:** $0.004 for each page rendered in the browser and read successfully in JS mode (2048 MB required). A page that JS mode reads without starting the browser is charged `page-read`. A page is never charged both.
- **Actor start** (`apify-actor-start`): $0.00005 per GB, minimum one (one at 512 MB, two at 2048 MB), even when no page is read.
- Failed, blocked-by-robots, timed-out and skipped pages are not charged. A `needs_javascript` error is not charged.
- A `block` verdict is a successful read and is charged.
- A successful read (`status: "success"`) that also carries a `render_note` is charged (`page-read` for a static read, `page-read-js` for a rendered one); the note is a warning that the text may be incomplete.
- The run honours the maximum total charge you set when starting it: when another page would exceed it, the remaining URLs are returned as `skipped` and not fetched.
- There is no per-dataset-item event: error and skipped rows in the default dataset are not billed. If a dataset-item event is added later with a price other than $0, the run refuses to start.
- A JS-mode run refuses to start if `page-read-js` is not priced, so a browser read is never billed at the static price.
- If the platform restarts a run, pages already saved are not read or charged again.

### Input

- `urls` (required): public `https://` pages to read, on the standard port. At least one.
- `maxPages` (default 20): upper bound on pages read per run. Extra URLs come back as `skipped` items and are not fetched or charged.
- `timeoutSecs` (default 25): time budget per page (capped at about 15 in JS mode).
- `renderJs` (default `false`): JS mode, see below.

Memory is set in the run options, not in this input.

### What you get per URL

One dataset item per input URL, in input order. The Markdown is in `text` (there is no `markdown` field). Hidden text that was removed is not in `text`.

```json
{
  "url": "https://example.com/post",
  "status": "success",
  "status_code": 200,
  "text": "# Visible heading\nVisible paragraph one ...",
  "hidden_content_removed": {
    "count": 2,
    "chars": 118,
    "items": [{ "kind": "css_hidden", "excerpt": "[css_hidden · 83c] ___ ___ all previous ___", "evidence_sha256": "8d76..." }]
  },
  "collapsed_text": [],
  "flags": [{ "type": "agent_instructions", "severity": "high", "location": "css_hidden" }],
  "flagged": true,
  "flagged_excerpts": ["[css_hidden · 83c · agent_instructions] ___ ___ all previous ___"],
  "verdict": "block",
  "source_url": "https://example.com/post",
  "content_type": "text/html",
  "fetched_at": "2026-11-29T00:00:00.000Z",
  "rendered_with_browser": false,
  "charged": true
}
```

| Field | Meaning |
| --- | --- |
| `url` | The input URL for this row. |
| `status` | `success`, `error` or `skipped`. |
| `status_code` | HTTP-style status for this row. 200 on a successful read; an error status when the URL could not be read; `null` when the URL was skipped. |
| `text` | The page's visible text as Markdown. Hidden text that was removed is not in it. Present on successful reads. |
| `hidden_content_removed` | Count, size and a redacted record of each piece of hidden content that was removed. The removed text itself is not returned. Present on successful reads. Every piece is counted; `items` lists up to 500 of them, and `items_omitted` says how many more were counted. |
| `collapsed_text` | Text found in collapsed HTML details on a successful read. Empty when none was listed. |
| `flags`, `flagged`, `flagged_excerpts` | Best-effort pattern matches on text found in hidden content and on the page. A heuristic, not a guarantee. |
| `verdict` | `allow`, `warn` or `block`, derived from the flags. `allow` means no flag was raised. It is not a statement about the page. |
| `source_url` | Final URL after redirects, on a successful read. |
| `content_type` | Content-Type of the fetched page, on a successful read. |
| `fetched_at` | When the page was fetched, as an ISO 8601 timestamp, on a successful read. |
| `error`, `error_message` | Why a URL was not read, for example `blocked_by_robots`, `needs_javascript`, `fetch_failed`, `disallowed_url`, `bad_url`. |
| `policy_note` | Optional note when a site policy file was found but its wording was unclear. Only set on some successful reads. |
| `render_note` | Without JS mode: set when a page appears to need JavaScript. In JS mode: set when the browser could not render the page in time. On an error item (for example `error: "needs_javascript"` or `"render_timeout"`) the page is not charged. On a successful read (`status: "success"`) it is a warning that the text may be incomplete, and the page is charged (`page-read`, or `page-read-js` if it was rendered). |
| `rendered_with_browser` | `true` only in JS mode, when the page was rendered in the browser (charged as `page-read-js`). |
| `charged` | `true` only when a page was read successfully and its charge went through. |
| `charge_event` | JS mode only: `page-read-js` or `page-read`, the one event this page was charged as. |
| `browser_skipped_reason` | JS mode only: `static_html_complete` when the page's static HTML was already complete (a small page with plain external scripts, no single-page-app root, no inline script code), so the browser was not started and the page was charged as `page-read`. Absent otherwise. |
| `charge_note` | Rare. Set on a successful read when the charge could not be confirmed. |

### JS mode

With `"renderJs": true`, a page that needs JavaScript (scripts, a single-page-app shell, stylesheets the static read cannot apply) is opened in a headless Chromium and read from the rendered page. Hidden-text removal then uses the browser's computed styles, so text hidden by classes, scripts or inherited styles is caught, and text a script inserts is listed separately from text that was in the HTML. A short hover and scroll pass runs and open and closed shadow roots are read, best-effort. Pages that read fine as static HTML are still read statically and charged as `page-read`, including small pages whose static HTML is already complete even though they load external scripts: the browser is not started for them, and their rows carry `browser_skipped_reason: "static_html_complete"`. On a page skipped as `static_html_complete`, common hidden text is removed and listed from the page's static HTML and its fetched stylesheets only. Hidden text that appears only after a classic external script runs (including data-attribute loaders) is not listed on that path, unlike a rendered JS-mode read. Pages the browser renders still get the browser-based check (computed styles, script-inserted text, hover and scroll pass).

Limits: does not bypass bot protection, captchas or logins; about 15 seconds per page in total; heavy JS sites can time out; hover-revealed and other hidden text is best-effort.

- **Memory:** set the run's memory to exactly **2048 MB**. A JS-mode run below or above 2048 MB refuses to start with a clear error, before anything is fetched or charged. The Actor's default memory stays at 512 MB because static runs need no more; static runs can use any memory.
- **Time per page:** at most **15 seconds** in total per page in JS mode, including robots checks, the static fetch, browser start, navigation, rendering and closing the browser (`timeoutSecs` above 15 is capped in JS mode). A slower page is stopped and fails as `render_timeout`, and is not charged.
- **Stops after repeated failures:** after **5 failed browser renders in a row** the run stops, sets a status message saying so, and returns the pages not yet attempted as `skipped` (`js_render_failures`); they are not fetched or charged.
- **Browser isolation required:** JS mode starts the browser only when the container lets it run in its own process namespace with Chromium's sandbox on, or when the kernel stops one process from inspecting another (Yama `ptrace_scope` 1 or higher). Otherwise no page is fetched or rendered: each comes back as an error `browser_isolation_unavailable` (503), not charged, and the status message says so.
- **Limits:** at most 100 pages per run (raise the run timeout for large runs: up to about 15 seconds per page); the browser gets at most 10 seconds per page inside that budget; one fresh browser per page; images, media and fonts are not loaded; WebAssembly and other heavy browser features are off.
- **Same rules as static reads:** robots.txt, robots meta, ai.txt and TDM checks happen before the browser opens; every request the page makes is checked the same way as the page itself (public addresses on ports 80 and 443 only), and anything else is refused.
- **It does not get past bot protection.** No captcha solving, no stealth browser, no proxies, no logins. A page that blocks automated browsers fails and is not charged.

### Limits you should know about

- **No JavaScript rendering without JS mode.** Content inserted by JavaScript is not seen. Single-page apps that render in the browser usually come back as a `needs_javascript` error with a `render_note`, and are not charged. A page that still has readable static text is returned as a successful read with a `render_note` warning, and is charged as `page-read`.
- Hover-revealed, scroll-revealed and shadow-DOM content is not covered without JS mode; JS mode covers it best-effort only.
- JS mode: hiding is judged from the browser's computed styles at 1280x720. Text on a background image is never judged low-contrast (the backdrop is unknown); text inside images or canvas is not read; content that loads only after a click, or after more than a few seconds, is missed.
- Visible text is not removed. If a page shows an instruction in plain sight, it stays in `text`.
- Hiding is judged for a 1280x720 desktop screen in light mode. Text a stylesheet shows at that size stays in `text` (for example `hidden md:flex`, or `display: none` overridden by a later rule or a matching `@media` block); text shown only on other screen sizes, in dark mode or on hover is removed.
- Every piece of text that is removed is counted in `hidden_content_removed` and listed (up to 500 items per page; `items_omitted` says how many more were counted). SVG text, which is not part of the Markdown, is listed as `svg_text`.
- Flags and `verdict` are best-effort heuristics and will miss things.
- Static HTML (text-based PDFs on a best-effort basis), or rendered pages in JS mode. No login, cookies, forms or proxies.
- Login pages are recognised by a heuristic only (a password field together with sign-in wording in the title or headings, or a 401 or 403 response). A sign-in page that does not match comes back as a `success` and is charged.
- Only public `https://` pages. Private, loopback, link-local and metadata addresses are refused.
- Only the standard web ports (80 and 443). A start URL or a redirect to another port is refused, comes back as an error, and is not charged.

### How it behaves toward sites

It identifies itself with a `HiddenStrip` user agent. Before fetching a page it checks robots.txt for that site, and it repeats the check for every site a redirect leads to. Following RFC 9309, except that HTTP 429 is treated as unreachable: a robots.txt that cannot be fetched (server error, too many requests, timeout, unreachable) counts as "disallow"; a missing robots.txt (404 or other 4xx except 429) counts as "allow". Pages disallowed by robots.txt are not fetched. It also honours `X-Robots-Tag` and robots meta directives, ai.txt and the TDM Reservation Protocol; where those can only be read with the page itself, the page is fetched, nothing from it is returned, and the URL comes back as an error. Refused URLs are not charged. It does not log in or work around blocks.

### FAQ

**Where is the Markdown?** In the `text` field of each dataset item. There is no `markdown` field.

**Do you bypass bot protection, captchas or logins?** No. A page that blocks automated access fails and is not charged. There is no captcha solving, stealth browser, proxy or login support.

**When should I turn on JS mode?** When the page needs JavaScript to show its content (for example a single-page app). Set `renderJs` to true and set the run memory to 2048 MB. A rendered page is charged $0.004. Pages that already read fine as static HTML are still read statically and charged as `page-read`.

**Why did my JS-mode run refuse to start?** The usual cause is memory that is not exactly 2048 MB. A JS-mode run also refuses to start if `page-read-js` is not priced.

**Are failed pages charged?** Failed, blocked-by-robots, timed-out and skipped pages are not charged. A `block` verdict is a successful read and is charged.

**Do you follow robots.txt?** Yes, and also robots meta, ai.txt and the TDM Reservation Protocol. Details are in [How it behaves toward sites](#how-it-behaves-toward-sites).

### Use it from agents and workflows

These snippets follow Apify's official integration docs. They run this Actor by its id. This Actor is not a named built-in tool in those catalogs, and it does not provide its own MCP or Standby endpoint.

**Apify's MCP server.** This Actor has no MCP endpoint of its own. To run it through Apify's hosted MCP server, pin it with the `tools` query parameter (this replaces the default tool set). The server exposes the Actor as the tool `hiddenstrip--web-to-markdown`:

```
https://mcp.apify.com?tools=hiddenstrip/web-to-markdown
```

Running an Actor through Apify's MCP server needs an Apify account, or payment through Apify's agentic payments. Searching the Store and reading Actor details can be done without an account.

**LangChain (Python).** The `langchain-apify` package can run any Actor with `ApifyActorsTool`. Set `APIFY_TOKEN`, then:

```python
from langchain_apify import ApifyActorsTool

tool = ApifyActorsTool("hiddenstrip/web-to-markdown")
result = tool.invoke({"run_input": {"urls": ["https://example.com/"]}})
```

**LlamaIndex.** The official `llama-index-readers-apify` package provides `ApifyActor`:

```python
import os
from llama_index.core import Document
from llama_index.readers.apify import ApifyActor

reader = ApifyActor(os.environ["APIFY_TOKEN"])
documents = reader.load_data(
    actor_id="hiddenstrip/web-to-markdown",
    run_input={"urls": ["https://example.com/"]},
    dataset_mapping_function=lambda item: Document(
        text=item.get("text"),
        metadata={"url": item.get("url")},
    ),
)
```

**n8n.** Install the official Apify community node `@apify/n8n-nodes-apify`. Use the **Run an Actor** operation, set the Actor to `hiddenstrip/web-to-markdown`, and pass the input as JSON. For JS mode, set the node's memory to 2048 MB; other memory sizes refuse to start. There is no dedicated named operation for this Actor.

**Make.** Add the official Apify module and use the **Run an Actor** action with the same Actor id and input. If a JavaScript-rendered run may exceed Make's synchronous timeout, start the run asynchronously and use the **Watch Actor Runs** trigger, then **Get Dataset Items**.

For a general page fetch or web search, see [Web Fetch](https://apify.com/apify/web-fetch) and [RAG Web Browser](https://apify.com/apify/rag-web-browser) on Apify Store. This Actor turns a page or URL to Markdown and lists common hidden text that could carry instructions; it does not detect or block attacks. Best-effort flags for instruction-like text are not a guarantee.

HiddenStrip: https://hiddenstrip.com

# Actor input Schema

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

Public https:// pages to read, one result per URL. At least one URL is required. Exact duplicates are read once. Without JS mode, pages that need JavaScript to show their content come back as an error item with a render_note and are not charged.

## `renderJs` (type: `boolean`):

Off by default. When on, a page that needs JavaScript is rendered in a headless browser and charged as page-read-js ($0.004) instead of page-read ($0.0015); pages that read fine as static HTML stay at page-read. Failed, blocked-by-robots, timed-out and skipped pages are not charged. Needs the run started at 2048 MB of memory (API: callOptions.memory: 2048; Console: Run options, Memory); other memory sizes refuse to start. Gives each page about 15 seconds in total, stops after 5 failed browser renders in a row (pages not yet attempted are not charged), and allows at most 100 pages per run. Public pages only: it does not get past bot protection, captchas or logins.

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

Upper bound on how many of the listed URLs are read in this run. Extra URLs are returned as 'skipped' items, are not fetched and are not charged.

## `timeoutSecs` (type: `integer`):

Total time budget for reading one page, including robots.txt and policy lookups. In JS mode it is capped at about 15 seconds. Slow pages come back as an error item and are not charged.

## Actor input object example

```json
{
  "urls": [
    "https://example.com/"
  ],
  "renderJs": false,
  "maxPages": 20,
  "timeoutSecs": 25
}
```

# Actor output Schema

## `dataset` (type: `string`):

Default dataset: one item per input URL, in input order. Failed and skipped URLs are included as error or skipped rows and are not charged.

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

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

```

## MCP server setup

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