Free plan

Split Data File

Cut a big data file into several smaller files
POST
/v1/data/split

About this tool

This tool splits one data file into several. You can set a number of rows per file, a number of files, or make one file for each value in a column, such as one per country. Every new file keeps the header row.
For example, you make one file per country from a list of customers worldwide.

How to use it

  1. Choose this tool.
  2. Add your data file with Upload or drag and drop.
  3. Choose how to split: rows per file, number of files, or by a column.
  4. Choose the format of the files, then press Generate.
  5. Download the result, a ZIP with all the files.

What you get back

You get several smaller files, usually together in one ZIP. Download it.
GOOD TO KNOW
One file in, up to 100 files out. Each result file counts as one output.
TEST IT LIVE

Try Split Data File 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/split
Tool ID
data.split
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/split" \
  -H "X-Api-Key: $DAVIX_H2I_API_KEY" \
  -F 'file=@document.pdf' \
  -F 'rows=1000' \
  -F 'parts=4' \
  -F 'by=country'

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.split({
    "file": 'document.pdf',
    "rows": 1000,
    "parts": 4,
    "by": "country"
  });
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()->split([
    'file' => 'document.pdf',
    'rows' => 1000,
    'parts' => 4,
    'by' => 'country',
]);
echo $result->requestId;
FAQ

Frequently asked questions

Cut one data file into several smaller files: a set number of rows per file, a set number of files, or one file for each value of a column. Every file keeps the header row.

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

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

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