# Faro — verify before you act (`vednux/faro-verify`) Actor

Verify trust before you act: URL, payee (UPI/scam/handle), or message. Red/yellow/green verdict with reason and recommended action. Agent-friendly pay-per-event.

- **URL**: https://apify.com/vednux/faro-verify.md
- **Developed by:** [vednt mathur](https://apify.com/vednux) (community)
- **Categories:** AI, Developer tools, Automation
- **Stats:** 2 total users, 2 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$0.01 / verdict

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 a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js/docs.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python/docs.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/integrations/mcp.md).

If your project is in a different language, use 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

## Faro — verify before you act

**Faro** is a trust and verification service for agents and automation. Give it a URL, a payee identity, or an inbound message; it returns one consistent verdict object — 🟢 green, 🟡 yellow, or 🔴 red — with a plain-language `reason`, a `recommended_action` (`allow` / `warn` / `block` / `review`), and the signals that drove the decision.

This Actor is a **thin proxy** to the Faro engine. It does not score, re-rank, or mutate verdicts. Whatever Faro's API returns is what you get in the dataset.

> **Advisory only.** Faro advises; you decide. Faro never blocks payments, navigation, or message delivery on your behalf.

### What you can verify

| Input `type` | Use when |
|---|---|
| `url` | Before visiting, sharing, or acting on a link |
| `payee` | Before sending money — UPI VPA, handle, IBAN, IFSC, tax IDs (e.g. GSTIN, Korea BRN), Singapore UEN, or a company/FI name |
| `message` | Before acting on inbound SMS, email, or chat content |

Payee checks include additive Asia structure signals (Korea BRN checksum, Singapore UEN shape) and — when Faro is configured with a MAS entities feed — a possible-match screen against MAS-listed financial institution names. These never assert KYB identity on their own.

### Example input

```json
{
  "type": "payee",
  "value": "merchant@paytm"
}
````

### Output schema (for agents)

This Actor declares an Apify **output schema** (default dataset) and a **dataset schema** describing each `VerdictResult` field — so Store / MCP agents know to branch on `verdict` and `recommended_action`. See `.actor/output_schema.json` and `.actor/dataset_schema.json`.

### Example output (one dataset item per run)

```json
{
  "verdict": "yellow",
  "confidence": 0.5,
  "artifact": { "type": "payee", "value": "merchant@paytm" },
  "reason": "Payee format is valid; no strong risk signals found.",
  "recommended_action": "warn",
  "signals": [],
  "explanation": null,
  "cached": false,
  "first_seen": "2026-07-15T00:00:00Z",
  "checked_at": "2026-07-15T00:00:00Z",
  "request_id": "req_abc123"
}
```

### Environment variables (Actor secrets — never in input)

Configure these in the Apify Console under **Settings → Environment variables** (mark the API key as secret):

| Variable | Required | Description |
|---|---|---|
| `FARO_API_KEY` | Yes | Server-side Faro API key. Agents never see this — they pay Apify; the Actor authenticates to Faro. |
| `FARO_HOST` | No | Faro API base URL. Default: `https://api.farofinance.app`. |

#### Staging vs production

| Environment | Suggested `FARO_HOST` |
|---|---|
| Local dev | `http://127.0.0.1:8000` |
| Staging | Your staging Render/Railway URL |
| Production | `https://api.farofinance.app` |

Point `FARO_HOST` at the deployment whose `FARO_API_KEYS` includes the key you store in `FARO_API_KEY`.

### Licence-clean mode

Until commercial licences for OpenSanctions and Google Safe Browsing (Web Risk) are in place, this Actor calls Faro with `X-Faro-Signal-Scope: licence-clean`. That skips those tier-1 integrations while still running RDAP domain age, reputation graph lookup, government sanctions feeds, Companies House / VIES / UEN / Korea BRN / MAS name-feed checks (when configured on the Faro server), and other commercially-clean sources.

On the Faro server, you can also register the Actor's API key in `FARO_LICENCE_CLEAN_API_KEYS` so licence-clean scope applies even without the header.

When licences land, remove the header from `main.js` (or stop listing the key in `FARO_LICENCE_CLEAN_API_KEYS`) to enable premium signals.

### Pricing

This Actor uses Apify **pay-per-event** monetization. One successful verdict = one `verdict` event charge + one dataset item. Validation errors and Faro API failures do **not** charge.

| Setting | Value |
|---|---|
| Event name | `verdict` (must match `Actor.charge` in `main.js`) |
| Recommended list price | **$0.01** per verdict |
| Primary event | `verdict` |
| Free allowance | Optional 1–3 free events in Console (helps Store / MCP trials) |

Apify takes its platform share (~20%) plus compute usage from revenue — set the list price so net ≈ your target unit economics.

