{
  "openapi": "3.0.1",
  "info": {
    "title": "Compare Two Tables - Changes & Duplicate IDs",
    "description": "Compare two CSV tables or Apify datasets. See new rows, changed values, missing rows, duplicate IDs and empty required fields. Download an Excel, CSV, JSON or HTML report. No developer fee; Apify usage costs may apply.",
    "version": "0.0",
    "x-build-id": "dud8UziLFDB7tVgvm"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/posh_brewery~crm-import-audit-snapshot-guard/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-posh_brewery-crm-import-audit-snapshot-guard",
        "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/posh_brewery~crm-import-audit-snapshot-guard/runs": {
      "post": {
        "operationId": "runs-sync-posh_brewery-crm-import-audit-snapshot-guard",
        "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/posh_brewery~crm-import-audit-snapshot-guard/run-sync": {
      "post": {
        "operationId": "run-sync-posh_brewery-crm-import-audit-snapshot-guard",
        "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",
        "required": [
          "inputMode"
        ],
        "properties": {
          "inputMode": {
            "title": "What would you like to compare?",
            "enum": [
              "demo",
              "datasets",
              "inline",
              "csv"
            ],
            "type": "string",
            "description": "Try the example without providing your own data, or choose CSV tables, Apify datasets or JSON lists. No developer fee; Apify resource costs may apply.",
            "default": "demo"
          },
          "keyFields": {
            "title": "Which column identifies each row?",
            "type": "array",
            "description": "For your own data, enter a stable column name found in both tables, such as id or productId. Add more columns for a combined ID. Repeated IDs are flagged for review. The example uses its own IDs.",
            "items": {
              "type": "string"
            }
          },
          "beforeCsv": {
            "title": "Older table - CSV text",
            "type": "string",
            "description": "Paste the older CSV, including column names in the first line. In Excel, save the sheet as CSV and paste its text here."
          },
          "afterCsv": {
            "title": "Newer table - CSV text",
            "type": "string",
            "description": "Paste the newer CSV with its column names. Only used when you choose Compare two CSV tables."
          },
          "beforeDatasetId": {
            "title": "Older Apify dataset",
            "type": "string",
            "description": "Choose the earlier dataset you are allowed to read. It is never modified. Only used in dataset mode."
          },
          "afterDatasetId": {
            "title": "Newer Apify dataset",
            "type": "string",
            "description": "Choose the later dataset you are allowed to read. It is never modified. Only used in dataset mode."
          },
          "beforeItems": {
            "title": "Older rows - JSON list",
            "type": "array",
            "description": "Paste a JSON array of row objects. Only used when you choose Paste two JSON lists.",
            "items": {
              "type": "object"
            }
          },
          "afterItems": {
            "title": "Newer rows - JSON list",
            "type": "array",
            "description": "Paste the newer rows as a JSON array. Only used in JSON-list mode.",
            "items": {
              "type": "object"
            }
          },
          "requiredFields": {
            "title": "Columns that must not be empty",
            "type": "array",
            "description": "Optional. Enter column names such as name or email. The report flags missing, null or blank values in the newer table. Zero and false are valid.",
            "items": {
              "type": "string"
            }
          },
          "compareFields": {
            "title": "Only compare these columns",
            "type": "array",
            "description": "Optional. Leave empty to compare all columns except those you choose to ignore.",
            "items": {
              "type": "string"
            }
          },
          "ignoreFields": {
            "title": "Ignore these columns",
            "type": "array",
            "description": "Optional. Skip columns that change every run, such as scrapedAt. Required-column checks still apply.",
            "items": {
              "type": "string"
            }
          },
          "numericFields": {
            "title": "Treat 100 and 100.00 as equal",
            "type": "array",
            "description": "Optional. Enter columns where plain numeric strings and numbers should compare as equal. Currency symbols and commas are not guessed.",
            "items": {
              "type": "string"
            }
          },
          "casefoldFields": {
            "title": "Ignore capital letters in these columns",
            "type": "array",
            "description": "Optional. Useful for values such as email addresses. Original values stay in the report. Avoid case-sensitive IDs.",
            "items": {
              "type": "string"
            }
          },
          "trimStrings": {
            "title": "Ignore spaces at the start and end",
            "type": "boolean",
            "description": "Ignore surrounding spaces when comparing text. Original values remain in the report. The example uses fixed rules.",
            "default": true
          },
          "includeUnchanged": {
            "title": "Include rows with no changes",
            "type": "boolean",
            "description": "Also export unchanged rows. The summary always counts them. The built-in example omits them from the row output.",
            "default": false
          },
          "maxRows": {
            "title": "Row limit for each table",
            "minimum": 1,
            "maximum": 25000,
            "type": "integer",
            "description": "Default 10,000; maximum 25,000. The run fails clearly above this limit instead of skipping rows. Each table is also limited to 16 MiB of JSON.",
            "default": 10000
          },
          "exportXlsx": {
            "title": "Create an Excel report",
            "type": "boolean",
            "description": "Also creates JSON, CSV and HTML reports. Very long Excel cells are visibly shortened; the full value stays in report.json.",
            "default": true
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}