{
  "openapi": "3.0.1",
  "info": {
    "title": "CSV & JSON Reconciliation — Conflicts and Field Differences",
    "description": "Compare caller-owned CSV, JSON or selected Apify datasets by exact keys. Deliver complete per-key differences and source-row lineage; isolate duplicate and missing keys without fuzzy merging.",
    "version": "0.1",
    "x-build-id": "PSHyEISZr6jbZNDu4"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/natstandridge~dataset-reconciliation/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-natstandridge-dataset-reconciliation",
        "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/natstandridge~dataset-reconciliation/runs": {
      "post": {
        "operationId": "runs-sync-natstandridge-dataset-reconciliation",
        "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/natstandridge~dataset-reconciliation/run-sync": {
      "post": {
        "operationId": "run-sync-natstandridge-dataset-reconciliation",
        "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": {
          "leftRows": {
            "title": "Left JSON rows",
            "maxItems": 10000,
            "type": "array",
            "description": "Flat JSON objects. Choose exactly one JSON, CSV or dataset source on this side. Empty arrays are valid; preserve strings, booleans, null and numbers without coercion."
          },
          "leftCsv": {
            "title": "Left pasted CSV",
            "maxLength": 3145728,
            "type": "string",
            "description": "UTF-8 CSV text with unique headers and consistent row widths; all cells remain strings. Remove the JSON rows field when choosing CSV."
          },
          "leftDatasetId": {
            "title": "Left Apify dataset",
            "pattern": "^[A-Za-z0-9]{17}$",
            "type": "string",
            "description": "Select an existing complete dataset with flat rows; READ-only scoped access. Use an exact 17-character dataset ID, never a URL or token. Remove the JSON rows field on this side."
          },
          "rightRows": {
            "title": "Right JSON rows",
            "maxItems": 10000,
            "type": "array",
            "description": "Flat JSON objects. Choose exactly one JSON, CSV or dataset source on this side. Empty arrays are valid; preserve strings, booleans, null and numbers without coercion."
          },
          "rightCsv": {
            "title": "Right pasted CSV",
            "maxLength": 3145728,
            "type": "string",
            "description": "UTF-8 CSV text with unique headers and consistent row widths; all cells remain strings. Remove the JSON rows field when choosing CSV."
          },
          "rightDatasetId": {
            "title": "Right Apify dataset",
            "pattern": "^[A-Za-z0-9]{17}$",
            "type": "string",
            "description": "Select an existing complete dataset with flat rows; READ-only scoped access. Use an exact 17-character dataset ID, never a URL or token. Remove the JSON rows field on this side."
          },
          "keyFields": {
            "title": "Composite key fields (left names)",
            "minItems": 1,
            "maxItems": 4,
            "uniqueItems": true,
            "type": "array",
            "description": "One to four exact left/canonical field names. Right field names use fieldMappings. Duplicate-key groups are ambiguous; missing/null/empty components are uncharged invalid rows.",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            },
            "default": [
              "id"
            ]
          },
          "fieldMappings": {
            "title": "Left-to-right field mappings",
            "maxItems": 64,
            "type": "array",
            "description": "Optional one-to-one mappings. Unmapped names compare identically named fields; overlapping mapped/fallback targets are rejected.",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "left",
                "right"
              ],
              "properties": {
                "left": {
                  "title": "Left field",
                  "description": "Canonical field name in the left table.",
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 128
                },
                "right": {
                  "title": "Right field",
                  "description": "Corresponding field name in the right table.",
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 128
                }
              }
            }
          },
          "compareFields": {
            "title": "Fields to compare (optional)",
            "maxItems": 64,
            "uniqueItems": true,
            "type": "array",
            "description": "Omit to compare the union of all non-key fields. Explicit [] compares keys only. Names are left/canonical names. Full evidence is retained for all selected fields.",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            }
          },
          "keyNormalization": {
            "title": "Opt-in key text normalization",
            "maxItems": 3,
            "uniqueItems": true,
            "type": "array",
            "description": "Strings only, fixed order: Unicode NFC, trim, casefold. Default preserves exact text. Normalization collisions remain ambiguous; no fuzzy or numeric coercion.",
            "items": {
              "type": "string",
              "enum": [
                "unicode_nfc",
                "trim",
                "casefold"
              ]
            },
            "default": []
          },
          "valueNormalization": {
            "title": "Opt-in comparison text normalization",
            "maxItems": 3,
            "uniqueItems": true,
            "type": "array",
            "description": "Same explicit string-only rules for compared values. Original typed values remain in lineage. Numeric types, booleans, missing and null are never coerced.",
            "items": {
              "type": "string",
              "enum": [
                "unicode_nfc",
                "trim",
                "casefold"
              ]
            },
            "default": []
          },
          "includeMatched": {
            "title": "Include matched keys",
            "type": "boolean",
            "description": "Matched keys are useful completed checks and billed when delivered. Disable to return only differences, one-sided keys and ambiguous groups; skipped matches are free.",
            "default": true
          },
          "csvDelimiter": {
            "title": "CSV delimiter",
            "enum": [
              ",",
              ";",
              "\t"
            ],
            "type": "string",
            "description": "Explicit delimiter for both pasted CSV inputs; no heuristic dialect guessing.",
            "default": ","
          },
          "maxResults": {
            "title": "Maximum delivered key records",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Deterministic ordered prefix. Source tables are fully loaded and reconciled first; limits never manufacture absent records. Limits produce complete=false.",
            "default": 100
          },
          "maxRunSeconds": {
            "title": "Work deadline (seconds)",
            "minimum": 40,
            "maximum": 180,
            "type": "integer",
            "description": "Includes source reads and delivery. Core computation is bounded to 30 seconds, with 25 seconds reserved for frozen-plan storage and delivery.",
            "default": 120
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}