{
  "openapi": "3.0.1",
  "info": {
    "title": "Visual Regression & Screenshot Diff for AI Agents",
    "description": "Compare two web pages (production vs preview, before vs after a deploy) on desktop and phone sizes: percent of pixels changed, changed regions as boxes, a diff image and PASS or FAIL. Visual regression testing for AI agents and MCP. $0.005 per page pair per viewport.",
    "version": "0.1",
    "x-build-id": "JsGaPet7R9FrPo6Eo"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/fluidfaith~visual-diff-gate/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-fluidfaith-visual-diff-gate",
        "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/fluidfaith~visual-diff-gate/runs": {
      "post": {
        "operationId": "runs-sync-fluidfaith-visual-diff-gate",
        "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/fluidfaith~visual-diff-gate/run-sync": {
      "post": {
        "operationId": "run-sync-fluidfaith-visual-diff-gate",
        "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": {
          "pairs": {
            "title": "Page pairs",
            "type": "array",
            "description": "List of {\"baseline\": url, \"candidate\": url, \"name\": optional label}. Up to 100 pairs. Only public web addresses: localhost, private networks and internal hosts are refused."
          },
          "baselineOrigin": {
            "title": "Baseline site (optional)",
            "type": "string",
            "description": "Shortcut for many pages: the reference site, for example https://www.yoursite.com. Used with \"Candidate site\" and \"Paths\"; each path becomes one pair."
          },
          "candidateOrigin": {
            "title": "Candidate site (optional)",
            "type": "string",
            "description": "The new version of the same site, for example a preview deploy https://my-branch.yoursite.pages.dev."
          },
          "paths": {
            "title": "Paths (with the two sites)",
            "type": "array",
            "description": "Paths compared on both sites, each starting with \"/\". Default: just the home page.",
            "default": [
              "/"
            ],
            "items": {
              "type": "string"
            }
          },
          "viewports": {
            "title": "Viewports",
            "maxItems": 10,
            "type": "array",
            "description": "Screen sizes to compare on. Presets: Desktop (1440x900), Laptop (1280x800), Tablet (820x1180), iPhone 15-16 (393), iPhone 17-18 Pro (402), iPhone 18 Pro Max (440), Galaxy S (360), Pixel (412). Or any size written like 1024x768. Each viewport is billed separately.",
            "default": [
              "Desktop",
              "iPhone 15-16"
            ],
            "items": {
              "type": "string"
            }
          },
          "maxDiffPercent": {
            "title": "Allowed change (%)",
            "minimum": 0,
            "maximum": 100,
            "type": "number",
            "description": "FAIL when more than this percent of pixels changed. 0.2 by default: a few changed words pass, a moved section fails. Use 0 to fail on any changed pixel.",
            "default": 0.2
          },
          "pixelThreshold": {
            "title": "Colour sensitivity",
            "minimum": 0,
            "maximum": 1,
            "type": "number",
            "description": "How different two pixels must be to count as changed, from 0 (any difference) to 1. 0.1 by default, which ignores tiny colour noise.",
            "default": 0.1
          },
          "fullPage": {
            "title": "Full page",
            "type": "boolean",
            "description": "Compare the whole scrolling page (up to the maximum height). Turn off to compare only the first screen.",
            "default": true
          },
          "maxPageHeight": {
            "title": "Maximum page height (px)",
            "minimum": 500,
            "maximum": 20000,
            "type": "integer",
            "description": "Pages taller than this are compared from the top down to this height.",
            "default": 8000
          },
          "maskSelectors": {
            "title": "Mask these elements",
            "type": "array",
            "description": "CSS selectors of parts that change on every load (dates, carousels, ads, live counters). They are painted over in both screenshots so they never count as changed.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "hideSelectors": {
            "title": "Hide these elements",
            "type": "array",
            "description": "CSS selectors made invisible before the screenshot, for example cookie banners or chat widgets.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "waitAfterLoadMs": {
            "title": "Extra wait after load (ms)",
            "minimum": 0,
            "maximum": 15000,
            "type": "integer",
            "description": "Time for late scripts and fonts after the load event, before the screenshot.",
            "default": 800
          },
          "navigationTimeoutSecs": {
            "title": "Page load timeout (seconds)",
            "minimum": 5,
            "maximum": 120,
            "type": "integer",
            "description": "How long to wait for each page. A page that never arrives makes that comparison ERROR, which is not charged.",
            "default": 45
          },
          "saveImages": {
            "title": "Save images",
            "type": "boolean",
            "description": "Save the diff image and both screenshots (PNG) to the key-value store and return their links.",
            "default": true
          },
          "maxConcurrency": {
            "title": "Pairs in parallel",
            "minimum": 1,
            "maximum": 3,
            "type": "integer",
            "description": "How many pairs are compared at the same time (each opens two pages).",
            "default": 2
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Optional Apify proxy for sites that block data-center traffic."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}