Free plan

Compare Data Files

Find what changed between two versions of a data file
POST
/v1/data/diff

About this tool

This tool compares two tables, an older and a newer one, and lists the rows that were added, removed or changed. For changed rows it shows the old and new value of each field. Tell it which column identifies a row, such as an ID. Without one, whole rows are compared. The files are not changed.
For example, you compare last month and this month customer lists to see who is new and who changed their address.

How to use it

  1. Choose this tool.
  2. Add the first (older) file with Upload or drag and drop.
  3. Add the second (newer) file in the second slot.
  4. Enter the key column that identifies each row, if there is one, then press Generate.
  5. Read or download the list of differences.

What you get back

You get a list of added, removed and changed rows, with the old and new values. Download it as a file.
TEST IT LIVE

Try Compare Data Files in the Studio

One click opens the Studio with this tool already selected. Add your file and see the result in seconds.
Open in the Studio
Family
Data
Plan
Free
Method
POST
Endpoint
/v1/data/diff
Tool ID
data.diff
Authentication
API key
Accepts
XLSX, ODS, MD, HTML, XLS, CSV +9 more
Background jobs
Yes
Usage group
Data
For developers

Use it from your code

cURL

curl -X POST "https://app.h2i.davixlabs.io/v1/data/diff" \
  -H "X-Api-Key: $DAVIX_H2I_API_KEY" \
  -F 'file=@document.pdf' \
  -F 'other=@photo.jpg' \
  -F 'key=example' \
  -F 'sheet=example' \
  -F 'flatten=true'

Node.js

const { DavixH2I } = require('@davixlabs/h2i-sdk');

const h2i = new DavixH2I({ apiKey: process.env.DAVIX_H2I_API_KEY, baseUrl: process.env.DAVIX_H2I_URL });
const result = await h2i.data.diff({
    "file": 'document.pdf',
    "other": 'photo.jpg',
    "key": "example",
    "sheet": "example",
    "flatten": true
  });
console.log(result.data, result.requestId);

PHP

<?php
require 'vendor/autoload.php';

$h2i = new \Davix\H2I\Client(['apiKey' => getenv('DAVIX_H2I_API_KEY'), 'baseUrl' => getenv('DAVIX_H2I_URL')]);
$result = $h2i->data()->diff([
    'file' => 'document.pdf',
    'other' => 'photo.jpg',
    'key' => 'example',
    'sheet' => 'example',
    'flatten' => true,
]);
echo $result->requestId;
FAQ

Frequently asked questions

Find the differences between two files: rows added, removed or changed (with the old and new value of each changed field) and the columns that differ. Rows are matched by key columns, or compared as whole rows when no key is given.

Compare Data Files accepts XLSX, ODS, MD, HTML, XLS, CSV, JSON, XML, TSV, NDJSON, YAML, TOML and 3 more. Send one file per request.

Compare Data Files is included in every plan, including Free. Each run uses credits from your monthly allowance.

Send a POST request to /v1/data/diff with your API key in the X-Api-Key header. Official SDKs for Node.js, Python, PHP, Go, Java, .NET and Ruby do the same for you, and the code box on this page shows ready-to-copy examples. For large work it can also run as a background job, so your request returns straight away.