# Claim Verifier — AI-powered fact checking (`drain54/verify-api`) Actor

Verify factual claims (AI infra, pricing, endpoints, regions) against live web sources. Returns structured verdicts: TRUE/FALSE/PARTIALLY\_TRUE/UNVERIFIED with evidence URLs. Bring your own LLM API key (OpenAI-compatible).

- **URL**: https://apify.com/drain54/verify-api.md
- **Developed by:** [Indra Darmawan](https://apify.com/drain54) (community)
- **Categories:**
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $8.00 / 1,000 claim verified (standard)s

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

## Claim Verifier — AI-powered fact checking

Verify factual claims against live web sources and get structured, evidence-backed verdicts — not LLM vibes. The verdict is decided by **deterministic evidence rules** (source quality tiers + explicit verdict parsing); the LLM only writes the explanation. Out-of-scope claims (non-AI-infra) are rejected cleanly as `UNVERIFIED`.

**Live URL probing included**: claims like `https://api.example.com/v1 is reachable` are verified by a direct HTTP probe (deterministic, confidence 1.0).

### Supported claims

| Type | Example | Method |
|---|---|---|
| Claim verification | "OpenRouter offers Gemini 2.0 Flash free tier" | Web search + LLM synthesis |
| Endpoint check | "https://api.example.com/v1 is reachable" | Direct HTTP probe |
| Pricing / region / docs | "Anthropic API available in Indonesia" | Web search + LLM synthesis |

### Verdicts

`TRUE` · `FALSE` · `PARTIALLY_TRUE` · `CHANGED` · `UNREACHABLE` · `BLOCKED` · `UNVERIFIED`

- `TRUE` requires positive evidence from an official or primary (API) source; third-party-only positive evidence yields `PARTIALLY_TRUE`.
- Negative evidence with no counter-signal yields `FALSE`.
- No sources → `UNVERIFIED` (never a guessed verdict).

### Input

```json
{
  "claims": ["OpenRouter offers Gemini 2.0 Flash", "https://api.apify.com/v2 is reachable"],
  "mode": "standard",
  "provider": "groq",
  "llmModel": "openai/gpt-oss-20b",
  "apiKey": "YOUR_GROQ_API_KEY"
}
```

- **mode**: `standard` (3 searches, 5 sources) or `deep` (10 searches, 12 sources, more retries)
- **provider**: `groq` (recommended free tier) | `openai` | `openrouter` | `custom` (set `customBaseUrl`)
- **apiKey**: your own LLM API key (BYOK, stored as Apify secret). Model runs on Groq's free tier by default.
- max 20 claims per run

### Output (dataset)

```json
{
  "claim": "OpenRouter offers Gemini 2.0 Flash",
  "verdict": "PARTIALLY_TRUE",
  "confidence": 0.7,
  "explanation": "The OpenRouter website lists Gemini 2.0 Flash as an available model...",
  "sources": [{ "url": "https://openrouter.ai/google/gemini-2.0-flash-001", "type": "third_party", "supports": "API Pricing & Benchmarks" }],
  "verifiedAt": "2026-09-08T17:03:30.206Z",
  "verifyTimeMs": 1283
}
```

### Pricing (pay-per-event)

- `verify` — $0.008 per claim (standard mode)
- `verify-deep` — $0.025 per claim (deep mode)
- `apify-actor-start` — $0.00005 per run

You pay for verification work; a claim rejected as out-of-scope is **not** charged.

# Actor input Schema

## `claims` (type: `array`):

Claims to verify, e.g. \["OpenRouter has free Gemini 2.0 Flash tier", "https://api.example.com/v1 is reachable"]

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

standard: 3 searches, 5 sources. deep: 10 searches, 12 sources, more LLM retries (slower, more thorough)

## `provider` (type: `string`):

Provider for answer synthesis. groq=https://api.groq.com/openai/v1 (recommended: generous free tier, stable model ids), openai=https://api.openai.com/v1, openrouter=https://openrouter.ai/api/v1, custom=use customBaseUrl

## `customBaseUrl` (type: `string`):

OpenAI-compatible base URL, e.g. https://api.example.com/v1

## `llmModel` (type: `string`):

Model used for answer synthesis (verdict is decided by deterministic rules, not the LLM). Default works on Groq free tier.

## `apiKey` (type: `string`):

API key for the selected provider. Stored as an Apify secret (isSecret), never logged.

## Actor input object example

```json
{
  "claims": [
    "OpenRouter has free Gemini 2.0 Flash tier",
    "https://api.apify.com/v2 is reachable"
  ],
  "mode": "standard",
  "provider": "groq",
  "llmModel": "openai/gpt-oss-20b"
}
```

# Actor output Schema

## `verifications` (type: `string`):

Array of results, one per input claim: { claim, verdict (TRUE|FALSE|PARTIALLY\_TRUE|CHANGED|UNREACHABLE|BLOCKED|UNVERIFIED), confidence (0-1), explanation, sources: \[{url, type, supports}] }.

# 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("drain54/verify-api").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("drain54/verify-api").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 drain54/verify-api --silent --output-dataset

```

## MCP server setup

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

```

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/v9A8xu0c60mW6TPEO/builds/IkMePKu0jYnooz8yP/openapi.json
