CSV to SQLite API Conversion

Take control of large CSV datasets and utilize SQL to explore what is within

Are you more comfortable working with databases than raw CSV files? Unlock the power of SQL queries by converting your CSV files into a SQLite database. This product is extremely unique in the marketplace. Data scientists and academics rejoice over this functionality!

  • Transforms CSV data into a SQLite.db file
  • 10+ built in parameters to help transform the data
  • API Design allows you to pass a local file, simple CSV string, or Web URL
  • Extendable to external APIs by passing credentials or OATH
  • Full Documentation and example usage

You must have an API token to call our APIs. You are automatically assigned one upon registering and confirming your email. See our tutorial: Two Methods of API Authentication and Example Use below that demonstrate passing your token to our server. You must substitute your token found in the Account page in place of [YOUR TOKEN]. Also, use your data file name instead of [YOUR FILE], i.e. invoices.csv. All conversion APIs require the infile parameter since it is the data you are converting.
Note that to read from an S3 bucket that requires authorization, you must pass both username and password parameters, and the URL must start with s3://.
There is a 200MB limit on input. You may however zip your input file and use it for infile.

Try it Now

Resulting curl command:

Parameter Value Type Description Example Use
infile


string This is the input file: raw data, or URL. Choose one of the options of "Local File", "URL", or "Data" curl -X POST "https://www.convertcsv.io/api/v1/csv2json/" -F "infile=@[YOUR FILE]" -H "Authorization: Token [YOUR TOKEN]"
string SQL table name curl -X POST "https://www.convertcsv.io/api/v1/csv2sqlite?tablename=invoice_detail" -F "infile=@[YOUR FILE]" -H "Authorization: Token [YOUR TOKEN]"
boolean Generate CREATE TABLE command curl -X POST "https://www.convertcsv.io/api/v1/csv2sqlite?createtable=1" -F "infile=@[YOUR FILE]" -H "Authorization: Token [YOUR TOKEN]"
string Input file delimiter, default is automatic detection. You usually will not need to use this. curl -X POST "https://www.convertcsv.io/api/v1/csv2sqlite?delimiter=%5E" -F "infile=@[YOUR FILE]" -H "Authorization: Token [YOUR TOKEN]"
boolean Generate DROP TABLE command - use this with caution. DROP TABLE will be generated before CREATE TABLE. curl -X POST "https://www.convertcsv.io/api/v1/csv2sqlite?droptable=1" -F "infile=@[YOUR FILE]" -H "Authorization: Token [YOUR TOKEN]"
boolean Echo SQL statement to console curl -X POST "https://www.convertcsv.io/api/v1/csv2sqlite?echo=1" -F "infile=@[YOUR FILE]" -H "Authorization: Token [YOUR TOKEN]"
string File encoding - if not passed, the converter will attempt to determine the encoding by looking at the first few thousand bytes of the file. Typical values are: utf-8, utf-16. You can see a list of all supported types here: https://docs.python.org/3/library/codecs.html curl -X POST "https://www.convertcsv.io/api/v1/csv2sqlite?encoding=ascii" -F "infile=@[YOUR FILE]" -H "Authorization: Token [YOUR TOKEN]"
string Exclude these fields in conversion. Use this if you want to convert all fields except these. curl -X POST "https://www.convertcsv.io/api/v1/csv2sqlite?exclude=5" -F "infile=@[YOUR FILE]" -H "Authorization: Token [YOUR TOKEN]"
string Include these fields in conversion. The default is to include all fields. curl -X POST "https://www.convertcsv.io/api/v1/csv2sqlite?fields=1,2,3" -F "infile=@[YOUR FILE]" -H "Authorization: Token [YOUR TOKEN]"
string Columns to create index on, i.e. 3,4. If generating SQL statements, this will generate a "CREATE INDEX" SQL statement. curl -X POST "https://www.convertcsv.io/api/v1/csv2sqlite?index=3,4" -F "infile=@[YOUR FILE]" -H "Authorization: Token [YOUR TOKEN]"
string Identify the primary key by column position (starting with 1) curl -X POST "https://www.convertcsv.io/api/v1/csv2sqlite?key=1" -F "infile=@[YOUR FILE]" -H "Authorization: Token [YOUR TOKEN]"
boolean Input CSV file has no column headings curl -X POST "https://www.convertcsv.io/api/v1/csv2sqlite?noheader=1" -F "infile=@[YOUR FILE]" -H "Authorization: Token [YOUR TOKEN]"
boolean Do not produce INSERT statements curl -X POST "https://www.convertcsv.io/api/v1/csv2sqlite?noinserts=1" -F "infile=@[YOUR FILE]" -H "Authorization: Token [YOUR TOKEN]"
string Password for URL data source curl -X POST "https://www.convertcsv.io/api/v1/csv2sqlite?password=bob&username=bee" -F "infile=@[YOUR FILE]" -H "Authorization: Token [YOUR TOKEN]"
string Username for URL data source. This is only used when URLs are the data source. See password also. curl -X POST "https://www.convertcsv.io/api/v1/csv2sqlite?username=johnny&password=xyz" -F "infile=https://www.xyz.com/myinputfile.csv" -H "Authorization: Token [YOUR TOKEN]"
boolean Input file is an Excel file with either .xlsx or .xls extension. If your column headers do not start on line 1, then use the "skiplines" option to skip to the header or data. curl -X POST "https://www.convertcsv.io/api/v1/csv2sqlite?xin=1" -F "infile=@[YOUR FILE]" -H "Authorization: Token [YOUR TOKEN]"
<

Pricing

Our Pricing

Free Test Drive

  • Product plans start at $39/month
  • Test drive ALL our API with no hassle(s)
  • Credit Card is not Required
  • Limited # of Total API calls
Custom

Unique

  • Need something more custom?
  • We can put together custom packages
  • Don't hesitate to contact us
  • We are ready to help!