Data Transform
Fixed-width parse API
Parses fixed-width columnar text using [name,start,width] field specs (0-based, half-open), trimming cells by default. Answers 'How do I parse fixed-width / column-aligned records?', 'How do I read legacy mainframe-style flat files?'.
Price$0.02per request
MethodPOST
Route/v1/data-transform/fixed-width-parse
StatusLive
MIME typeapplication/json
Rate limit120/minute
Cache0s public
data-transformfixed-widthparsecolumnsflat-filetabularwrangle
API URL
Integration docshttps://x402.hexl.dev/v1/data-transform/fixed-width-parseExample request
{
"text": "AAA0042\nBBB0099",
"fields": [
{
"name": "code",
"start": 0,
"width": 3
},
{
"name": "qty",
"start": 3,
"width": 4
}
]
}Example response
{
"records": [
{
"code": "AAA",
"qty": "0042"
},
{
"code": "BBB",
"qty": "0099"
}
],
"rowCount": 2
}Input schema
{
"type": "object",
"required": [
"text",
"fields"
],
"properties": {
"text": {
"type": "string",
"examples": [
"AAA0042\nBBB0099"
]
},
"fields": {
"type": "array",
"examples": [
[
{
"name": "code",
"start": 0,
"width": 3
},
{
"name": "qty",
"start": 3,
"width": 4
}
]
]
}
}
}Output schema
{
"type": "object",
"additionalProperties": true
}