The bit.io Developer Hub

Welcome to the bit.io developer hub. You'll find comprehensive guides and documentation to help you start working with bit.io as quickly as possible, as well as support if you get stuck. Let's jump right in!

Get Started    

Upload Data

How to upload your datasets to bit.io

There are a few ways you can import your data into bit.io.

On the Web

Just drag and drop a file anywhere on the page or click "choose file" at the top to launch a file picker.

You can create a new repo for the file, add a new table to an existing repo, or append the data to an existing table (if the schema matches)

Note: if you're not logged in, you may only have one trial repo.

Example datasets

If you'd like to try uploading some data but don't have any handy, try using one of our example datasets. Here are a few links in different formats to a dataset that contains sales data for over 16,000 video games:

Over REST

You can POST a file to us. You'll need:

  • $TOKEN - an authentication token, which you can get from clicking "Connect" after you've logged in.
  • $PATH_TO_FILE - the path to the file you want to upload on your local filesystem,
  • $USERNAME - the username of the owner of the repo.
  • $REPO_NAME - the name of the repo.
  • $TABLE_NAME - the name of the table to upload the data to. If this table does not exist, it will be created.
curl -i -X POST \
  --header 'Authorization: Bearer $TOKEN' \
  --header "Content-Disposition: attachment;filename='name'" \
  --data-binary @"$PATH_TO_FILE" \
  https://import.bit.io/$USERNAME/$REPO_NAME/$TABLE_NAME/
import requests

with open("$PATH_TO_FILE", 'rb') as f:
    data = f.read()

url = 'https://import.bit.io/$USERNAME/$REPO_NAME/$TABLE_NAME'

headers = {
    "Content-Disposition": "attachment;filename='test.csv'",
    "Authorization": "Bearer $TOKEN"
}

response = requests.request("POST", url, headers=headers, data=data)
const fetch = require('node-fetch');
let fs = require('fs');

const url = 'https://import.bit.io/$USERNAME/$REPO_NAME/$TABLE_NAME';
let stream = fs.readFileSync("$PATH_TO_FILE");

const options = {
    method: 'POST',
    headers: {
        Authorization: 'Bearer $TOKEN',
        'Content-Disposition': 'attachment;filename="video-game-sales.csv"'
    },
    body: stream
}

Note: the filename='name' parameter in Content-Disposition is currently required but not used.

By Email

  1. Go to Repo Settings by clicking the settings gear in the top right of a Repo for which you are an owner or an admin.
  2. Next to "Import Endpoints", click "+ Create New"
  3. Provide a name for the endpoint.
  4. Specify a new or existing table as the destination for the uploaded file.
  5. Specify Email as the type of the endpoint. Note: you can also specify REST to create an HTTP address to which you can POST files to, or DB to create a Postgres connection address.
  6. Endpoints expire after a certain number of uses, or at a date in the future. Choose one or both expiration types. If you choose multiple expiration types, the endpoint will expire at the sooner of when all uses are used, and the expiration time.
  7. Click on the endpoint name in the left column of your repo page to see the email connection string.
  8. Email a CSV, JSON, or Excel file as an attachment in an email to this email address.

Through a Client

Once you connect a database client to bit.io, you can upload data by making a SQL "INSERT INTO" or "COPY FROM" query.

Upload Timeouts

During a system update, an import job will expire in 5 minutes. Users will not be notified but the job should be retried. The vast majority of import jobs complete in under one minute, so this will not affect most users.

Updated about a month ago



Upload Data


How to upload your datasets to bit.io

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.