# Rendered HTML Table Rows (`sapph1re/rendered-html-table-rows`) Actor

Extract rows from rendered HTML tables on public pages. Preserve multi-row headers, merged cells, links and source coordinates. Select a table by CSS selector or index, with explicit limits and per-page outcomes. No login, scrolling or pagination.

- **URL**: https://apify.com/sapph1re/rendered-html-table-rows.md
- **Developed by:** [Roman V](https://apify.com/sapph1re) (community)
- **Categories:**
- **Stats:** 3 total users, 2 monthly users, 75.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 table rows

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?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Rendered HTML Table Rows

Export the table you can see after a public page renders. Supply up to five page URLs and a CSS selector or table index. Each dataset item is one observed data row, with merged cells expanded, header paths preserved, and links and cell origins attached.

This is a bounded snapshot. It does not scroll, paginate, log in, solve challenges, or establish that every row in a remote application has loaded.

### Start with one table

```json
{
  "pageUrls": ["https://www.w3schools.com/html/html_tables.asp"],
  "tableSelector": "#customers",
  "maxRows": 10,
  "maxChargeUsd": 0.01
}
```

For this ten-row example, set the separate platform maximum charge to **$0.06**: the $0.05 start plus up to ten $0.001 rows. That option is a run control, not an extra Actor input property. Use 2048 MiB, a 210-second platform timeout and restart off.

Missing API input and `{}` use that public demonstration page, the `#customers` table, and a 100-row maximum. Set the platform maximum charge to **$0.15** to fund all100 default rows plus the start. An explicitly empty URL list is invalid. When supplying your own URLs, select a table or leave `tableSelector` empty to use `tableIndex` (zero-based). Supplying URLs without a selector uses index 0. A nonempty selector and a nonzero index conflict and fail before navigation.

The page loads once. The Actor waits up to `waitForTableMs` for the selected visible table, then waits `settleMs` once before taking the snapshot. Increase those bounded delays for tables that load slowly. There is no claim that a quiet table has finished loading.

### Read the result

The package includes `sample_row.json`, generated from an original synthetic table with a reserved example hostname.

`values` maps deterministic column keys to strings or `null`. Blank source cells remain `""`; absent grid slots are `null`. Numbers and dates stay source text. Unicode is preserved and visible whitespace is collapsed. Header paths combine leading header rows, including multi-row `thead` sections. Empty names become `column_1`, etc.; duplicate keys receive deterministic numeric suffixes.

`cells` contains each logical column's text, visible links, header path and origin. Origin coordinates are zero-based: source row in the selected table, source cell within that row, and expanded grid column. A repeated span value retains the same origin, declared spans and effective row-group span. `isSpanCopy` identifies repeated values. `rowspan="0"` extends only to the end of its row group. Overlapping spans fail explicitly rather than shifting values.

Hidden rows do not become dataset items. Hidden cells retain their grid position with empty text. Nested table rows are not separate rows of the outer table; their visible text can appear inside the containing cell. Footer rows remain data rows. This extractor reads HTML `table` elements, not arbitrary ARIA or CSS grids.

Links include their source `href`, visible text and resolved HTTP(S) URL. Non-web or credential-bearing links have a `null` resolved URL. An overlong link is flagged and never resolved from a truncated prefix. Links are evidence only and are not followed.

`record_id` hashes the normalized input URL, table index and source row coordinate. It remains stable for the same position, but it is not an entity identifier when a source reorders rows. `retrieved_at`, `final_url`, and `coverage: "OBSERVED_DOM_ONLY"` retain source context.

### Outcomes and delivery

The default dataset contains useful row records. The `OUTPUT` key-value record contains per-page outcomes, resource counters and a separate delivery receipt. A missing table with zero wait reports `TABLE_MISSING`; expiry with a positive wait reports `TABLE_TIMEOUT`. Empty tables, HTTP failures, unsupported sources and capped partial tables remain distinguishable. A bad page does not discard rows from healthy pages.

Run states are `COMPLETE`, `PARTIAL`, `CAPPED`, `SOURCE_FAILED`, `INVALID_INPUT`, `DELIVERY_INCOMPLETE` or `RUNTIME_FAILED`. `COMPLETE` means the bounded observation and delivery finished, not that the source application's full dataset was discovered. Common page warnings include `ROW_LIMIT`, `REQUEST_LIMIT`, `DOM_BYTE_LIMIT`, `DOM_NODE_LIMIT`, `NETWORK_BYTE_LIMIT`, `OUTPUT_BYTE_LIMIT` and field truncation limits.

A dataset append is attempted once. An uncertain response is recorded as unknown and fails the run; it is never silently retried. Confirmed delivery survives later bookkeeping errors. Completed same-storage restarts restore the row receipt without fetching or appending again. Incomplete restarts fail without replay. These replay paths have local regression evidence, not a hosted recovery guarantee. A new platform start can still incur the automatic start fee; restoring an old row receipt does not make the current start free. Keep restart off. Start a new run only after inspecting the original dataset when delivery is unknown.

### Billing contract

The required billing configuration has two automatic events and no other positive event: `apify-actor-start` at **$0.025 per allocated GB unit**, and `apify-default-dataset-item` at **$0.001 per delivered row**. The fixed 2048 MiB allocation corresponds to two start units, totaling **$0.05 per run**. The platform charges the start automatically; the Actor never charges it manually.

When a run actually starts, the start fee can apply even if the page has no table, the source fails, runtime input validation fails, the local row budget is zero, or a later execution restores a saved row receipt. A platform input-schema rejection before any run exists is different and does not establish a start event. The fee pays for starting the bounded work, not for a promised result. No row is charged unless it is delivered to the default dataset. A six-row result therefore has a configured fee of $0.056, not $0.006. Actual platform receipts determine charged amounts; these examples are not statements that an owner test or unpriced run paid that fee.

`maxChargeUsd` remains a **row-selection budget**. It floors to whole candidate rows; below $0.001, no page is visited. It excludes the start fee. Do not put the overall run limit into this field. The separate platform maximum needs $0.05 plus the intended row budget, and can limit actual delivery below the selected row count. Use at least $0.051 for the separate platform maximum; setting a local row budget of zero is not a promise of a zero-cost platform run.

| Example input file | Local row budget | Separate platform maximum |
| --- | ---: | ---: |
| `examples/defaults.json` or `{}` | $0.10 /100 rows | $0.15 |
| `examples/selector.json` | $0.01 /10 rows | $0.06 |
| `examples/index.json` | $0.01 /10 rows | $0.06 |
| `examples/zero-cap.json` | $0 /0 rows, no navigation | $0.051 minimum; start may still cost $0.05 |

`billing.chargedItems` counts only dataset-row events. On replay it remains the saved row receipt. `startBilling` describes the current execution separately: its expected tariff and units are configuration facts, while `actualChargedUnits` and `actualChargeUsd` remain `null` because this Actor does not independently observe the platform's start-charge receipt. `PPE_VALIDATED` confirms the exact configured prices, not a charge; `UNPRICED` or `NOT_CHECKED` is not a paid receipt. Owner-accounted zero events are QA, not customer revenue. Platform compute, transfer, storage and later inspection are separate economic liabilities; this local budget is not a lifetime cost bound.

### Hard limits

| Boundary | Default | Maximum |
| --- | ---: | ---: |
| URLs | 1 example | 5 supplied |
| Rows across pages | 100 | 1,000 |
| Columns | 64 | 64 |
| Table appearance wait | 1,500 ms | 5,000 ms |
| Extra settle delay | 300 ms | 2,000 ms |
| Page work | 15 seconds | 20 seconds, plus bounded cleanup |
| Source collection | 120 seconds | 120 seconds |
| Whole workflow | 180 seconds | plus up to 4 seconds for timeout receipts |
| Admitted HTTP requests/page | 40 | 80, including redirects |
| Main-frame navigations/page | 6 | 6 |
| Relayed socket bytes/page | 4 MiB | 8 MiB |
| Observed DOM bytes/page | 512 KiB | 2 MiB |
| Observed DOM nodes/page | 10,000 | 20,000 |
| Cell text | 4,096 characters | 4,096 |
| Links/cell | 16 | 16 |
| Serialized output | 8 MiB | 8 MiB and one SDK append chunk |
| Browser process-tree RSS | 1 GiB | sampled every 50 ms |

DOM bytes count node names, text and attributes, not a serialized HTML document. Socket bytes include both directions and TLS ciphertext; rejected over-limit chunks are not relayed. Browser memory can briefly overshoot between samples. Use the required 2 GiB hosted container and a 210-second platform timeout for an additional process boundary.

Each page gets fresh cookies and storage. The browser receives no Actor token or stored profile. Public-IP checks apply to every upstream connection, including redirects and subresources, and resolved addresses are pinned to the socket. Only standard HTTP/HTTPS ports and GET requests are supported. Images, fonts, media, downloads, service workers, frames, popups, worker targets and WebSockets are blocked. A context-wide request gate is installed before page creation to intercept a popup's first request; late window closing alone is not the exclusion mechanism. Restrictions can prevent a page's table from rendering; the Actor does not bypass them. Browser-supported gzip, deflate and HTTPS Brotli are accepted; damaged encodings fail as source navigation errors.

Per-page `childRequestGateAttempts` and `childRequestGateCounts` record child-target requests intercepted before attempting an abort, using only method/type labels. These attempts also count in `requestAttempts` and `blockedRequests`. `childRequestAbortsConfirmed` counts browser acknowledgments of aborts, not a remote server observation. A gate count is not a count of created windows: workers or frames can also reach it, while other restrictions can prevent them earlier. No child URLs, headers or credentials are logged in these counters.

Known login and challenge markers and declared virtual row counts are rejected. Such detection is incomplete: all other results still carry observed-DOM-only coverage. Use only public pages you are authorized to access.

# Actor input Schema

## `pageUrls` (type: `array`):

One to five authorized public HTTP(S) URLs. Duplicates collapse before browser work. Empty lists fail.

## `tableSelector` (type: `string`):

Optional CSS selector for one table. Omit or use an empty string to select by zero-based index. #customers selects the default example.

## `tableIndex` (type: `integer`):

Zero-based table index in document order, used when selector is empty.

## `maxRows` (type: `integer`):

Maximum delivered row candidates across all supplied pages. Partial tables are marked.

## `maxChargeUsd` (type: `number`):

Row-selection budget only: $0.001 per row, floored to whole rows. Excludes the $0.05 automatic start at required 2048 MiB, including zero-row or invalid runs. Set the separate platform maximum to start plus intended rows: $0.15 for the full default 100. Use at least $0.051 for the separate platform maximum. Not a total infrastructure or storage bound.

## `waitForTableMs` (type: `integer`):

Wait after document load for the selected table to appear. Zero gives immediate TABLE\_MISSING; positive expiry gives TABLE\_TIMEOUT.

## `settleMs` (type: `integer`):

One additional observation delay after the selected table appears. Rows loaded later are not guaranteed.

## `pageTimeoutSecs` (type: `integer`):

Wall-clock ceiling per page including browser startup and observation; cleanup may use up to four more seconds.

## `maxRequestsPerPage` (type: `integer`):

Maximum admitted HTTP requests, including every redirect and allowed subresource. Blocked attempts are counted separately.

## `maxDomBytes` (type: `integer`):

Maximum UTF-8 DOM text, node names and attribute values examined before extracting. Not serialized HTML size.

## `maxDomNodes` (type: `integer`):

Maximum observed DOM nodes before extracting.

## `maxNetworkBytesPerPage` (type: `integer`):

Maximum upstream socket bytes relayed in both directions per page, including encrypted TLS traffic where used.

## Actor input object example

```json
{
  "pageUrls": [
    "https://www.w3schools.com/html/html_tables.asp"
  ],
  "tableSelector": "#customers",
  "tableIndex": 0,
  "maxRows": 100,
  "maxChargeUsd": 0.1,
  "waitForTableMs": 1500,
  "settleMs": 300,
  "pageTimeoutSecs": 15,
  "maxRequestsPerPage": 40,
  "maxDomBytes": 524288,
  "maxDomNodes": 10000,
  "maxNetworkBytesPerPage": 4194304
}
```

# Actor output Schema

## `rows` (type: `string`):

No description

## `outcomes` (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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("sapph1re/rendered-html-table-rows").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 = {}

# Run the Actor and wait for it to finish
run = client.actor("sapph1re/rendered-html-table-rows").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 '{}' |
apify call sapph1re/rendered-html-table-rows --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,sapph1re/rendered-html-table-rows"
        }
    }
}

```

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/IgrrpGY9MbFIjCJUf/builds/5nUB3Ggyvzw6SANHI/openapi.json
