Data Transform
Chunk array API
Splits an array into fixed-size chunks (last chunk may be shorter) and reports the chunk count. Answers 'How do I batch an array into groups of N?', 'How do I paginate a list into fixed-size pages?'.
Price$0.01per request
MethodPOST
Route/v1/data-transform/chunk
StatusLive
MIME typeapplication/json
Rate limit120/minute
Cache0s public
data-transformchunkbatchsplitarraypaginatewrangle
API URL
Integration docshttps://x402.hexl.dev/v1/data-transform/chunkExample request
{
"data": [
1,
2,
3,
4,
5
],
"size": 2
}Example response
{
"result": [
[
1,
2
],
[
3,
4
],
[
5
]
],
"chunks": 3
}Input schema
{
"type": "object",
"required": [
"data",
"size"
],
"properties": {
"data": {
"type": "array",
"examples": [
[
1,
2,
3,
4,
5
]
]
},
"size": {
"type": "number",
"examples": [
2
]
}
}
}Output schema
{
"type": "object",
"additionalProperties": true
}