{
  "openapi": "3.0.1",
  "info": {
    "title": "HTTP Receipt: Prove a Write Landed (Read-Back + Control)",
    "description": "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.",
    "version": "0.1",
    "x-build-id": "dmsp0QurEyhdJUemi"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/geeky_goth_gamer~http-receipt/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-geeky_goth_gamer-http-receipt",
        "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/geeky_goth_gamer~http-receipt/runs": {
      "post": {
        "operationId": "runs-sync-geeky_goth_gamer-http-receipt",
        "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/geeky_goth_gamer~http-receipt/run-sync": {
      "post": {
        "operationId": "run-sync-geeky_goth_gamer-http-receipt",
        "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",
        "properties": {
          "mode": {
            "title": "Mode",
            "enum": [
              "write-and-verify",
              "verify",
              "reproduce"
            ],
            "type": "string",
            "description": "write-and-verify sends the write exactly once (never retried). verify and reproduce only read.",
            "default": "verify"
          },
          "readBack": {
            "title": "Read-back URL",
            "type": "string",
            "description": "Public URL anyone can re-read without credentials. In write-and-verify mode, {id} is replaced with the id from the write response."
          },
          "expectContains": {
            "title": "Expected text in the read-back",
            "type": "array",
            "description": "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.",
            "items": {
              "type": "string"
            }
          },
          "control": {
            "title": "Control URL (optional)",
            "type": "string",
            "description": "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": {
            "title": "Write request (write-and-verify)",
            "type": "object",
            "description": "{\"method\":\"POST\",\"url\":\"https://...\",\"headers\":{...},\"body\":{...} or \"text\"}. Put credentials in authHeader, not here."
          },
          "authHeader": {
            "title": "Auth header for the write (secret)",
            "type": "string",
            "description": "e.g. \"Authorization: Bearer ...\" or \"X-Api-Key: ...\". Sent ONLY with the write, stored encrypted, never echoed in the receipt."
          },
          "idFrom": {
            "title": "Where the new id is (write-and-verify)",
            "type": "string",
            "description": "\"auto\" (Location header, then id / data.id / ...), \"location\", or \"json:path.to.id\".",
            "default": "auto"
          },
          "expect": {
            "title": "Expected row (reproduce)",
            "type": "object",
            "description": "{\"status\":404,\"bytes\":29,\"sha256\":\"93ff1fff\"}: any of the three; a sha256 prefix of 8+ hex characters is enough."
          },
          "checks": {
            "title": "Batch of checks (optional)",
            "type": "array",
            "description": "Up to 10 check objects with the same fields as above (mode, readBack, write, control, expectContains, expect, label). Overrides the single check."
          },
          "readAttempts": {
            "title": "Read attempts",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "1-5 read-only attempts while the read-back is not found yet (lagging venues). The write is never repeated.",
            "default": 2
          },
          "readDelaySecs": {
            "title": "Delay between read attempts (s)",
            "minimum": 0,
            "maximum": 30,
            "type": "integer",
            "description": "Delay between read attempts (s).",
            "default": 2
          },
          "followRedirects": {
            "title": "Follow redirects",
            "type": "boolean",
            "description": "Off by default so a 301 into an HTML page is reported, not silently followed. Every hop is recorded either way.",
            "default": false
          },
          "userAgent": {
            "title": "User-Agent",
            "type": "string",
            "description": "Explicit User-Agent (some CDNs block empty ones). Default identifies http-receipt."
          },
          "timeoutSecs": {
            "title": "Timeout per request (s)",
            "minimum": 3,
            "maximum": 60,
            "type": "integer",
            "description": "Timeout per request (s).",
            "default": 20
          }
        }
      },
      "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}