# Website HTML Scraper — Public Page Source (`sian.agency/website-html-scraper`) Actor

Retrieve static HTML, final URL, page title, response status and available response headers. One completed request creates one exportable JSON record with the returned data. Ordinary public HTTP(S) HTML pages only.

- **URL**: https://apify.com/sian.agency/website-html-scraper.md
- **Developed by:** [SIÁN OÜ](https://apify.com/sian.agency) (community)
- **Categories:** Developer tools, Business
- **Stats:** 2 total users, 1 monthly users, 88.9% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $62.86 / 1,000 completed html page records

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

## Website HTML Scraper 🌐

[![SIÁN Agency Store](https://img.shields.io/badge/Store-SI%C3%81N%20Agency-1AE392)](https://apify.com/sian.agency?fpr=sian) [![Google Search Scraper](https://img.shields.io/badge/Store-Google%20Search%20Scraper-4285F4)](https://apify.com/sian.agency/google-serp-scraper?fpr=sian) [![Google News Scraper](https://img.shields.io/badge/Store-Google%20News%20Scraper-4285F4)](https://apify.com/sian.agency/google-news-scraper?fpr=sian) [![Bing Search Scraper](https://img.shields.io/badge/Store-Bing%20Search%20Scraper-4285F4)](https://apify.com/sian.agency/bing-search-scraper?fpr=sian)

#### 🌐 One request, one complete record

##### Export the returned information and check the actual result.

### 🔎 What is the Website HTML Scraper — and when should you use it?

The **Website HTML Scraper** turns static HTML, final URL, page title, response status and available response headers into clean, structured rows you can filter, export and feed straight into a spreadsheet, database or AI agent. No account, no portal API key, no browser automation to maintain.

**Use it when you need:** the static HTML from one public page for your own parsing or saved comparison.

**Use something else when:** you need extracted organic search results rather than a page document. Use [Google Search Scraper](https://apify.com/sian.agency/google-serp-scraper?fpr=sian) for extracted organic search results rather than a page document. Ordinary public HTTP(S) HTML pages only. No JavaScript rendering, login, cookies, custom request headers, challenge bypass, proxy settings or automatic retries. HTML is capped at 2 MiB and unsupported responses fail without a page-result charge.

### 🤖 Use with AI agents

Already connected to the [Apify MCP server](https://mcp.apify.com)? Just ask for this Actor by name: sian.agency/website-html-scraper

**Agentic payments:** Availability of [x402](https://www.x402.org/) and [Skyfire](https://www.skyfire.xyz/) depends on this Actor's current Store eligibility. Check the published listing for supported payment methods. One completed response record is charged. Failed retrievals have no result-event charge; a separate run-start fee applies.

Otherwise copy this prompt into Claude, ChatGPT, Cursor or any MCP-enabled assistant:

```text
I want Website HTML research using the Apify Actor `sian.agency/website-html-scraper`.

Use it when I need: the static HTML from one public page for your own parsing or saved comparison.

Don't use it when: you need extracted organic search results rather than a page document — use google-serp-scraper instead.

How to call it: set operation to fetch and provide url. Read the full completed record.

Start with this input:
{
  "operation": "fetch",
  "url": "https://example.com/"
}

Ask me which public page URL I want to retrieve, then run the Actor and summarise the results as a table.
```

**Things you can ask your agent for:**

- *Fetch https://example.com/ and save the returned HTML as JSON.*
- *Show the final URL, available title and HTML byte length of a public page.*
- *Keep a dated HTML observation for my own comparison.*

Machine-readable API, MCP config and OpenAPI definition for this Actor are published at [apify.com/sian.agency/website-html-scraper.md](https://apify.com/sian.agency/website-html-scraper.md).

### 📋 Overview

Website HTML Scraper saves one ordinary public page as an HTML record in your Apify dataset. Use the html field when you want the markup for your own parser or a saved page comparison. Check finalUrl and httpStatus before using it.

The page must work without JavaScript, login or cookies. Each successful run returns one document within the 2 MiB limit. Retrieval failures have no completed-page charge; a run-start fee still applies.

***

### ✨ Features

- 🌐 **Complete record**: One successful request creates one exportable observation.
- 🌐 **Static HTML**: Retain the returned HTML document with its final URL and response status.
- 🌐 **Focused scope**: Ordinary public HTTP(S) HTML pages only.
- 🌐 **JSON export**: Preserve nested fields and arrays without flattening away information.
- 🌐 **Run report**: Review results, billing and retry advice in the Output tab.
- 🌐 **Input validation**: Unsupported fields and invalid inputs stop before retrieval.
- 🌐 **Scheduled observations**: Use Apify scheduling to build your own saved history.

***

### 🎬 Quick Start

Choose fetch, supply the url and run the actor. Open the dataset when the request finishes. The Console example is a prefill; API callers supply their own work input.

```bash
curl -X POST 'https://api.apify.com/v2/acts/sian.agency~website-html-scraper/runs?token=YOUR_TOKEN' \
-H 'Content-Type: application/json' -d '{"operation": "fetch", "url": "https://example.com/"}'
```

### 🚀 Getting Started

#### Step 1: Enter the subject

Provide a specific url to retrieve.

#### Step 2: Run the actor

Review the live price and start one request.

#### Step 3: Inspect the result

Download JSON to preserve the complete nested record. Check status and any source values before using the data.

***

### 📥 Input Configuration

| Field | Type | Required | Description |
|---|---|---|---|
| operation | select | No | fetch |
| url | string | Yes at runtime | Subject of this request; no API default |

```json
{
  "operation": "fetch",
  "url": "https://example.com/"
}
```

Ordinary public HTTP(S) HTML pages only. No JavaScript rendering, login, cookies, custom request headers, challenge bypass, proxy settings or automatic retries. HTML is capped at2MB and unsupported responses fail without a page-result charge.

***

### 📤 Output

| Field | Type | Description |
|---|---|---|
| url | string | Requested URL |
| finalUrl | string | Final URL |
| pageTitle | string or null | Page title |
| httpStatus | integer | HTTP status |
| html | string | HTML source |
| bodyLength | integer | Body bytes |
| responseHeaders | object | Response headers |
| complete | boolean | Whether retrieval completed |
| \_fetchedAt | string | Observation time |
| processedAt | string | UTC ISO observation timestamp |
| scrapingDate | string | Same UTC ISO timestamp as processedAt |
| status | string | success or error |

```json
{
  "status": "success",
  "complete": true,
  "url": "https://example.com/",
  "finalUrl": "https://example.com/",
  "httpStatus": 200,
  "bodyLength": 577,
  "html": "<!doctype html><html lang=en><head><meta charset=utf-8><link rel=icon href=data:,><meta name=viewport content=\"width=device-width,initial-scale=1\"><title>Example Domain</title><style>html{color-scheme:light dark;background:light-dark(#eee,#222)}body{font:16px/1.6 system-ui,sans-serif;max-width:26em;margin:auto;padding:25vh 2em 2em;text-align:center}</style></head><body><p>This domain is for use in documentation examples without needing permission. This is not a service; avoid relying on it for testing and monitoring purposes.</p><script src=/s.js></script></body></html>\n"
}
```

The example shows a recorded response. Optional values can be absent, and results can change between runs.

***

### 💼 Use Cases & Examples

#### 1. Web developers

Fetch a public page after a deployment and inspect the html field for the expected server-delivered markup. If content appears only after JavaScript runs in a browser, this actor will not render it.

#### 2. SEO analysts

Inspect the returned HTML for title or canonical tags with your own parser, then keep the finalUrl beside the observation. The actor returns the document; it does not calculate SEO scores or extract a complete metadata inventory.

#### 3. Content researchers

Save the HTML for one public article page so you can examine its markup and extract the sections relevant to your research. Check that the text is present in the returned document before relying on it.

#### 4. Quality analysts

Compare httpStatus, finalUrl and bodyLength with your expected public page response. A titleless page can still succeed and has pageTitle: null; non-HTML and unsuccessful responses are reported as failures.

#### 5. Archiving teams

Keep a dated copy of a small public HTML page in an Apify dataset. This preserves the returned markup within the 2 MiB limit; it does not archive images, scripts, stylesheets or linked pages.

#### 6. Automation teams

Pass a public URL from a Make, Zapier or N8N workflow and send the completed HTML record to your own parser or storage. Route a retrieval failure for review; the actor does not retry it or change rendering settings.

***

### 🔗 Integration Examples

#### JavaScript

```javascript
import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: 'YOUR_TOKEN' });
const run = await client.actor('sian.agency/website-html-scraper').call({"operation": "fetch", "url": "https://example.com/"});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

#### Python

```python
from apify_client import ApifyClient
client = ApifyClient('YOUR_TOKEN')
run = client.actor('sian.agency/website-html-scraper').call(run_input={'operation': 'fetch', 'url': 'https://example.com/'})
for item in client.dataset(run['defaultDatasetId']).iterate_items():
    print(item)
```

#### cURL

```bash
curl -X POST 'https://api.apify.com/v2/acts/sian.agency~website-html-scraper/run-sync-get-dataset-items?token=YOUR_TOKEN' \
-H 'Content-Type: application/json' -d '{"operation": "fetch", "url": "https://example.com/"}'
```

#### Automation Workflows (N8N / Zapier / Make)

1. Start from a schedule or webhook.
2. Run the actor with the intended url.
3. Check the record's status and content.
4. Save the result or pass it to your next workflow step.

***

### 📊 Performance & Pricing

One completed response record is charged once. Failed retrievals have no result-event charge. A separate platform run-start fee applies, including invalid or stopped runs.

Non-HTML responses, access-verification pages and documents over the 2MB limit are unsupported. They have no page-result charge.

Paid Apify plans receive tier discounts. Free-plan users can test one record per run in the Console or MCP; direct API access requires a paying plan. [Check the live price](https://apify.com/sian.agency/website-html-scraper?fpr=sian) before starting.

***

### ❓ Frequently Asked Questions

**Q: What is charged?**

One completed request record. Failed retrievals have no result-event charge. The separate platform run-start fee applies.

**Q: What is supported?**

Ordinary public HTTP(S) HTML pages only. No JavaScript rendering, login, cookies, custom request headers, challenge bypass, proxy settings or automatic retries. HTML is capped at2MB and unsupported responses fail without a page-result charge.

**Q: Can I use the actor through the API?**

Yes, using a paying Apify plan. Free-plan users can test from the Console or MCP.

**Q: Does an empty API input run the example?**

No. The work input has a Console prefill and no API default.

**Q: Which export keeps full detail?**

JSON preserves nested data. CSV and Excel encode nested structures as text.

***

### 🐛 Troubleshooting

**Request did not complete**

- Check the input, then retry later. A failed retrieval has no result-event charge.

**Request stopped before retrieval**

- Check your maximum charge, available credits and free-run allowance.

**A returned field is missing**

- Optional fields depend on the response. Do not infer a value that was not returned.

**Data differs between runs**

- Keep the observation time and compare the actual returned records. Results may change.

***

### ⚖️ Is it legal to scrape data?

Use public information for a lawful purpose and respect applicable rights and source terms. Public availability does not itself grant a redistribution license. This actor does not grant permission to reuse third-party content.

Results may contain personal data. Establish an appropriate legal basis under GDPR or other applicable rules before processing it. Read [Apify's overview of web scraping legality](https://blog.apify.com/is-web-scraping-legal/) and obtain advice for your use case when needed.

Website HTML names belong to their respective owners. SIÁN Agency is independent and is not affiliated with or endorsed by those owners.

***

### 🤝 Support

Open an [actor issue](https://apify.com/sian.agency/website-html-scraper/issues) with the run link and input. Send questions to <apify@sian-agency.online>.

**Built by [SIÁN Agency](https://www.sian-agency.online)** | **[More tools](https://apify.com/sian.agency?fpr=sian)**

# Changelog

This Actor's version history is a separate document: https://apify.com/sian.agency/website-html-scraper/changelog.md

# Actor input Schema

## `operation` (type: `string`):

One documented request per run. A complete response is billed once. Failed retrievals have no result-event charge; the platform run-start fee still applies.

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

Provide the subject of this request. The Console example is prefilled; API calls must supply their own value. Ordinary public HTTP(S) HTML pages only. No JavaScript rendering, login, cookies, custom request headers, challenge bypass, proxy settings or automatic retries. HTML is capped at 2 MiB and unsupported responses fail without a page-result charge.

## Actor input object example

```json
{
  "operation": "fetch",
  "url": "https://example.com/"
}
```

# Actor output Schema

## `websiteHtmlCompletedRecords` (type: `string`):

One completed record with static HTML, final URL, page title, response status and available response headers. Ordinary public HTTP(S) HTML pages only. No JavaScript rendering, login, cookies, custom request headers, challenge bypass, proxy settings or automatic retries. HTML is capped at2MB and unsupported responses fail without a page-result charge.

## `scrapingSummary` (type: `string`):

HTML summary showing successful and failed results with key metrics

# 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 = {
    "operation": "fetch",
    "url": "https://example.com/"
};

// Run the Actor and wait for it to finish
const run = await client.actor("sian.agency/website-html-scraper").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 = {
    "operation": "fetch",
    "url": "https://example.com/",
}

# Run the Actor and wait for it to finish
run = client.actor("sian.agency/website-html-scraper").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 '{
  "operation": "fetch",
  "url": "https://example.com/"
}' |
apify call sian.agency/website-html-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,sian.agency/website-html-scraper"
        }
    }
}
```

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/aMA5Q9gjvDTl4BaMR/builds/I39rOpfEzagcn4bu6/openapi.json
