{
  "openapi": "3.0.1",
  "info": {
    "title": "Dataset Diff Feed: Only New, Changed & Removed Items",
    "description": "Compares each run of your Apify dataset with the previous one, by the key fields you choose, and outputs only added, removed and changed items with field-level before/after values. Read-only access to the dataset you pick. Free demo mode.",
    "version": "0.2",
    "x-build-id": "XQpdPoOPdZoTEwtBR"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/siteverdict~siteverdict-dataset-diff-feed/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-siteverdict-siteverdict-dataset-diff-feed",
        "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/siteverdict~siteverdict-dataset-diff-feed/runs": {
      "post": {
        "operationId": "runs-sync-siteverdict-siteverdict-dataset-diff-feed",
        "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/siteverdict~siteverdict-dataset-diff-feed/run-sync": {
      "post": {
        "operationId": "run-sync-siteverdict-siteverdict-dataset-diff-feed",
        "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": {
          "datasetId": {
            "title": "Dataset to watch",
            "type": "string",
            "description": "The dataset to compare with its previous snapshot (for example the default dataset of your scraper's last run). Leave empty to run the free demo on two built-in synthetic snapshots."
          },
          "keyFields": {
            "title": "Key fields",
            "maxItems": 10,
            "type": "array",
            "description": "Field(s) that identify an item across runs, e.g. url or sku. Use dots for nested fields (offer.id). Required when a dataset is chosen. The demo uses sku.",
            "items": {
              "type": "string"
            }
          },
          "compareFields": {
            "title": "Fields to compare",
            "maxItems": 200,
            "type": "array",
            "description": "Only these fields decide whether an item changed. Leave empty to compare every top-level field except the ignored ones.",
            "items": {
              "type": "string"
            }
          },
          "ignoreFields": {
            "title": "Fields to ignore",
            "maxItems": 200,
            "type": "array",
            "description": "Fields that change on every run and should never count as a change.",
            "default": [
              "scrapedAt",
              "crawledAt",
              "timestamp",
              "loadedAt",
              "updatedAt"
            ],
            "items": {
              "type": "string"
            }
          },
          "formatting": {
            "title": "Formatting-only differences",
            "enum": [
              "standard",
              "strict",
              "loose"
            ],
            "type": "string",
            "description": "How formatting-only differences are treated. Standard (recommended) never reports whitespace, key-order or 10 vs \"10.0\" differences as changes.",
            "default": "standard"
          },
          "numericTolerance": {
            "title": "Numeric tolerance",
            "minimum": 0,
            "maximum": 1000000000,
            "type": "number",
            "description": "Numbers closer than this are treated as equal (e.g. 0.01 for prices). 0 means exact.",
            "default": 0
          },
          "emit": {
            "title": "Change types to output",
            "type": "array",
            "description": "Which change types are written to the dataset (and charged).",
            "items": {
              "type": "string",
              "enum": [
                "added",
                "removed",
                "changed"
              ]
            },
            "default": [
              "added",
              "removed",
              "changed"
            ]
          },
          "includeFullRecord": {
            "title": "Include the full item",
            "type": "boolean",
            "description": "Add the complete current item (or the stored previous values for removed items) to each change row.",
            "default": false
          },
          "schemaChangePolicy": {
            "title": "When fields appear or disappear",
            "enum": [
              "skip-fields",
              "report",
              "fail"
            ],
            "type": "string",
            "description": "What to do when a field exists in only one of the two snapshots (your scraper's output format changed).",
            "default": "skip-fields"
          },
          "monitorId": {
            "title": "Monitor name",
            "pattern": "^[a-z0-9-]{1,40}$",
            "maxLength": 40,
            "type": "string",
            "description": "Names the private state store in your account (sv-diff-<name>). Use a different name for each dataset you watch.",
            "default": "default"
          },
          "maxItems": {
            "title": "Maximum items",
            "minimum": 1,
            "maximum": 500000,
            "type": "integer",
            "description": "Safety limit on items read from the dataset. If the dataset is larger the run stops without charging or changing the baseline.",
            "default": 200000
          },
          "maxChangeRows": {
            "title": "Maximum change rows",
            "minimum": 1,
            "maximum": 500000,
            "type": "integer",
            "description": "Cap on change rows written in one run. Extra changes are counted in the summary, not written or charged.",
            "default": 100000
          },
          "webhookUrl": {
            "title": "Webhook URL (optional)",
            "type": "string",
            "description": "Public https URL (Slack-compatible) that receives a short summary when changes are found. Private and internal addresses are refused. Never logged or saved."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}