# HTTP Receipt: Prove a Write Landed (Read-Back + Control) (`geeky_goth_gamer/http-receipt`) Actor

Prove an HTTP write actually landed: send it once, read it back on a public URL, compare with a control at an id that cannot exist, and get a SHA-256 JSON receipt with a verdict (LANDED, NOT_LANDED, CONTROL_MATCHES, UNKNOWN). $0.002 per write receipt, $0.001 per read check.

- **URL**: https://apify.com/geeky_goth_gamer/http-receipt.md
- **Developed by:** [Chris Day](https://apify.com/geeky_goth_gamer) (community)
- **Categories:** Developer tools, AI, 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 write receipt

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

## HTTP Receipt: Prove a Write Landed (Read-Back + Control)

A 201 is not a receipt. Some hosts return the new id with no Location header, some answer 200 for every id (even ones that never existed), and a plain client can follow a 301 into an HTML page without telling you. HTTP Receipt does the check agents keep re-scripting by hand:

1. **Write once** (optional): your POST/PUT/PATCH/DELETE is sent exactly once and never retried. A timed-out write is recorded as `unknown`, not failed.
2. **Read back** on a URL anyone can re-run with no credential (`{id}` is filled from the write response).
3. **Control**: the same read shape at an id the object cannot be at (derived automatically, or yours).
4. **Receipt**: deterministic JSON with method, URL, exact request bytes + SHA-256, status, response bytes + SHA-256, timestamps, redirect hops, TLS facts (protocol, issuer, leaf certificate SHA-256), `differ`, a `verdict`, the `notChecked` list, and a `receiptSha256` over the whole receipt.

| Verdict | Meaning |
|---|---|
| `LANDED` | Read-back is 2xx, differs from the control, and the expected text is present |
| `NOT_LANDED` | Read-back is 404/410 after the read attempts (re-check later if the venue has a review queue) |
| `NOT_FOUND_IN_READ_BACK` | Read-back works but your text is not in it |
| `CONTROL_MATCHES` | Read-back and control are byte-identical: this route answers the same for any id, so it proves nothing |
| `READ_BACK_OK_UNCONTROLLED` | Read-back is 2xx but there was no usable control or expected text |
| `UNKNOWN` | Read failed, timed out, was rate-limited, 5xx, 401/403 or an unfollowed redirect. Unknown is never stored as "failed" |
| `MATCH` / `MISMATCH` | reproduce mode: a recorded row (status / bytes / sha256 prefix) re-ran the same, or did not |
| `BLOCKED` | URL refused (private, local or non-web address) |

`ok` is true only for `LANDED` and `MATCH`; `allOk` covers a batch, so a script can exit non-zero when a control matches the read-back.

### Examples

Reproduce a recorded row (a CAMPFIRE control row, checked 2 Dec 2026: 404, 29 bytes, sha256 93ff1fff…):

```json
{"mode": "reproduce", "readBack": "https://agentsboard.org/api/v1/threads/999999999", "expect": {"status": 404, "bytes": 29, "sha256": "93ff1fff"}}
```

Write once, then prove it:

```json
{"mode": "write-and-verify",
 "write": {"method": "POST", "url": "https://ntfy.sh/my-topic-123", "body": "deploy 42 finished"},
 "readBack": "https://ntfy.sh/my-topic-123/json?poll=1",
 "control": "https://ntfy.sh/my-topic-123-control/json?poll=1",
 "expectContains": "deploy 42 finished"}
```

Batch: `{"checks": [ ...up to 10 check objects... ]}`.

### Connect (MCP)

```
https://mcp.apify.com/?tools=geeky_goth_gamer/http-receipt
```

- Claude Code: `claude mcp add --transport http http-receipt "https://mcp.apify.com/?tools=geeky_goth_gamer/http-receipt"`
- Cursor / VS Code / Claude Desktop `mcp.json`: `{"mcpServers": {"http-receipt": {"url": "https://mcp.apify.com/?tools=geeky_goth_gamer/http-receipt"}}}`

Sign in with your Apify account when asked (OAuth), or send `Authorization: Bearer <APIFY_TOKEN>`.

### Standby HTTP API (lowest latency)

`POST https://geeky-goth-gamer--http-receipt.apify.actor/receipt` with `Authorization: Bearer $APIFY_TOKEN` and a JSON body (same fields as the batch input). `GET /health` is free.

### Building a product on it?

Keep your own Apify token on your server, pay the per-event price, and set your own resale price. Your users never need an Apify account. Never ship the token in a client config.

### Pricing (pay per event)

| Event | Price |
|---|---|
| `receipt` | $0.002 per write-and-verify receipt (one write, up to 5 reads, one control) |
| `check` | $0.001 per read-only verify or reproduce check |
| Actor start | $0.00005 |

Invalid input, refused URLs and `/health` are free. 1,000 read checks cost $1.

### Safety and limits

- Only public http(s) on ports 80/443/8080/8443; every hop must resolve to public IPs (no localhost, private ranges or cloud metadata). Redirects are off by default and every hop is recorded.
- Credentials go in the secret `authHeader` field. It is sent only with the write, never with the read-back or control, and never appears in the receipt (header names are listed, values are not). `Authorization`/`Cookie` in plain headers are refused.
- One write per check, never retried. GET-style writes need `"allowGetWrite": true`.
- Bodies up to 2 MB are hashed (larger ones are flagged `too-large`); request bodies up to 200 KB.
- A receipt proves which bytes a URL served at a time. It does not prove who wrote them; it says so in `notChecked`.
- Use it on services you are allowed to write to. It is not a load tester or a way around rate limits.

# Actor input Schema

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

write-and-verify sends the write exactly once (never retried). verify and reproduce only read.

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

Public URL anyone can re-read without credentials. In write-and-verify mode, {id} is replaced with the id from the write response.

## `expectContains` (type: `array`):

Up to 10 strings that must appear in the read-back (raw text or any JSON string value). In write mode, the longest text in your JSON body is used if you leave this empty.

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

Same read shape at an id the object cannot be at. If empty, one is derived by swapping the trailing id for a random one.

## `write` (type: `object`):

{"method":"POST","url":"https://...","headers":{...},"body":{...} or "text"}. Put credentials in authHeader, not here.

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

e.g. "Authorization: Bearer ..." or "X-Api-Key: ...". Sent ONLY with the write, stored encrypted, never echoed in the receipt.

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

"auto" (Location header, then id / data.id / ...), "location", or "json:path.to.id".

## `expect` (type: `object`):

{"status":404,"bytes":29,"sha256":"93ff1fff"}: any of the three; a sha256 prefix of 8+ hex characters is enough.

## `checks` (type: `array`):

Up to 10 check objects with the same fields as above (mode, readBack, write, control, expectContains, expect, label). Overrides the single check.

## `readAttempts` (type: `integer`):

1-5 read-only attempts while the read-back is not found yet (lagging venues). The write is never repeated.

## `readDelaySecs` (type: `integer`):

Delay between read attempts (s).

## `followRedirects` (type: `boolean`):

Off by default so a 301 into an HTML page is reported, not silently followed. Every hop is recorded either way.

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

Explicit User-Agent (some CDNs block empty ones). Default identifies http-receipt.

## `timeoutSecs` (type: `integer`):

Timeout per request (s).

## Actor input object example

```json
{
  "mode": "verify",
  "readBack": "https://agentsboard.org/api/v1/threads/576",
  "expectContains": [
    "http-receipt"
  ],
  "idFrom": "auto",
  "readAttempts": 2,
  "readDelaySecs": 2,
  "followRedirects": false,
  "timeoutSecs": 20
}
```

# 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 = {
    "mode": "verify",
    "readBack": "https://agentsboard.org/api/v1/threads/576",
    "expectContains": [
        "http-receipt"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("geeky_goth_gamer/http-receipt").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 = {
    "mode": "verify",
    "readBack": "https://agentsboard.org/api/v1/threads/576",
    "expectContains": ["http-receipt"],
}

# Run the Actor and wait for it to finish
run = client.actor("geeky_goth_gamer/http-receipt").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 '{
  "mode": "verify",
  "readBack": "https://agentsboard.org/api/v1/threads/576",
  "expectContains": [
    "http-receipt"
  ]
}' |
apify call geeky_goth_gamer/http-receipt --silent --output-dataset

```

## MCP server setup

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

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/FgdxlG1zLMwR8Pflk/builds/dmsp0QurEyhdJUemi/openapi.json
