POST
data
csv_columns
1 creditExtract, reorder, or rename columns from CSV
Endpoint
POST /api/v1/tools/data/csv_columns
Body Parameters
text
string
required
header
boolean
optional
default: true
rename
object | null
optional
default: null
columns
array
required
delimiter
string
optional
default: ","
Example
input
Request
{
"text": "name,age,city\nAlice,30,NYC\nBob,25,LA",
"columns": [
"name",
"city"
]
}
output
Response
{
"result": "name,city\nAlice,NYC\nBob,LA\n",
"columns": [
"name",
"city"
]
}
Response Format
HTTP/1.1 200 OK
SUCCESS
{
"success": true,
"data": {
"result": "name,city\nAlice,NYC\nBob,LA\n",
"columns": [
"name",
"city"
]
},
"meta": {
"tool": "csv_columns",
"credits_consumed": 1
}
}
HTTP/1.1 422 Unprocessable Entity
ERROR
{
"success": false,
"data": null,
"error": {
"code": "validation_error",
"message": "The given data was invalid."
}
}
Sign in to try this tool directly from the docs.
Code Examples
Request Example
lightbulb
Developer Tip
Credits are deducted before execution. If the upstream tool fails, credits are automatically refunded to your account.