Free plan

Merge Data Files

Combine several data files into one, stacked or matched by a column
POST
/v1/data/merge

About this tool

This tool joins two or more data files into one. You can stack them so rows go one under another, or match them by a shared column, like a lookup. Matching can keep only rows found in both files, or keep every row from one side or both. You can write the result in many formats.
For example, you add customer names to a list of orders using the customer number in both files.

How to use it

  1. Choose this tool.
  2. Add two or more files with Upload or drag and drop.
  3. Choose whether to stack the rows or match them on a column, and name the column.
  4. Choose the format of the result, then press Generate.
  5. Download the combined file.

What you get back

You get one new file with the combined data. Download it.
GOOD TO KNOW
Several files in, one file out. This endpoint does not support async jobs.
TEST IT LIVE

Try Merge 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/merge
Tool ID
data.merge
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/merge" \
  -H "X-Api-Key: $DAVIX_H2I_API_KEY" \
  -F 'files=@document.pdf' \
  -F 'to=xlsx' \
  -F 'mode=append' \
  -F 'join_type=inner'

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.merge({
    "files": 'document.pdf',
    "to": "xlsx",
    "mode": "append",
    "join_type": "inner"
  });
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()->merge([
    'files' => 'document.pdf',
    'to' => 'xlsx',
    'mode' => 'append',
    'join_type' => 'inner',
]);
echo $result->requestId;
FAQ

Frequently asked questions

Combine two or more data files (any readable formats): append their rows (columns are united), or join them on key columns (inner, left, right, outer). Writes one file in any writable format.

Merge Data Files accepts XLSX, ODS, MD, HTML, XLS, CSV, JSON, XML, TSV, NDJSON, YAML, TOML and 3 more. You can send several files in one request.

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

Send a POST request to /v1/data/merge 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.