**This rail does not require Faro API x402 paywall or Dodo payments.** Agents pay Apify only; the Actor authenticates to Faro with a server-side key.

Configure monetization in Console before going public. Test locally with:

```bash
ACTOR_TEST_PAY_PER_EVENT=true apify run
```

### Publish checklist (Apify Store)

Actor Console: [faro-verify](https://console.apify.com/actors/x547Y4wbYweFoAbOA) — Store / MCP slug: **`vednux/faro-verify`**.

1. **Faro (Render `faro-api` only)** — add a dedicated Actor key to `FARO_API_KEYS` and the same value to `FARO_LICENCE_CLEAN_API_KEYS`. Do not put it on `faro-mcp`. Leave `X402_PAYWALL_ENABLED=false`.
2. **Apify secrets** — Settings → Environment variables: secret `FARO_API_KEY`, optional `FARO_HOST` (`https://api.faro.dev` or `https://api.farofinance.app`).
3. **Billing + PPE + Store** — complete payout billing at Publication (required), then run:
   ```bash
   cd apify-actor && node scripts/configure-store.mjs
   ```
   Sets `verdict` @ $0.01 (primary), public listing, categories AI / DEVELOPER\_TOOLS / AUTOMATION.
4. **Smoke** — Run `{"type":"url","value":"https://example.com"}` (matches input-schema `prefill` used by Store QA; then payee + message). Confirm one dataset item, one `verdict` charge, no charge on bad input (`Actor.fail`). Keep prefills so daily Store QA stays green.
5. **MCP pin (optional)** — `https://mcp.apify.com?tools=vednux/faro-verify`

Deploy source updates with:

```bash
cd apify-actor
apify push
```

Step-by-step founder notes: [PUBLISH.md](./PUBLISH.md).

### Local development

```bash
cd apify-actor
npm install

## Create apify-actor/storage/key_value_stores/default/INPUT.json:
## { "type": "url", "value": "https://example.com" }

export FARO_API_KEY=your-faro-key
export FARO_HOST=http://127.0.0.1:8000   # optional

apify run
## or: npm start
```

Results land in `storage/datasets/default/`.

### Monetization API notes (Apify SDK v3)

- Charge with `await Actor.charge({ eventName: 'verdict' })` **after** a successful Faro response, before `Actor.pushData`.
- `Actor.charge` returns a `ChargeResult`; check `eventChargeLimitReached` in high-volume Actors.
- Local PPE testing: `ACTOR_TEST_PAY_PER_EVENT=true` (optional `ACTOR_USE_CHARGING_LOG_DATASET=true` for a charge log).
- Do **not** add retry loops that could double-charge; this Actor makes a single API call per run.

### What this Actor does not do

- Expose the Faro API key in input, output, logs, or this README
- Return raw OpenSanctions or Safe Browsing records
- Modify or re-score the verdict object
- Imply that Faro blocks anything on your behalf

# Actor input Schema

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

The kind of thing to verify.

## `value` (type: `string`):

The URL, payee identity (UPI VPA, IBAN, GSTIN, Korea BRN, Singapore UEN, company/FI name, …), or message text to verify.

## Actor input object example

```json
{
  "type": "url",
  "value": "https://example.com"
}
```

# Actor output Schema

## `verdict` (type: `string`):

Default dataset items — each item is one Faro trust verdict object.

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

// Run the Actor and wait for it to finish
const run = await client.actor("vednux/faro-verify").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 = {
    "type": "url",
    "value": "https://example.com",
}

# Run the Actor and wait for it to finish
run = client.actor("vednux/faro-verify").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "type": "url",
  "value": "https://example.com"
}' |
apify call vednux/faro-verify --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=vednux/faro-verify",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Faro — verify before you act",
        "description": "Verify trust before you act: URL, payee (UPI/scam/handle), or message. Red/yellow/green verdict with reason and recommended action. Agent-friendly pay-per-event.",
        "version": "0.3",
        "x-build-id": "vDeM8xv78al3eVV4B"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/vednux~faro-verify/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-vednux-faro-verify",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/vednux~faro-verify/runs": {
            "post": {
                "operationId": "runs-sync-vednux-faro-verify",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/vednux~faro-verify/run-sync": {
            "post": {
                "operationId": "run-sync-vednux-faro-verify",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "type",
                    "value"
                ],
                "properties": {
                    "type": {
                        "title": "What are you checking?",
                        "enum": [
                            "url",
                            "payee",
                            "message"
                        ],
                        "type": "string",
                        "description": "The kind of thing to verify.",
                        "default": "url"
                    },
                    "value": {
                        "title": "The thing to check",
                        "type": "string",
                        "description": "The URL, payee identity (UPI VPA, IBAN, GSTIN, Korea BRN, Singapore UEN, company/FI name, …), or message text to verify.",
                        "default": "https://example.com"
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
