# Website Text Extractor — Clean Text & Source Fingerprints (`gertner-data/clean-website-text`) Actor

Turn web pages into clean text for AI/RAG, content migration and ETL. Get title, author/date tags, word count and a SHA-256 content fingerprint in one JSON. Batch up to 100 URLs, up to 50,000 text characters per page. Launch price: $0.50/1,000 URL reports.

- **URL**: https://apify.com/gertner-data/clean-website-text.md
- **Developed by:** [Евгений Гертнер](https://apify.com/gertner-data) (community)
- **Stats:** 3 total users, 2 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.50 / 1,000 clean page text reports

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 Text Extractor — Clean Text & Source Fingerprints

Turn web pages into clean text for AI/RAG, content migration and ETL. Get title, author/date tags, word count and a SHA-256 content fingerprint in one JSON. Batch up to 100 URLs, up to 50,000 text characters per page. Launch price: $0.50/1,000 URL reports.

Get readable static page text and a stable SHA-256 fingerprint. Use the text for RAG or the fingerprint to decide whether content needs re-indexing.

### When to use it

- Load explicitly selected public pages into a RAG pipeline.
- Export page text for content migration.
- Compare text fingerprints across recurring runs.

### Start with this input

```json
{
  "urls": [
    "https://example.com",
    "https://www.iana.org/help/example-domains"
  ]
}
```

Click Start, then read the Output table or download JSON/CSV. Single and batch targets are supported. Duplicate targets are removed before network work.

### What you get

Clean text, title, word count, explicit author/dates, text fingerprint, extraction method, HTTP evidence and warnings.

One record per unique processed target, including `observedAt`, `status` and `warnings`. Missing data, unsupported sources, lookup failures, timeouts and invalid input are distinct states. Partial results remain usable. Dataset views show focused fields; the complete JSON record remains available through the dataset API.

```json
{
  "schemaVersion": 1,
  "coreVersion": "0.1.0",
  "product": "clean-website-text",
  "normalizedInput": "http://example.com/",
  "observedAt": "2026-09-18T19:57:04.215Z",
  "status": "success",
  "warnings": [],
  "metadata": {
    "title": {
      "status": "found",
      "value": "Example Domain"
    },
    "description": {
      "status": "not_found"
    },
    "canonical": {
      "status": "not_found"
    },
    "author": {
      "status": "not_found"
    },
    "publishedDate": {
      "status": "not_found"
    },
    "modifiedDate": {
      "status": "not_found"
    },
    "wordCount": {
      "status": "found",
      "value": 19
    },
    "textSha256": "8c1e8564424fdb68b8b7bdff3e16173a2e3599e9b71620637251486c5c4d5ed6"
  }
}
```

### Price and spending control

$0.0005 per URL report ($0.50/1,000), plus $0.0005 per run at the default 256 MB. Platform usage is included. No separate per-page or automatic dataset-item charge.

| Targets | Maximum event price |
| --- | --- |
| 1 | $0.001000 |
| 10 | $0.005500 |
| 100 | $0.050500 |

Valid attempted diagnostics are charged, including HTTP errors, missing fields and DNS/TLS/timeout failures. Invalid input, whole-target private-address rejection and targets not started at the run-time cap receive no result event; a run-start event can still apply. A started inspection reaching a body/request/time cap is a charged diagnostic.

Set Maximum cost per run in Console or `maxTotalChargeUsd` in the API. The runtime reserves affordable targets before lookup and records omitted targets in `METRICS`. `maxItems` adds an independent item cap. Actor-start is per GB of memory with a minimum of one event; larger memory can increase it.

### Call from your workflow

JavaScript:

```js
import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('gertner-data/clean-website-text').call(
  {"urls":["https://example.com","https://www.iana.org/help/example-domains"]}, { maxTotalChargeUsd: 0.001500 }
);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
```

Python:

```python
import os
from apify_client import ApifyClient
client = ApifyClient(os.environ['APIFY_TOKEN'])
run = client.actor('gertner-data/clean-website-text').call(run_input={"urls":["https://example.com","https://www.iana.org/help/example-domains"]}, max_total_charge_usd=0.02)
rows = list(client.dataset(run['defaultDatasetId']).iterate_items())
```

HTTP: POST JSON input to `https://api.apify.com/v2/acts/gertner-data~clean-website-text/runs?maxTotalChargeUsd=0.02` with your bearer token in the Authorization header. Wait for completion and GET `/v2/datasets/{defaultDatasetId}/items`. Use asynchronous runs for larger batches.

For recurring checks, save your own task and attach an Apify schedule. For downstream integrations, consume `defaultDatasetId` after RUN.SUCCEEDED and route each item's structured status.

### API coverage and run settings

Up to 50,000 plain-text characters per selected URL. Main/article elements take priority, with body fallback. Deterministic boilerplate filtering and a SHA-256 fingerprint support repeatable indexing workflows.

Public HTTP(S) on ports 80/443; private/reserved addresses and unsafe redirects are blocked. Processes public static content over HTTP(S). Per-page, aggregate-body, request and total-time limits keep costs bounded; limit codes remain visible. UTF-8 expected. Maximum 100 unique targets per run. Inspect only sources you are authorized to access.

Support: [Evgeny Gertner](https://t.me/evgertner).

# Actor input Schema

## `url` (type: `string`):

Public HTTP(S) URL or domain. Optional when batch input is supplied.

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

Deduplicated before lookup. Domain limit 25; URL limit 100.

## `maxItems` (type: `integer`):

Hard cap on unique targets before network work.

## `concurrency` (type: `integer`):

Maximum parallel target inspections.

## `timeoutSeconds` (type: `integer`):

Timeout for each outbound request; an item also has a total time limit.

## `retries` (type: `integer`):

Bounded retries for transient transport or 429/502/503/504 failures.

## Actor input object example

```json
{
  "urls": [
    "https://example.com",
    "https://www.iana.org/help/example-domains"
  ],
  "maxItems": 100,
  "concurrency": 5,
  "timeoutSeconds": 8,
  "retries": 1
}
```

# Actor output Schema

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

No description

## `metrics` (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",
        "https://www.iana.org/help/example-domains"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("gertner-data/clean-website-text").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",
        "https://www.iana.org/help/example-domains",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("gertner-data/clean-website-text").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",
    "https://www.iana.org/help/example-domains"
  ]
}' |
apify call gertner-data/clean-website-text --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,gertner-data/clean-website-text"
        }
    }
}
```

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/GWrSJtDjcwYRjg1Ed/builds/3m0HcklaqvY1Se5Qc/openapi.json
