# Webpage to JSON — Text, Tables, Links & JSON-LD (`flyerlin/webpage-clean-json`) Actor

Extract clean text, headings, tables, links and JSON-LD from public HTML pages. Optional CSS selector and content hash. Fast static extraction with no browser or AI API.

- **URL**: https://apify.com/flyerlin/webpage-clean-json.md
- **Developed by:** [林 吴](https://apify.com/flyerlin) (community)
- **Categories:** Developer tools, SEO tools
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.70 / 1,000 extracted pages

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

## Webpage to JSON — Text, Tables, Links & JSON-LD

Extract clean text, headings, tables, links and JSON-LD from public pages as structured JSON.

### Use it when

- Feed clean page content into RAG, search or summarization pipelines.
- Pull tables and lists into structured records.
- Track content hashes to detect page revisions.
- Extract SEO metadata and structured data for audits.

**Input → output:** Page URLs → structured content records.

Works with Apify Schedules, webhooks/API and the Apify MCP server (Claude, Cursor and other MCP clients).

### Pricing

$1 per 1,000 successful pages ($0.001 each). Failed requests do not trigger the custom event. Pricing shown in the Store is authoritative.

### Output

Results are in the default dataset. SUMMARY in the default key-value store contains statistics.

### Usage

Provide `urls` and optionally a content CSS `selector`. Each result includes title, description, clean text, headings, tables, links, JSON-LD and content hash. No external AI model is used.

### Limits

Static HTML only: JavaScript rendering, login, CAPTCHA bypass, recursive crawling and AI extraction are not supported. Maximum 100 URLs, 5 MB per page and 35-second network timeout. Errors are reported in SUMMARY.

### Platform costs

The event price is all-inclusive: platform compute, storage and transfer usage is covered by the developer, and no separate custom startup or dataset insertion event is configured. Apify paid plans receive volume discounts — Bronze 10%, Silver 20%, Gold and above 30%.

### Cost example

At the current configured rate, 100 successful pages cost $0.1 in custom events. The event fee already covers platform usage. This is not a quote; Store pricing is authoritative.

### Synthetic output example

Illustrative example only, not customer data or a claim about a live source. Fields may be omitted from this fragment; inspect your dataset for the full record.

```json
{
  "url": "https://example.com",
  "title": "Example page",
  "text": "Example content",
  "headings": [
    "Example heading"
  ],
  "links": [],
  "tables": [],
  "structured_data": []
}
```

### FAQ

**Does it render JavaScript?**
No. It extracts static HTML only; JavaScript rendering and authenticated pages are not supported.

**What fields are returned?**
Title, description, clean text, headings, tables, links, JSON-LD and a content hash.

**Can I focus on one content block?**
Yes, with an optional CSS selector. Recursive crawling is not supported.

**What are the limits?**
Up to 100 URLs, 5 MB per page and a 35-second network timeout. Errors are reported in SUMMARY.

**How much does it cost?**
$0.001 per successfully extracted page, which is $1 per 1,000 pages.

### Related Actors

- [Website Change Monitor — Page Diffs & Change Alerts](https://apify.com/flyerlin/website-change-monitor)
- [Data Cleaner — Dedupe, Map & Validate JSON / CSV](https://apify.com/flyerlin/advanced-data-cleaner)
- [PDF Citation Validator — Verify RAG Page References](https://apify.com/flyerlin/pdf-citation-validator-paid)
- [All Actors by flyerlin](https://apify.com/flyerlin)

# Actor input Schema

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

Public HTTP(S) page URLs, one per line (max 100), e.g. https://example.com/pricing. Static HTML only — no JavaScript rendering.

## `selector` (type: `string`):

Optional CSS selector to limit extraction, e.g. main or article. Defaults to main, article or body.

## Actor input object example

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

# Actor output Schema

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

Successful output records.

## `summary` (type: `string`):

Run statistics and errors.

# 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("flyerlin/webpage-clean-json").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("flyerlin/webpage-clean-json").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 flyerlin/webpage-clean-json --silent --output-dataset

```

## MCP server setup

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

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/kIHmVj6hBemHL7mJa/builds/HYdcHkSeMGifvx76q/openapi.json
