{
  "openapi": "3.0.1",
  "info": {
    "title": "Page & Document Semantic Diff for AI Agents",
    "description": "Compare two versions of a page or document and report only meaningful changes. Ignores timestamps, nonces, cookie banners, nav/footer boilerplate and whitespace. Elevates price, SLA, negation and watched-keyword changes. $0.003 inline or $0.006 per URL.",
    "version": "0.1",
    "x-build-id": "fxJgxuqO42UwnyBcq"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/geeky_goth_gamer~page-doc-semantic-diff/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-geeky_goth_gamer-page-doc-semantic-diff",
        "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~page-doc-semantic-diff/runs": {
      "post": {
        "operationId": "runs-sync-geeky_goth_gamer-page-doc-semantic-diff",
        "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~page-doc-semantic-diff/run-sync": {
      "post": {
        "operationId": "run-sync-geeky_goth_gamer-page-doc-semantic-diff",
        "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": {
          "action": {
            "title": "Action",
            "enum": [
              "diff",
              "snapshot"
            ],
            "type": "string",
            "description": "\"diff\" (default) compares before and after. \"snapshot\" normalises a single url or text into a canonical snapshot and SHA-256 for agents to store as a baseline. Standby routes set this for you.",
            "default": "diff"
          },
          "mode": {
            "title": "Mode",
            "enum": [
              "semantic",
              "structured",
              "strict"
            ],
            "type": "string",
            "description": "\"semantic\" (default) strips nav/footer/cookie/script boilerplate, normalises volatile noise, and diffs heading-aware sections. \"structured\" does an exact JSON-path diff (additions, removals, type/value mutations, numeric deltas). \"strict\" is a whitespace-normalised exact diff with no boilerplate or volatile stripping.",
            "default": "semantic"
          },
          "beforeText": {
            "title": "Before (inline)",
            "type": "string",
            "description": "Optional. The earlier version as text/HTML/Markdown/JSON. Do not also pass beforeUrl. Max 1,000,000 characters."
          },
          "afterText": {
            "title": "After (inline)",
            "type": "string",
            "description": "Optional. The later version as text/HTML/Markdown/JSON. Do not also pass afterUrl. Max 1,000,000 characters."
          },
          "beforeUrl": {
            "title": "Before URL",
            "type": "string",
            "description": "Optional. Public http(s) URL of the earlier version. Private, loopback and metadata addresses are rejected."
          },
          "afterUrl": {
            "title": "After URL",
            "type": "string",
            "description": "Optional. Public http(s) URL of the later version. Mix with beforeText to check a live page against a cached snapshot."
          },
          "url": {
            "title": "Snapshot URL",
            "type": "string",
            "description": "Optional, snapshot action. A single public URL to fetch and normalise."
          },
          "text": {
            "title": "Snapshot text",
            "type": "string",
            "description": "Optional, snapshot action. Inline document to normalise into a baseline."
          },
          "beforeFormat": {
            "title": "Before format",
            "enum": [
              "auto",
              "html",
              "markdown",
              "text",
              "json"
            ],
            "type": "string",
            "description": "\"auto\" (default) sniffs HTML, Markdown, JSON or text. Set this when sniffing would be wrong.",
            "default": "auto"
          },
          "afterFormat": {
            "title": "After format",
            "enum": [
              "auto",
              "html",
              "markdown",
              "text",
              "json"
            ],
            "type": "string",
            "description": "Same as beforeFormat, for the after side.",
            "default": "auto"
          },
          "watchKeywords": {
            "title": "Watch keywords",
            "type": "array",
            "description": "Optional phrases. Matches in added, removed or modified content are returned as keywordHits and elevate significance to major.",
            "items": {
              "type": "string"
            }
          },
          "ignorePatterns": {
            "title": "Ignore patterns",
            "type": "array",
            "description": "Optional regular expressions stripped from both sides before the comparison. Count, length and nested-quantifier (ReDoS) checks are enforced.",
            "items": {
              "type": "string"
            }
          },
          "ignoreVolatile": {
            "title": "Ignore volatile noise",
            "type": "boolean",
            "description": "When true (default), ISO timestamps, relative times, UUIDs, hex nonces/hashes and cache-buster query parameters are stripped before comparison.",
            "default": true
          },
          "includeSnapshots": {
            "title": "Include snapshot text",
            "type": "boolean",
            "description": "When true (default), the result includes normalised beforeSnapshot and afterSnapshot text (capped) plus sha256, wordCount and charCount. Hashes and counts are always returned.",
            "default": true
          },
          "timeoutSeconds": {
            "title": "URL timeout (seconds)",
            "minimum": 5,
            "maximum": 120,
            "type": "integer",
            "description": "Download time limit when a URL is set.",
            "default": 30
          },
          "maxFileSizeMb": {
            "title": "Max file size (MB)",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Larger downloads are rejected. Default 5 MB, maximum 20 MB.",
            "default": 5
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}