infile
Local File
or URL
Or Data
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]"
encoding
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/xml2csv?encoding=ascii" -F "infile=@[YOUR FILE]" -H "Authorization: Token [YOUR TOKEN]"
fixed
boolean
Create fixed width output
curl -X POST "https://www.convertcsv.io/api/v1/xml2csv?fixed=1" -F "infile=@[YOUR FILE]" -H "Authorization: Token [YOUR TOKEN]"
keeppre
boolean
Keep namespace prefixes in keys or columns for XML files.
curl -X POST "https://www.convertcsv.io/api/v1/xml2csv?keeppre=1" -F "infile=@[YOUR FILE]" -H "Authorization: Token [YOUR TOKEN]"
key
string
Key value of target array in input data. By default the first repeating group is used (JSON array or XML repeating tag). See the "uselargest" option. If your JSON is not an array and you want to use the whole structure, then pass a dash -
curl -X POST "https://www.convertcsv.io/api/v1/xml2csv?key=id" -F "infile=@[YOUR FILE]" -H "Authorization: Token [YOUR TOKEN]"
noheading
boolean
Do not output CSV headers.
curl -X POST "https://www.convertcsv.io/api/v1/xml2csv?noheading=1" -F "infile=@[YOUR FILE]" -H "Authorization: Token [YOUR TOKEN]"
outdelimiter
string
Output file delimiter, i.e. : See also: outtab, outpipe, outsemi
Depending on our operating system and delimiter, you may have to quote the delimiter in the OS shell, or URL encode the delimiter if used in a query string.
curl -X POST "https://www.convertcsv.io/api/v1/xml2csv" -F "infile=@[YOUR FILE]" -F outdelimiter=":" -H "Authorization: Token [YOUR TOKEN]"
outpipe
boolean
Output delimiter is |. This is a convenience method sense | has special meaning in some command line shells. In the API query string, it is easier to use than encoding the query string. See also: outdelimiter, outtab, outsemi
curl -X POST "https://www.convertcsv.io/api/v1/xml2csv?outpipe=1" -F "infile=@[YOUR FILE]" -H "Authorization: Token [YOUR TOKEN]"
outsemi
boolean
Output delimiter is semi-colon. This is a convenience method sense semi-colon has special meaning in some command line shells. In the API query string, it is easier to use than encoding the query string. See also: outdelimiter, outtab, outpipe
curl -X POST "https://www.convertcsv.io/api/v1/xml2csv?outsemi=1" -F "infile=@[YOUR FILE]" -H "Authorization: Token [YOUR TOKEN]"
outtab
boolean
Output delimiter is Tab. This is a convenience method sense Tab is difficult to specify. See also: outdelimiter, outsemi, outpipe
curl -X POST "https://www.convertcsv.io/api/v1/xml2csv?outtab=1" -F "infile=@[YOUR FILE]" -H "Authorization: Token [YOUR TOKEN]"
padchar
string
Padding character for fixed width fields, default is space
curl -X POST "https://www.convertcsv.io/api/v1/xml2csv?padchar=%2A" -F "infile=@[YOUR FILE]" -H "Authorization: Token [YOUR TOKEN]"
password
string
Password for URL data source
curl -X POST "https://www.convertcsv.io/api/v1/xml2csv?password=bob&username=bee" -F "infile=@[YOUR FILE]" -H "Authorization: Token [YOUR TOKEN]"
quotingstyle
string
Output quoting in CSV output, N=None, M=Minimal, A=ALL. A will wrap all fields in double quotes. M will only wrap if necessary. N will not wrap with double quotes but will backslash special characters.
curl -X POST "https://www.convertcsv.io/api/v1/xml2csv?quotingstyle=A" -F "infile=@[YOUR FILE]" -H "Authorization: Token [YOUR TOKEN]"
removetags
boolean
Remove HTML tags from output
curl -X POST "https://www.convertcsv.io/api/v1/xml2csv?removetags=1" -F "infile=@[YOUR FILE]" -H "Authorization: Token [YOUR TOKEN]"
ruler
boolean
Create a ruler at the top when outputting Fixed Width. This is very useful to see column positions.
curl -X POST "https://www.convertcsv.io/api/v1/xml2csv?ruler=1" -F "infile=@[YOUR FILE]" -H "Authorization: Token [YOUR TOKEN]"
separator
string
Output separator between fields for fixed width. For instance, you may want to see a vertical bar separating fields.
curl -X POST "https://www.convertcsv.io/api/v1/xml2csv" -F "infile=@[YOUR FILE]" -F separator="|" -H "Authorization: Token [YOUR TOKEN]"
sheetname
string
Name of worksheet if outputting XLSX, default Sheet1
curl -X POST "https://www.convertcsv.io/api/v1/xml2csv?sheetname=Data" -F "infile=@[YOUR FILE]" -H "Authorization: Token [YOUR TOKEN]"
suppress
boolean
Supress line break in data
curl -X POST "https://www.convertcsv.io/api/v1/xml2csv?suppress=1" -F "infile=@[YOUR FILE]" -H "Authorization: Token [YOUR TOKEN]"
table
boolean
Generate ASCII table
curl -X POST "https://www.convertcsv.io/api/v1/xml2csv?table=1" -F "infile=@[YOUR FILE]" -H "Authorization: Token [YOUR TOKEN]"
uselargest
boolean
Choose largest array to convert. You typically will want to use "key" instead.
curl -X POST "https://www.convertcsv.io/api/v1/xml2csv?uselargest=1" -F "infile=@[YOUR FILE]" -H "Authorization: Token [YOUR TOKEN]"
username
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/xml2csv?username=johnny&password=xyz" -F "infile=https://www.xyz.com/myinputfile.csv" -H "Authorization: Token [YOUR TOKEN]"
width
string
If using -F, Field widths corresponding to output columns, ex. 5,20,10
curl -X POST "https://www.convertcsv.io/api/v1/xml2csv?width=5,20,10" -F "infile=@[YOUR FILE]" -H "Authorization: Token [YOUR TOKEN]"
xlsx
boolean
Generate Excel
curl -X POST "https://www.convertcsv.io/api/v1/xml2csv?xlsx=1" -F "infile=@[YOUR FILE]" -H "Authorization: Token [YOUR TOKEN]"