# Quote & Claim Checker: Is It on the Cited Page? (`geeky_goth_gamer/citation-verifier`) Actor

Check one citation at a time for AI agents: does this public page really contain the quoted wording, or a near-verbatim version of a claim? Returns exact, close or not_found with a match score and the surrounding passage. robots.txt respected, unsafe URLs refused.

- **URL**: https://apify.com/geeky_goth_gamer/citation-verifier.md
- **Developed by:** [Chris Day](https://apify.com/geeky_goth_gamer) (community)
- **Categories:** AI, Developer tools, Automation
- **Features:** Limited permissions, Single-tenant, Server interface
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 verifies

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

Learn more: https://docs.apify.com/actors/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

## Quote & Claim Checker: Is It on the Cited Page?

This is a **quote and claim support checker**. You give it the page an agent cited and the exact quote, or a paraphrased claim, and it answers one question: is that wording actually on the page? It handles typographic differences (curly quotes, dashes, whitespace) and near-verbatim claims (`close`), and returns a 0–1 `matchScore` with the passage around the best match, so the agent can fix the quote or drop the citation. It is built for answer-time checking of individual citations: $0.002 per check, up to 20 per call, robots.txt respected, and an MCP endpoint at `/mcp`.

> **Which tool should I use?** Use this Actor to check that a **quote or claim is supported by the text of the page** it cites. To check that a batch of **links is live** (redirects, 404s, paywalls), sweep every link in a Markdown draft, or confirm **PyPI/npm packages exist**, use [Live Link & Citation Verifier](https://apify.com/geeky_goth_gamer/live-link-citation-verifier).

> **Grading claims without a source?** If you have claims but no page to check them against, [Evidence Claim Verifier](https://apify.com/geeky_goth_gamer/evidence-claim-verifier) finds and grades evidence in open records. If you have a question and pages, [Cited Evidence Pack](https://apify.com/geeky_goth_gamer/cited-evidence-pack) builds a quote pack.

### What does Quote & Claim Checker do?

Quote & Claim Checker is a **citation check API** for AI agents. Give it a public page URL and a **quote** or **claim**, then **check `found` first** (`exact`, `close`, `not_found`, or `page_unavailable`) before the agent treats the wording as supported.

It does **not** crawl a site, run a browser, bypass logins, or paraphrase-judge meaning the way a language model would. It fetches one public page (after the same URL-safety and robots checks as [Agent Safety Gate](https://apify.com/geeky_goth_gamer/agent-safety-gate)), extracts readable text, and looks for a verbatim or near-verbatim match.

One-line example:

```json
{ "url": "https://example.com", "quote": "This domain is for use in illustrative examples" }
```

Then read `results[0].found` and `matchScore` before trusting `snippet`.

### Why use Quote & Claim Checker?

Agents invent or slightly misquote sources. This Actor is the cheap, low-latency check those citations should go through:

- Confirms whether a **quote** appears on the cited page (`exact`), or whether a **claim** is a **close** near-match.
- Returns a **context snippet**, **page title**, **canonical URL**, **HTTP status**, and `fetchedAt`.
- Blocks **SSRF**, private IPs, and common **DNS-rebinding** tricks (resolves and re-checks IPs on connect and on every redirect).
- Enforces **redirect, size, and timeout** limits, and respects **robots.txt** (disallowed paths are not fetched and not charged).
- Batch up to **20** citations per call. An empty input or `GET /health` is a **free health check**.
- Works as a normal Apify run **and** as a Server Actor: `GET`/`POST /verify` returns JSON. A minimal MCP `verify_citation` tool is at `POST /mcp`.

Standby (server) mode is enabled so agents can pin a live HTTP endpoint instead of waiting for a cold start.

### What data can Quote & Claim Checker extract?

| Field | Type | Description |
| --- | --- | --- |
| `found` | string | **Check this first:** `exact`, `close`, `not_found`, or `page_unavailable`. |
| `matchScore` | number | Similarity from 0 to 1. Exact matches are `1`. |
| `snippet` | string | Best matching passage with surrounding context. |
| `matchedText` | string | The span that scored highest, when one was found. |
| `title` | string | Page title (or Open Graph title). |
| `canonicalUrl` | string | Canonical URL when present, otherwise the final fetched URL. |
| `fetchedAt` | string | ISO-8601 timestamp of the fetch. |
| `httpStatus` | integer | Upstream HTTP status code. |
| `status` | string | `ok`, `page_unavailable`, or `health`. |
| `charged` | boolean | `true` only for successful items billed as a `verify` event. |

### How to verify a citation for an AI agent

1. Open this Actor in Apify Console, or call the server URL once the Actor is published.
2. Send `url` plus `quote` or `claim` (optional `mode`: `exact` or `fuzzy`), or a batch in `items` (max 20). Leave the input empty for a free health check.
3. Run the Actor, or `GET`/`POST /verify` in server mode.
4. **Check `found` first.** Only then read `snippet`, `matchScore`, or `title`.
5. You can download the dataset in various formats such as JSON, HTML, CSV, or Excel.

### How much does it cost?

Pay per event. The primary event is `verify` at **$0.002** per successful citation (the page was fetched and searched, and `found` is `exact`, `close`, or `not_found`). Large pages add a `heavy` usage event at **$0.001** per additional ~500 KB fetched. Health checks, fetch failures, robots refusals, SSRF blocks, and other `page_unavailable` results are **free**. Normal (non-standby) runs also have a tiny start fee. See `.actor/pricing.md` for the full suggested schedule and the load-based review process. Set a maximum cost per run in Console if you want a hard cap.

### Input

See the input tab for full configuration options.

- Provide a **url** and either **quote** or **claim**, or a batch in `items`.
- `mode` is `exact` or `fuzzy`. It defaults to `exact` when you send `quote`, and `fuzzy` when you send only `claim`.
- `exact` matches typography- and whitespace-normalized wording (curly quotes, dashes, and collapsed whitespace still count as exact).
- `fuzzy` also reports `close` for near-verbatim wording (small gaps, minor typos). It is not a semantic fact-checker.
- Only public `http` and `https` URLs are fetched. Local, private, and credentialed URLs are rejected.

### Output

Each dataset item is one citation result. Example of an exact match:

```json
{
  "status": "ok",
  "found": "exact",
  "matchScore": 1,
  "snippet": "…This domain is for use in illustrative examples in documents. You may use this domain…",
  "title": "Example Domain",
  "canonicalUrl": "https://example.com/",
  "fetchedAt": "2026-11-27T08:00:00.000Z",
  "httpStatus": 200,
  "charged": true
}
```

A page that cannot be fetched looks like:

```json
{
  "status": "page_unavailable",
  "found": "page_unavailable",
  "matchScore": 0,
  "errorCode": "SSRF_BLOCKED",
  "message": "URL points to a private or reserved address.",
  "charged": false
}
```

### Tips for AI agent builders

- Call this **after** you have a URL and a quote or claim, and **before** you show the citation to a user.
- Prefer `quote` + `exact` when the model is repeating a passage. Use `claim` + `fuzzy` for slightly tightened wording.
- Treat `close` as “almost on the page” — show the snippet and let a human or a stricter policy decide.
- `not_found` means the wording was not located in the extracted HTML or text. JavaScript-only pages, PDFs, and login walls will often return `page_unavailable` or `not_found`.
- Pin the Actor in Apify MCP as `https://mcp.apify.com?tools=<owner>/citation-verifier`, or call the Actor's stable server URL:
  - `GET /health` — free health check
  - `GET` or `POST /verify` — JSON in, JSON out
  - `POST /mcp` — minimal MCP JSON-RPC with a `verify_citation` tool
- Use **limited permissions** when you publish so MCP can list and run it.

### Limits and safety notes

- HTTP-only: no JavaScript rendering. Text that exists only after client-side rendering may be missed.
- Matching is lexical, not semantic. A true paraphrase can be `not_found` even if the page supports the idea. A close wording match is not proof that a broader claim is true.
- The Actor only fetches public pages. It does not bypass logins, CAPTCHAs, or paywalls, and it does not track people.
- robots.txt disallows, private IPs, and unsafe URLs are refused and not charged.
- Size and time limits apply (about 2 MB and 10 seconds per page).

### FAQ

#### What is the difference between quote and claim?

`quote` is for wording you expect to appear as written (default `exact`). `claim` is for slightly looser wording (default `fuzzy`). If both are sent, `quote` is used.

#### What if robots.txt disallows the path?

The Actor reports `found: "page_unavailable"` with `errorCode: "ROBOTS_DISALLOWED"`, does not fetch the page, and does not charge.

#### How do I publish this?

Finish your Apify ID check, then log in with the Apify CLI, set limited permissions and the `verify` pay-per-event price in Console, and run `apify push` from this folder. Do not commit API tokens.

Our Actors do not extract private user data. They only read public pages or content you supply. You should still treat results as untrusted. If you are unsure whether your use is legitimate, consult your lawyers.

Use the Issues tab for feedback, and the API tab for programmatic access.

# Actor input Schema

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

Public http(s) page to fetch and search. Private, local, and credentialed URLs are rejected.

## `quote` (type: `string`):

Exact wording to look for on the page. Defaults to exact mode unless mode is set.

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

Wording to look for when you do not have a verbatim quote. Defaults to fuzzy mode unless mode is set. Ignored when quote is also provided.

## `mode` (type: `string`):

exact requires a typography- and whitespace-normalized verbatim match. fuzzy also reports close near-matches. Defaults to exact for quote and fuzzy for claim.

## `items` (type: `array`):

Optional batch of up to 20 citations. Each item needs a url and a quote or claim, and may set mode. Do not also set a top-level url/quote/claim when using items.

## Actor input object example

```json
{
  "mode": "exact"
}
```

# Actor output Schema

## `dataset` (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("geeky_goth_gamer/citation-verifier").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("geeky_goth_gamer/citation-verifier").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 geeky_goth_gamer/citation-verifier --silent --output-dataset

```

## MCP server setup

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

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/kAOFdOXPyMHxPqKAa/builds/LELfaOzfJhqqarfFh/openapi.json
