{
  "openapi": "3.0.1",
  "info": {
    "title": "CSV Diff & Reconciliation – Compare Two CSV Exports by Key",
    "description": "Compare two CSV exports by key and get one row per difference: mismatched fields, rows missing on either side, duplicate and blank keys. Explicit column mapping, composite keys, every row accounted for. Matches are free. No API keys.",
    "version": "0.0",
    "x-build-id": "evSz0uFJ2cK2BDffh"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/kestrelwick~csv-export-parity-auditor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-kestrelwick-csv-export-parity-auditor",
        "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/kestrelwick~csv-export-parity-auditor/runs": {
      "post": {
        "operationId": "runs-sync-kestrelwick-csv-export-parity-auditor",
        "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/kestrelwick~csv-export-parity-auditor/run-sync": {
      "post": {
        "operationId": "run-sync-kestrelwick-csv-export-parity-auditor",
        "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": [
          "leftCsv",
          "rightCsv",
          "keyPairs",
          "comparePairs"
        ],
        "properties": {
          "leftCsv": {
            "title": "Left CSV (first export)",
            "type": "string",
            "description": "Paste the first CSV export (for example your shop or CRM export), header row included. Up to 2 MiB UTF-8 and 20,000 rows. Cells are compared as exact strings.",
            "default": "order_id,email,total,status\nA-1001,ana@example.com,49.00,paid\nA-1002,ben@example.com,15.50,paid\nA-1003,cy@example.com,120.00,refunded\nA-1004,dee@example.com,8.99,paid\nA-1005,eli@example.com,64.20,paid\nA-1006,fay@example.com,30.00,paid\n,gus@example.com,12.00,paid\n"
          },
          "rightCsv": {
            "title": "Right CSV (second export)",
            "type": "string",
            "description": "Paste the second CSV export (for example your accounting or warehouse export), header row included. Same limits as the left CSV.",
            "default": "Order ID,Customer Email,Amount,Payment Status\nA-1001,ana@example.com,49.00,paid\nA-1002,ben@example.com,15.50,paid\nA-1003,cy@example.com,120.00,paid\nA-1004,dee@example.com,8.99,paid\nA-1004,dee@example.com,8.99,paid\nA-1005,eli@example.com,64.02,paid\nA-1007,hal@example.com,22.00,paid\n"
          },
          "keyPairs": {
            "title": "Key columns (left → right)",
            "minItems": 1,
            "maxItems": 8,
            "type": "array",
            "description": "1 to 8 objects mapping the key column names on each side, e.g. [{\"left\":\"order_id\",\"right\":\"Order ID\"}]. Several pairs make a composite key. Header names are exact and case-sensitive.",
            "items": {
              "type": "object",
              "required": [
                "left",
                "right"
              ],
              "additionalProperties": false,
              "properties": {
                "left": {
                  "type": "string",
                  "minLength": 1,
                  "title": "Left header",
                  "description": "Exact column name in the left CSV."
                },
                "right": {
                  "type": "string",
                  "minLength": 1,
                  "title": "Right header",
                  "description": "Exact column name in the right CSV."
                }
              }
            },
            "default": [
              {
                "left": "order_id",
                "right": "Order ID"
              }
            ]
          },
          "comparePairs": {
            "title": "Columns to compare (left → right)",
            "minItems": 1,
            "maxItems": 64,
            "type": "array",
            "description": "1 to 64 objects mapping the columns whose values must match, e.g. [{\"left\":\"total\",\"right\":\"Amount\"}]. Columns you don't list are ignored.",
            "items": {
              "type": "object",
              "required": [
                "left",
                "right"
              ],
              "additionalProperties": false,
              "properties": {
                "left": {
                  "type": "string",
                  "minLength": 1,
                  "title": "Left header",
                  "description": "Exact column name in the left CSV."
                },
                "right": {
                  "type": "string",
                  "minLength": 1,
                  "title": "Right header",
                  "description": "Exact column name in the right CSV."
                }
              }
            },
            "default": [
              {
                "left": "email",
                "right": "Customer Email"
              },
              {
                "left": "total",
                "right": "Amount"
              },
              {
                "left": "status",
                "right": "Payment Status"
              }
            ]
          },
          "delimiter": {
            "title": "Delimiter",
            "enum": [
              ",",
              ";",
              "\t"
            ],
            "type": "string",
            "description": "Field separator used by both CSVs.",
            "default": ","
          },
          "keyNormalization": {
            "title": "Key matching",
            "enum": [
              "exact",
              "trim",
              "trim_ascii_lower"
            ],
            "type": "string",
            "description": "How keys are normalized before matching. Raw values are always kept in the output.",
            "default": "exact"
          },
          "valueNormalization": {
            "title": "Value comparison",
            "enum": [
              "exact",
              "trim",
              "trim_ascii_lower"
            ],
            "type": "string",
            "description": "How compared values are normalized. No number or date parsing: 10.00 and 10 are different.",
            "default": "exact"
          },
          "includeMatches": {
            "title": "Include matching pairs",
            "type": "boolean",
            "description": "Also write one MATCH row per identical pair. MATCH rows are free.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}