# Source Quote Verifier (`vincesoft/source-quote-verifier`) Actor

Check whether a public web source contains claimed text using exact, normalized, or deterministic fuzzy matching, with passage context and retrieval provenance.

- **URL**: https://apify.com/vincesoft/source-quote-verifier.md
- **Developed by:** [VincSoft](https://apify.com/vincesoft) (community)
- **Categories:** Agents, Developer tools
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$0.03 / quote verification

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/platform/actors/running/actors-in-store#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

### What does Source Quote Verifier do?

**Source Quote Verifier checks whether a public web source actually contains claimed text** and returns the matching passage, surrounding context, character offsets, retrieval metadata, and a content hash. It is a small deterministic API primitive for citation checks, evidence pipelines, research agents, and fact-checking workflows. It does not use an LLM and does not claim that a passage semantically supports an argument.

The Actor retrieves one public HTTPS document with bounded standard HTTP, extracts readable text from HTML or textual formats, and evaluates the supplied quote using an explicit algorithm. Responses are capped at 1 MiB after decompression. You can invoke it from the Apify API, scheduled runs, integrations, or Apify MCP and monitor every run through the Apify Console.

### Why use Source Quote Verifier?

- Verify that a quotation is present before an agent cites a source.
- Replace ad-hoc page retrieval, HTML cleanup, Unicode normalization, and passage-location code with one stable JSON contract.
- Receive SHA-256 content provenance, redirect history, retrieval time, match type, score, and algorithm name.
- Keep matching deterministic and reproducible without runtime AI or a paid data supplier.
- Block localhost, private networks, link-local addresses, metadata services, unsafe redirects, oversized responses, and slow requests by default.

Example agent queries include “Does this article contain this quote?”, “Find this claimed text in the source,” “Verify this quotation and return its context,” and “Check whether this URL contains the cited sentence.”

### How to verify a quote on a web page

1. Open the Actor's **Input** tab.
2. Enter the public HTTPS source URL.
3. Paste the claimed text.
4. Choose `normalized` for most citations, `exact` for byte-like literal checking, or `fuzzy` only when small textual differences are expected.
5. Start the Actor and inspect the single dataset result.

Always ensure your retrieval and use of the source complies with its terms, copyright rules, and applicable law.

### Input

See the Input tab for the full schema. The contract deliberately has only three fields:

```json
{
  "url": "https://example.com/article",
  "text": "The product launched in June 2026",
  "matching": "normalized"
}
```

`normalized` is the default. It applies Unicode NFKC normalization, case folding, whitespace collapsing, and equivalent quote/dash punctuation. `exact` is case- and whitespace-sensitive. `fuzzy` first attempts normalized exact matching, then uses a fixed token-overlap and character-trigram algorithm with a documented `0.82` threshold. There is no semantic inference.

### Output

The Actor writes exactly one versioned JSON envelope. You can download the dataset in various formats such as JSON, HTML, CSV, or Excel.

```json
{
  "contractVersion": "1.0",
  "ok": true,
  "source": {
    "finalUrl": "https://example.com/article",
    "httpStatus": 200,
    "contentHash": "sha256:...",
    "retrievedAt": "2026-08-09T12:00:00.000Z"
  },
  "verification": {
    "match": true,
    "matchType": "normalized_exact",
    "algorithm": "unicode-nfkc-casefold-whitespace-punctuation-v1",
    "score": 1,
    "threshold": 1,
    "occurrenceCount": 1,
    "passage": "The product launched in June 2026",
    "startOffset": 418,
    "endOffset": 458
  },
  "warnings": []
}
```

| Field          | Type    | Meaning                                                                     |
| -------------- | ------- | --------------------------------------------------------------------------- |
| `ok`           | boolean | Whether retrieval and a trustworthy textual determination completed         |
| `source`       | object  | Final URL, status, content type, byte count, hash, timestamp, and redirects |
| `extraction`   | object  | Detected format, extraction method, title, and readable character count     |
| `verification` | object  | Match decision, type, algorithm, score, passage, context, and offsets       |
| `error`        | object  | Stable machine-readable free failure when `ok` is false                     |

### How much does Source Quote Verifier cost?

The initial pricing proposal is one `quote-verification` pay-per-event charge of approximately **$0.03** for a completed determination. Network, timeout, unsupported-content, resource-budget, and internal failures are not charged. Final Store pricing remains subject to a private Apify benchmark and margin gate before publication.

### Accuracy and advanced options

Use `normalized` unless the application explicitly needs literal or fuzzy behavior. A fuzzy result means only that a deterministic textual similarity threshold was met; inspect `score`, `algorithm`, and `passage`. Client-rendered text, images, audio, video, PDFs, authenticated pages, and content loaded only after JavaScript execution are intentionally unsupported in v1. Query values are used for retrieval but redacted from output and logs.

### FAQ, responsible use, and support

#### Does a match prove the source supports my claim?

No. It proves that extracted source text matched the supplied text under the named algorithm. Interpretation and semantic entailment are outside this Actor's contract.

#### Why can visible browser text be missing?

The Actor uses bounded HTTP and does not run page JavaScript. Use a browser-assisted retrieval tool when text is rendered only on the client.

The Actor reads public source text and does not intentionally collect private user data. Public pages can still contain personal or copyrighted information. Use results only with a lawful purpose and consult qualified counsel when unsure. Use the Actor's Issues tab for bug reports and the API tab for programmatic invocation.

# Actor input Schema

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

Public HTTPS document whose readable text should be checked. Private, local, credential-bearing, and non-HTTPS targets are rejected.

## `text` (type: `string`):

Text to locate in the source. Maximum 5,000 characters.

## `matching` (type: `string`):

Exact is literal and case-sensitive; normalized handles Unicode, case, whitespace, and equivalent punctuation; fuzzy adds deterministic token and character n-gram similarity.

## Actor input object example

```json
{
  "url": "https://example.com/article",
  "text": "The product launched in June 2026",
  "matching": "normalized"
}
```

# Actor output Schema

## `dataset` (type: `string`):

Dataset containing the single verification envelope.

# 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 = {
    "url": "https://example.com/",
    "text": "Example Domain"
};

// Run the Actor and wait for it to finish
const run = await client.actor("vincesoft/source-quote-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 = {
    "url": "https://example.com/",
    "text": "Example Domain",
}

# Run the Actor and wait for it to finish
run = client.actor("vincesoft/source-quote-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 '{
  "url": "https://example.com/",
  "text": "Example Domain"
}' |
apify call vincesoft/source-quote-verifier --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,vincesoft/source-quote-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/O3KKHkKxZvzcTFQBl/builds/FcGiavhSsgOeeKn5K/openapi.json
