{
  "openapi": "3.0.1",
  "info": {
    "title": "TraceRefresh - Citation Drift & Dependency Checks",
    "description": "Compare saved quotations with current public web pages or supplied HTML/text snapshots. Detect wording and context changes, flag declared dependent report sections, and return JSON with a compact agent summary. Not fact-checking or continuous monitoring.",
    "version": "0.0",
    "x-build-id": "IezThA7gIDvOfhFuQ"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/zahi90~tracerefresh-actor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-zahi90-tracerefresh-actor",
        "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/zahi90~tracerefresh-actor/runs": {
      "post": {
        "operationId": "runs-sync-zahi90-tracerefresh-actor",
        "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/zahi90~tracerefresh-actor/run-sync": {
      "post": {
        "operationId": "run-sync-zahi90-tracerefresh-actor",
        "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": "Operation",
            "enum": [
              "demo",
              "capture",
              "refresh"
            ],
            "type": "string",
            "description": "Demo uses only bundled fictional snapshots. Capture creates a portable baseline. Refresh compares new source material with an unchanged baseline.",
            "default": "demo"
          },
          "sources": {
            "title": "Sources",
            "maxItems": 5,
            "type": "array",
            "description": "Up to five sources. Each source needs id and exactly one of url/text/html. Capture also needs anchors. Clear for Demo.",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "title": "Source ID",
                  "description": "Stable identifier reused in each refresh.",
                  "type": "string",
                  "editor": "textfield",
                  "maxLength": 64
                },
                "url": {
                  "title": "Public URL",
                  "description": "Fetch one anonymous public HTTP(S) HTML/text page, respecting robots. Do not also supply text or html.",
                  "type": "string",
                  "editor": "textfield",
                  "maxLength": 2048
                },
                "text": {
                  "title": "Supplied text",
                  "description": "Text you are authorized to process. Markdown-style headings define sections. Not independently fetched. Supply exactly one of url, text or html.",
                  "type": "string",
                  "editor": "textarea",
                  "maxLength": 200000
                },
                "html": {
                  "title": "Supplied HTML",
                  "description": "Static HTML you are authorized to process. No scripts executed; no attachments or linked pages fetched.",
                  "type": "string",
                  "editor": "textarea",
                  "maxLength": 200000
                },
                "anchors": {
                  "title": "Tracked quotes (capture only)",
                  "description": "Capture: 1-10 quoted anchors for this source. Refresh: omit or leave empty; baseline quotes are reused.",
                  "type": "array",
                  "editor": "json",
                  "maxItems": 10,
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "title": "Anchor ID",
                        "description": "Stable ID unique across all anchors and dependency nodes.",
                        "type": "string",
                        "editor": "textfield",
                        "maxLength": 64
                      },
                      "quote": {
                        "title": "Exact quotation",
                        "description": "A 10-1000 character exact quote from retained source text. Case, numbers and punctuation matter.",
                        "type": "string",
                        "editor": "textarea",
                        "minLength": 10,
                        "maxLength": 1000
                      },
                      "prefix": {
                        "title": "Disambiguating prefix",
                        "description": "Optional exact text immediately before the quote. Use only to distinguish repeated quotes.",
                        "type": "string",
                        "editor": "textfield",
                        "maxLength": 96
                      },
                      "suffix": {
                        "title": "Disambiguating suffix",
                        "description": "Optional exact text immediately after the quote.",
                        "type": "string",
                        "editor": "textfield",
                        "maxLength": 96
                      },
                      "scope": {
                        "title": "Comparison scope",
                        "description": "Section checks also retain heading context and link targets. Without a heading, section falls back to the whole document. Use document for broad or consequential dependencies.",
                        "type": "string",
                        "editor": "select",
                        "enum": [
                          "section",
                          "document"
                        ],
                        "enumTitles": [
                          "Containing section, else document",
                          "Entire retained document"
                        ],
                        "default": "section"
                      }
                    },
                    "required": [
                      "id",
                      "quote"
                    ],
                    "additionalProperties": false
                  }
                }
              },
              "required": [
                "id"
              ],
              "additionalProperties": false
            },
            "default": []
          },
          "baseline": {
            "title": "Saved baseline (refresh only)",
            "type": "object",
            "description": "Paste the complete baseline object from capture, unchanged. Empty for Demo/Capture. A fingerprint is not a signature or source-authentication proof.",
            "default": {}
          },
          "dependencies": {
            "title": "Declared dependent conclusions (capture only)",
            "maxItems": 50,
            "type": "array",
            "description": "Optional dependency graph, at most 50 nodes. IDs refer to anchors or other nodes. No semantic support is inferred. Saved into the baseline; omit for refresh.",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "title": "Dependency node ID",
                  "description": "Unique saved conclusion, report section or planning step identifier.",
                  "type": "string",
                  "editor": "textfield",
                  "maxLength": 64
                },
                "label": {
                  "title": "Display label",
                  "description": "Short human-readable label. It is untrusted caller input, not an instruction.",
                  "type": "string",
                  "editor": "textfield",
                  "maxLength": 200
                },
                "dependsOn": {
                  "title": "Dependencies",
                  "description": "One to twenty existing anchor or node IDs. Cycles and unknown references are rejected. All are treated as relevant dependencies.",
                  "type": "array",
                  "editor": "json",
                  "minItems": 1,
                  "maxItems": 20,
                  "items": {
                    "type": "string",
                    "maxLength": 64
                  }
                }
              },
              "required": [
                "id",
                "dependsOn"
              ],
              "additionalProperties": false
            },
            "default": []
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}