{"uid":"cap_IBDSUtdtLyRbALZThG7HD","slug":"delx-commerce-json-array-group-by-key-680ceb67","name":"Delx Commerce — JSON Array Group By Key","description":"Pay-per-result APIs for agents. No signup. Exact price. Verifiable delivery. USDC on Base + Solana via x402.","url":"https://commerce.delx.ai/api/v1/x402/json-array-group-by-key?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"key":{"type":"string","maxLength":8192,"description":"Key supplied to JSON Array Group By Key; used only for this bounded calculation and processed in memory without retention."},"items":{"type":"array","items":{"type":"object","maxProperties":128,"additionalProperties":true},"maxItems":256,"description":"Items supplied to JSON Array Group By Key; used only for this bounded calculation and processed in memory without retention."}}},"responseSchema":{"type":"json","example":{"result":{"groups":[{"items":[{"id":1,"team":"a"},{"id":3,"team":"a"}],"value":"a"},{"items":[{"id":2,"team":"b"}],"value":"b"}],"group_count":2},"schema":"delx/util-json-array-group-by-key/v1","status":"pass","evidence":{"retained":false,"input_sha256":"e13f35d5b81a3f1808078d9bbb061844639be95ac142b8481906eb21ac179980","external_calls":0},"operation":"data_batch:json_array_group_by_key"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_Nf91QTji-jiJvJl49xG-H","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Groups an array of JSON objects by a specified key field, returning bucketed items and group count","exampleAgentPrompt":"I have a list of objects like [{\"id\":1,\"team\":\"a\"},{\"id\":2,\"team\":\"b\"},{\"id\":3,\"team\":\"a\"}] — can you group them by the \"team\" field so I can see all items bucketed under each team value?","exampleUseCases":[{"title":"Segment sales records by region","prompt":"I have an array of sales records each with a 'region' field — can you group them all by region so I can see which deals belong to North, South, East, and West?"},{"title":"Organize support tickets by status","prompt":"Take this list of support tickets (each has a 'status' field like 'open', 'closed', 'pending') and group them by status so I can see how many are in each bucket."},{"title":"Partition product catalog by category","prompt":"I've got a JSON array of 200 product objects, each with a 'category' property — please group them by category so I can see all electronics together, all apparel together, and so on."}],"resultDescription":"Returns a JSON object containing an array of groups, where each group has a 'value' (the distinct key value), an 'items' array (all objects sharing that key value), and a top-level 'group_count' integer. Also includes an evidence object confirming no data was retained and no external calls were made, plus a status field ('pass') and schema version string.","failureModes":["Key field not present on any items — may return empty groups or error","Items array exceeds 256-item limit — request rejected","Object in array exceeds 128-property limit — validation failure","Malformed JSON body — 400-style error","Payment not provided or insufficient USDC — 402 payment required response","Key string exceeds 8192 character limit — rejected"],"whenToPreferThis":"Choose this endpoint when you need a lightweight, stateless, pay-per-call grouping operation on a JSON array without setting up infrastructure or a database query. Ideal for agents that receive raw JSON arrays and need them partitioned by a field on-the-fly. Prefer over custom code execution when auditability matters — the response includes an evidence hash and confirms no data retention. Best for arrays up to 256 items; for larger datasets consider a database GROUP BY.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-01T00:53:56.442Z","isFirstParty":false,"canonicalSlug":"delx-commerce-json-array-group-by-key-680ceb67"}