# Cited Evidence Pack: Verbatim Quotes from URLs for AI Agents (`geeky_goth_gamer/cited-evidence-pack`) Actor

Give it a question and web page URLs; get a compact pack of verbatim, cited quotes ranked for the question, with gaps, conflicts and an optional claim check (supported or contradicted). Saves agent context tokens. $0.025 per pack.

- **URL**: https://apify.com/geeky_goth_gamer/cited-evidence-pack.md
- **Developed by:** [Chris Day](https://apify.com/geeky_goth_gamer) (community)
- **Categories:** AI, Developer tools, Automation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $25.00 / 1,000 evidence packs

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?

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

## Cited Evidence Pack for AI Agents

Give this Actor a **question** and one or more **public page URLs**. It fetches the pages, strips navigation, footers and hidden text, ranks the visible passages against the question, and returns one compact pack:

- verbatim quotes, each with its URL, title and a locator
- **gaps**: question terms that did not appear in the sources
- **conflicts**: the same kind of figure or date disagrees across sources
- an optional **claim verdict** (`supported`, `partial`, `contradicted`, or `not_found`)
- a short **handoff markdown** block an agent can pass to the next step
- estimated token counts for the raw pages vs the pack, so you can see the saving

It does **not** search the web and it does **not** call a language model. Quotes are taken from the page text, so they can be checked. JavaScript-only pages will have little or no text; render those first if you need them.

### When an AI agent should use this

Use `geeky_goth_gamer/cited-evidence-pack` when:

- You must answer a question or check a claim using specific web pages, and need verbatim quotes with source URLs instead of whole pages.
- You want to save context-window tokens: the pack is capped by `tokenBudget`.
- You need to show gaps and conflicts between sources, or a supported/contradicted verdict for a claim.

Don't use it for:

- Finding sources: it does not search the web; give it URLs (for example from a search tool).
- PDF or DOCX sources (convert them with a PDF-to-Markdown Actor first).

**Example input:**

```json
{
  "question": "What does MUST mean in RFC 2119?",
  "urls": [
    "https://www.rfc-editor.org/rfc/rfc2119"
  ],
  "claim": "MUST means an absolute requirement."
}
```

**Output:** One dataset item: `evidence` (ranked verbatim quotes with `url`, `locator` and `score`), `gaps`, `conflicts`, `claimVerdict` with `claimReason` (when a claim is given), `sources`, `tokenCounts` and a ready-to-paste `packMarkdown`.

**Cost:** $0.025 per pack (once per run, only if at least one source was read).

**Call it from an agent:**

- Apify MCP server: add `https://mcp.apify.com/?tools=geeky_goth_gamer/cited-evidence-pack` to your MCP client; the tool is `geeky_goth_gamer--cited-evidence-pack`. Or use `call-actor` with `"actor": "geeky_goth_gamer/cited-evidence-pack"`.
- Python: `ApifyClient(token).actor("geeky_goth_gamer/cited-evidence-pack").call(run_input=...)`, then read `client.dataset(run["defaultDatasetId"]).list_items().items`.
- HTTP: `POST https://api.apify.com/v2/acts/geeky_goth_gamer~cited-evidence-pack/run-sync-get-dataset-items?token=YOUR_TOKEN` with the input JSON as the body.

### Why this exists

Agents already have search and "fetch this URL as markdown". The expensive part is what happens next: dumping a whole page into the model, looping, and losing the thread. This Actor is meant to be **one tool call** that produces the evidence for the next step, under a token budget.

### Input

| Field | Default | Notes |
|---|---|---|
| `question` | (required) | What the evidence should answer. Phrases in `"double quotes"` get an exact-match bonus. |
| `urls` | (required) | Up to 20 public `http(s)` pages. Duplicates are removed. HTML and plain text only. |
| `claim` | (empty) | If set, a verdict is added based on the quotes and sources. |
| `tokenBudget` | 2000 | Maximum estimated tokens of quoted evidence (characters ÷ 4). |
| `maxQuotesPerSource` | 5 | Stops one long page filling the pack. |
| `maxQuoteChars` | 600 | Longer passages are cut at a sentence boundary where possible. |
| `respectRobotsTxt` | true | A missing robots.txt (HTTP 404) is allowed; HTTP 401 or 403 is treated as disallowed. |
| `maxFileSizeMb` | 5 | Larger pages are skipped and reported, not billed on their own. |
| `timeoutSecondsPerUrl` | 30 | Download limit for each page, including its robots.txt fetch. |

### Output

One dataset item:

- `evidence[]`: `quote`, `url`, `finalUrl`, `title`, `heading`, `locator`, `score`, `tokenCount`
- `gaps[]`, `conflicts[]`, `sources[]`
- `claimVerdict`, `claimReason` when a claim was supplied
- `packMarkdown`: ready to hand to the next model call
- `tokenCounts`: `rawVisible`, `rawPages`, `pack`, `budget`, `savedVsVisible`, `savedVsPages`
- `injectionSignals`: true if hidden-text or injection-like phrasing was stripped (the hidden text itself is never included)
- `billed`: whether the `evidence-pack` event was charged

### Pricing

You pay **US$0.025 per evidence pack**, once, when at least one source was read successfully. Failed sources are listed in the pack and do not add an extra fee. If every source fails, you are not charged. Your maximum cost per run is respected: if it is below US$0.025, nothing is processed.

### Safety

- Only public `http(s)` links are fetched. Links to private, local or cloud-metadata addresses are refused, and every redirect is re-checked. Downloads are capped in size and time. The Actor connects to the already-checked addresses only, IPv4 first, because some hosts (including Apify) have no IPv6 route.
- Hidden HTML, `display:none` text, off-screen text and HTML comments are stripped. Phrases that look like prompt-injection are counted and flagged, not forwarded.
- Residual risk: DNS rebinding between the address check and the connect is not fully prevented (same as the other tools in this set).
- This is not a licence to republish a page. Quotes are short extracts for research.

### Things to know

- **User-supplied URLs only.** Pair this with any search tool if you do not already have links.
- **No JavaScript rendering.** Use the URL renderer for pages that only exist after scripts run.
- **PDF and Word files** should go to the PDF & DOCX to Markdown tool; they are skipped here with a clear error.
- **Claim verdicts are conservative and lexical.** A contradicted verdict usually means a sourced figure disagrees with the claim. It is not a legal or academic certification.
- Token counts are an estimate (characters ÷ 4), not a particular model's tokenizer.

# Actor input Schema

## `question` (type: `string`):

REQUIRED. The question the evidence should answer, e.g. "What does MUST mean in RFC 2119?". Passages are ranked against it; phrases in "double quotes" get an exact-match bonus.

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

REQUIRED. 1-20 public http(s) web pages (HTML or plain text) to quote from, e.g. \["https://www.rfc-editor.org/rfc/rfc2119"]. Duplicates are removed. For PDF or DOCX files, convert them first with a PDF-to-Markdown Actor.

## `claim` (type: `string`):

If set, the pack also returns a verdict: supported, partial, contradicted, or not_found, with the quotes that led to it. Leave empty to skip.

## `tokenBudget` (type: `integer`):

Maximum estimated tokens of quoted evidence to return (estimate is characters ÷ 4). The handoff markdown is included in this budget. 0 is not allowed.

## `maxQuotesPerSource` (type: `integer`):

A cap so one long page cannot fill the whole pack.

## `maxQuoteChars` (type: `integer`):

Longer passages are cut at a sentence boundary where possible. Keeps quotes citable rather than republishing a whole page.

## `respectRobotsTxt` (type: `boolean`):

When on (default), a source is skipped if its robots.txt disallows this crawler. A missing robots.txt (HTTP 404) is treated as allowed. HTTP 401 or 403 on robots.txt is treated as disallowed.

## `maxFileSizeMb` (type: `integer`):

Larger pages are skipped and reported as an error (the pack is still billed if any other source succeeded).

## `timeoutSecondsPerUrl` (type: `integer`):

Download time limit for each page, including its robots.txt fetch.

## Actor input object example

```json
{
  "question": "What is the example domain used for?",
  "urls": [
    "https://example.com/"
  ],
  "tokenBudget": 2000,
  "maxQuotesPerSource": 5,
  "maxQuoteChars": 600,
  "respectRobotsTxt": true,
  "maxFileSizeMb": 5,
  "timeoutSecondsPerUrl": 30
}
```

# Actor output Schema

## `results` (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 = {
    "question": "What is the example domain used for?",
    "urls": [
        "https://example.com/"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("geeky_goth_gamer/cited-evidence-pack").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 = {
    "question": "What is the example domain used for?",
    "urls": ["https://example.com/"],
}

# Run the Actor and wait for it to finish
run = client.actor("geeky_goth_gamer/cited-evidence-pack").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 '{
  "question": "What is the example domain used for?",
  "urls": [
    "https://example.com/"
  ]
}' |
apify call geeky_goth_gamer/cited-evidence-pack --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,geeky_goth_gamer/cited-evidence-pack"
        }
    }
}
```

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/qw4KfHvxyCaG9m1oL/builds/78WPg8Lh3KhS0hN7O/openapi.json
