{"uid":"cap_ok7pJjhUXPS9_9jgVVYnq","slug":"signaldesk-ai-array-group-by-d37e00bf","name":"SignalDesk AI Array Group-By","description":"Evidence-backed autonomous AI jobs and paid data tools. Queue/D1/cron run outside the chat; free quotas and bounded execution apply.","url":"https://x402-agent.kariguetoazul.workers.dev/api/json/array-group-by?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"key":{"type":"string","maxLength":128,"description":"Field name."},"values":{"type":"array","items":{},"maxItems":1000,"minItems":0,"description":"JSON array."}}},"responseSchema":{"type":"json","example":{"groups":[{"key":"a","items":[{"n":1,"kind":"a"},{"n":2,"kind":"a"}]},{"key":"b","items":[{"n":3,"kind":"b"}]}]}},"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_fXHpCBhGqIdp5wbS_AKRk","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 a JSON array of objects by a specified field name, returning partitioned groups with their matching items.","exampleAgentPrompt":"Can you group this array of sales records by the 'region' field: [{\"region\":\"north\",\"amount\":100},{\"region\":\"south\",\"amount\":200},{\"region\":\"north\",\"amount\":150}]?","exampleUseCases":[{"title":"Group product inventory by category","prompt":"I have a list of products and I need them grouped by their 'category' field — here's the array: [{\"name\":\"Widget A\",\"category\":\"hardware\"},{\"name\":\"Widget B\",\"category\":\"software\"},{\"name\":\"Widget C\",\"category\":\"hardware\"}]"},{"title":"Segment user events by type","prompt":"Take these user event logs and group them by the 'eventType' field so I can see all clicks together, all purchases together, etc.: [{\"user\":\"alice\",\"eventType\":\"click\"},{\"user\":\"bob\",\"eventType\":\"purchase\"},{\"user\":\"alice\",\"eventType\":\"purchase\"}]"},{"title":"Partition survey responses by answer","prompt":"I've got a bunch of survey responses and I want them grouped by the 'rating' field — can you partition this array: [{\"id\":1,\"rating\":\"positive\"},{\"id\":2,\"rating\":\"negative\"},{\"id\":3,\"rating\":\"positive\"},{\"id\":4,\"rating\":\"neutral\"}]?"}],"resultDescription":"Returns a JSON object containing a 'groups' array, where each element has a 'key' (the distinct value of the grouped field) and an 'items' array listing all original objects that share that key value.","failureModes":["Missing or empty 'key' field returns an error or ungrouped result","Array items that lack the specified key field may be grouped under an undefined/null bucket","Arrays exceeding 1000 items are rejected due to maxItems constraint","Malformed JSON in the values array causes a parsing error","Payment failure (402) if USDC balance is insufficient for the $0.001 per-call fee"],"whenToPreferThis":"Choose this endpoint when you need a simple, paid, on-demand group-by operation on a JSON array without setting up server-side infrastructure. Ideal for agents that need to partition up to 1000 records by a single field key in real time as part of an automated workflow, especially when integrated with x402 micropayment flows on Cloudflare Workers.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-13T00:42:09.598Z","isFirstParty":false,"canonicalSlug":"signaldesk-ai-array-group-by-d37e00bf"}