# Article Outline Structure Extractor (`junipr/article-outline-structure-extractor`) Actor

Extract article outlines from public pages including headings, intro patterns, media sections, tables, lists, CTAs, FAQs, and schema-backed article...

- **URL**: https://apify.com/junipr/article-outline-structure-extractor.md
- **Developed by:** [junipr](https://apify.com/junipr) (community)
- **Categories:** SEO tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $6.50 / 1,000 content page scanneds

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

## Article Outline Structure Extractor

Turn public article pages into ordered, source-linked outlines. The Actor extracts article metadata, H1–H6 hierarchy, section order, media counts, table and list counts, FAQ signals, visible text length, and explicit structural findings.

Use it for content research, editorial inventories, migration planning, heading-hierarchy audits, and structured content briefs. The output describes what is present in the supplied page; it does not generate new headings or pretend that every article should follow the same structure.

### What the Actor observes

- an `<article>` region when present, otherwise the accepted page HTML;
- visible H1 through H6 headings in source order;
- heading-level jumps, such as H2 directly to H4;
- absence of a visible H1;
- visible article text length compared with your configured minimum;
- images, video, audio, and iframe elements;
- tables, ordered lists, and unordered lists;
- visible details/FAQ markers;
- `Article`, `BlogPosting`, and `NewsArticle` JSON-LD metadata;
- visible author and publication date as a fallback when structured metadata is absent.

Empty pages, access-denied responses, human-verification pages, and pages without visible headings return diagnostic rows. Missing metadata remains null rather than being inferred.

### Input

Supply public URLs in `articleUrls`, additional URLs in `startUrls`, bounded XML sitemaps in `sitemapUrls`, or captured records in `htmlInputs`.

| Field | Purpose | Default / cap |
| --- | --- | --- |
| `articleUrls` | Public article URLs | empty |
| `startUrls` | Additional public article URLs | empty |
| `sitemapUrls` | Public XML sitemaps | empty |
| `htmlInputs` | Captured records with `sourceUrl` and HTML | empty |
| `includeHeadingHierarchy` | Emit one row per ordered heading | `true` |
| `includeMediaInventory` | Count images, video, audio, and iframes | `true` |
| `includeTablesLists` | Count tables and lists | `true` |
| `minimumArticleTextLength` | Flag visible text below this character count | 200; range 0–100,000 |
| `maxSectionsPerPage` | Maximum emitted heading rows per page | 50, maximum 250 |
| `maxPages` | Maximum fetched pages | 1 by default, maximum 25 |
| `allowedDomains` | Optional hostname allowlist | empty |
| `includeEvidence` | Keep evidence excerpts in rows | `true` |
| `includeRawSnapshots` | Store accepted raw page HTML | `false` |
| `maxChargeUsd` | Stop before the next event exceeds this amount | 15 USD maximum |

Example:

```json
{
  "articleUrls": [
    "https://publisher.example/guides/reliable-queues",
    "https://publisher.example/guides/idempotent-jobs"
  ],
  "includeHeadingHierarchy": true,
  "includeMediaInventory": true,
  "includeTablesLists": true,
  "minimumArticleTextLength": 800,
  "maxSectionsPerPage": 60,
  "maxPages": 2,
  "allowedDomains": ["publisher.example"],
  "maxChargeUsd": 3
}
```

Set `includeHeadingHierarchy` to `false` when you want a single summary row per accepted article. Set the minimum text length to `0` to disable that finding. The Store default supplies no article and returns a nonempty `source_required` diagnostic.

### Dataset output

Each row contains common provenance and outline fields:

- `articleUrl` identifies the accepted article;
- `headline`, `authorName`, `publishedDate`, and `updatedDate` preserve observed metadata;
- `headingLevel`, `headingText`, and `sectionOrder` describe the emitted outline section;
- `mediaCount`, `tableCount`, and `faqCount` summarize structural elements;
- `outlineJson` contains the complete ordered heading array, counts, visible text length, and every structural issue for the page;
- `issueCode` distinguishes a normal outline section from a structural finding or source diagnostic;
- `evidenceSnippet`, `recommendation`, `canonicalUrl`, `httpStatus`, and `scannedAt` support auditing.

`headingLevel` and `sectionOrder` are integers for ordinary outline rows and null for source diagnostics. Counts become null when their extraction toggle is off. The full `outlineJson` remains attached to each section row so downstream exports do not have to join against another store.

### Understanding findings

The first emitted section carries page-wide findings such as minimum text length or missing H1. A heading-level jump is also associated with the relevant heading row. These signals are mechanical checks, not editorial verdicts: a heading choice may be appropriate for a specific publishing system or accessibility pattern.

Blocked sources and pages without visible headings do not yield fabricated outlines. Their diagnostic rows use null metadata and an `outlineJson.issues` array describing the reason.

### Reports

When `includeReport` is enabled, key-value storage receives a Markdown summary, a full CSV, issue rows in JSON, bounded evidence excerpts, and run metadata. Raw HTML snapshots are written only when explicitly enabled.

### Pay-per-event pricing

| Event | Price (USD) | When charged |
| --- | ---: | --- |
| `actor-start` | 0.0100 | after successful startup |
| `content-page-scanned` | 0.0065 | once for each accepted content source unit |
| `outline-section-extracted` | 0.00295 | before each paid outline section row |
| `structure-finding-emitted` | 0.00295 | before each paid structural finding or diagnostic row |
| `audit-report-generated` | 0.0800 | before report artifacts are stored |

Apify platform usage pass-through is off. `maxChargeUsd` is evaluated before every event. A partial, rejected, or over-budget charge stops the run before the related dataset or report write.

### Safety and responsible interpretation

Only public HTTP and HTTPS pages are fetched. Loopback and private IPv4 targets are rejected, optional domain allowlists narrow the accepted hosts, and page counts and timeouts remain bounded. Discovered links are not crawled. The Actor does not bypass authentication, paywalls, or human-verification controls.

HTML parsing cannot see text that was never present in the accepted response. For JavaScript-rendered publishers, provide captured HTML from an authorized workflow. Review extracted metadata, accessibility implications, and editorial context before changing live headings or content architecture.

# Actor input Schema

## `articleUrls` (type: `array`):

Public article URLs whose visible structure should be extracted.

## `startUrls` (type: `array`):

Optional public article URLs; articleUrls is preferred for role clarity.

## `sitemapUrls` (type: `array`):

Optional public XML sitemap URLs. Accepted pages remain bounded by maxPages.

## `htmlInputs` (type: `array`):

Optional records with sourceUrl and html or currentHtml for deterministic extraction.

## `includeHeadingHierarchy` (type: `boolean`):

Include ordered heading hierarchy details in output rows.

## `includeMediaInventory` (type: `boolean`):

Include visible image, video, and embed inventory details.

## `includeTablesLists` (type: `boolean`):

Include table and list structure details when present.

## `minimumArticleTextLength` (type: `integer`):

Flag accepted pages whose visible article text is shorter than this many characters.

## `maxSectionsPerPage` (type: `integer`):

Maximum page sections to inspect per source page.

## `allowedDomains` (type: `array`):

Optional hostname allowlist for fetched pages.

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

Maximum pages to fetch in one run.

## `maxDepth` (type: `integer`):

General link discovery is disabled.

## `includeEvidence` (type: `boolean`):

Include short source evidence snippets in output rows.

## `includeRawSnapshots` (type: `boolean`):

Opt in to raw HTML artifacts in key-value storage.

## `requestDelayMs` (type: `integer`):

Delay in milliseconds between outbound page requests.

## `timeoutMs` (type: `integer`):

Maximum time in milliseconds to wait for a page request.

## `userAgentMode` (type: `string`):

User agent profile to use for public page requests.

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

Maximum estimated PPE spend before the actor exits gracefully.

## `includeReport` (type: `boolean`):

Write the markdown summary report to the run key-value store.

## Actor input object example

```json
{
  "articleUrls": [],
  "startUrls": [],
  "sitemapUrls": [],
  "htmlInputs": [],
  "includeHeadingHierarchy": true,
  "includeMediaInventory": true,
  "includeTablesLists": true,
  "minimumArticleTextLength": 200,
  "maxSectionsPerPage": 50,
  "allowedDomains": [],
  "maxPages": 1,
  "maxDepth": 0,
  "includeEvidence": true,
  "includeRawSnapshots": false,
  "requestDelayMs": 250,
  "timeoutMs": 15000,
  "userAgentMode": "standard",
  "maxChargeUsd": 15,
  "includeReport": true
}
```

# Actor output Schema

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

No description

## `report` (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("junipr/article-outline-structure-extractor").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("junipr/article-outline-structure-extractor").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 junipr/article-outline-structure-extractor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,junipr/article-outline-structure-extractor"
        }
    }
}

```

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/qjt2YiK7q8COIFLhA/builds/rmXwzSegXp22ichhB/openapi.json
