# Content Brief Source Collector (`junipr/content-brief-source-collector`) Actor

Collect source evidence for a content brief from target query SERPs and supplied URLs, extracting titles, headings, questions, stats-like claims, sources, and content-format signals.

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

## Pricing

from $11.50 / 1,000 source page processeds

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

## Content Brief Source Collector

Collect traceable evidence for content briefs from supplied source pages and structured search-result records. The Actor extracts page titles, heading patterns, visible questions, content-format signals, numeric claim candidates, and bounded source context. Every result preserves its source URL so writers and editors can verify evidence before using it.

Use it for research bundles, brief preparation, writer handoffs, competitor-source inventories, and question or heading analysis. The Actor identifies candidate evidence; it does not judge source authority, create unsupported facts, or turn a number into a verified claim automatically.

### What the Actor extracts

- the accepted source title and target query;
- visible H1–H6 headings in source order;
- headings, summaries, or definition terms ending in a question mark;
- tables, lists, images or figures, video or embeds, and FAQ markup;
- numeric sentences from visible paragraphs, list items, and blockquotes;
- surrounding source context and a transparent evidence-priority score.

`claimExtractionMode` controls numeric candidate selection. `off` returns a source-level evidence record without a numeric claim. `standard` requires both a number and research-oriented wording. `aggressive` keeps any visible paragraph, list item, or blockquote containing a number. None of these modes verifies that the text is accurate.

### Input

| Field | Purpose | Default / cap |
| --- | --- | --- |
| `targetQueries` | Brief topics associated with accepted sources | one bounded default query |
| `sourceUrls` | Source pages to retrieve | empty |
| `serpResults` | Structured query/result records with URL, title, snippet, text, or HTML | empty |
| `maxSources` | Maximum sources processed | 10 default, 25 maximum |
| `maxEvidenceRecords` | Maximum numeric candidates per source | 25 default, 100 maximum |
| `claimExtractionMode` | `off`, `standard`, or `aggressive` | `standard` |
| `includeQuestions` | Extract visible question signals | `true` |
| `includeFormatSignals` | Detect supported content formats | `true` |
| `htmlInputs` | Captured source records with `sourceUrl` and HTML | empty |
| `allowedDomains` | Optional retrieval hostname allowlist | empty |
| `maxPages` | Maximum pages retrieved | 1 default, 25 maximum |
| `includeEvidence` | Preserve bounded evidence excerpts | `true` |
| `includeRawSnapshots` | Store accepted raw source HTML | `false` |
| `maxChargeUsd` | Stop before the next event exceeds this amount | 35 USD maximum |

Example:

```json
{
  "targetQueries": ["project management software"],
  "sourceUrls": [
    "https://research.example/workflow-study",
    "https://publisher.example/project-guide"
  ],
  "maxSources": 2,
  "maxEvidenceRecords": 20,
  "claimExtractionMode": "standard",
  "includeQuestions": true,
  "includeFormatSignals": true,
  "allowedDomains": ["research.example", "publisher.example"],
  "maxChargeUsd": 5
}
```

Structured `serpResults` can be used when a trusted upstream workflow already captured results. Those records are analyzed directly and do not require a search-engine request. The Store default has no source evidence and returns a nonempty `source_required` diagnostic.

### Dataset output

Each row includes common provenance plus:

- `briefTopic` for the associated target query;
- `sourceTitle` for the observed page title;
- `headingSignals` and `questionSignals` as arrays of visible text;
- `claimText` for a numeric candidate, or null for a source-level record;
- `claimContext` for the bounded supporting excerpt;
- `contentFormat` for the detected format list;
- `evidencePriority` as a transparent score based on observed claims, headings, questions, and formats;
- `issueCode`, `evidenceSnippet`, and `recommendation` for audit use.

Evidence priority is a sorting aid, not an authority or truth score. Review publication date, methodology, authorship, original citations, and source reputation before putting a claim into published content.

### Reports

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

### Pay-per-event pricing

| Event | Price (USD) | When charged |
| --- | ---: | --- |
| `actor-start` | 0.0350 | after successful startup |
| `source-page-processed` | 0.0115 | once for each accepted source page |
| `evidence-record-extracted` | 0.0065 | before each paid evidence record |
| `brief-section-generated` | 0.0500 | before report section generation |
| `premium-brief-generated` | 0.7500 | before the premium brief artifacts are stored |

Apify platform usage pass-through is off. Higher-tier Store discounts are reserved in the pricing policy. `maxChargeUsd` is evaluated before every event, and no related dataset or report output is written after a rejected, partial, or over-budget charge.

### Safety and responsible research

Only HTTP and HTTPS source URLs are accepted. Loopback and private IPv4 destinations are rejected, optional hostname allowlists narrow retrieval, and source counts, page counts, response size, and timeouts remain bounded. Discovered links are not crawled. Access-denied and human-verification pages return diagnostics.

The Actor works only with text present in accepted responses or supplied structured records. It does not retrieve private content, validate legal rights to reuse a source, or guarantee factual accuracy. Cite original research where possible and preserve the source URL with every downstream brief record.

# Actor input Schema

## `targetQueries` (type: `array`):

Queries or brief topics used to group source evidence.

## `sourceUrls` (type: `array`):

Public source URLs to collect evidence from.

## `serpResults` (type: `array`):

Query records with results or competitors arrays.

## `maxSources` (type: `integer`):

Maximum source pages to process.

## `maxEvidenceRecords` (type: `integer`):

Maximum evidence records to emit.

## `claimExtractionMode` (type: `string`):

Controls how numeric claims and facts are extracted from source pages.

## `includeQuestions` (type: `boolean`):

Include question-style source signals in the brief evidence.

## `includeFormatSignals` (type: `boolean`):

Include page format and content-structure signals.

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

Optional public page URLs to analyze when actor-specific URL fields are not used.

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

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

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

Optional captured HTML records with sourceUrl and html or currentHtml for deterministic analysis.

## `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
{
  "targetQueries": [
    "project management software"
  ],
  "sourceUrls": [],
  "serpResults": [],
  "maxSources": 10,
  "maxEvidenceRecords": 25,
  "claimExtractionMode": "standard",
  "includeQuestions": true,
  "includeFormatSignals": true,
  "startUrls": [],
  "sitemapUrls": [],
  "htmlInputs": [],
  "allowedDomains": [],
  "maxPages": 1,
  "maxDepth": 0,
  "includeEvidence": true,
  "includeRawSnapshots": false,
  "requestDelayMs": 250,
  "timeoutMs": 15000,
  "userAgentMode": "standard",
  "maxChargeUsd": 35,
  "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/content-brief-source-collector").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/content-brief-source-collector").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/content-brief-source-collector --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,junipr/content-brief-source-collector"
        }
    }
}

```

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/bhhVE4EFM9GAr0tz9/builds/ZLKsW0APYfqHxsGXq/openapi.json
