{"uid":"cap_N86inV5rM0OwTFWjMkh-E","slug":"one-engine-array-sort-d8a8e21b","name":"ONE Engine Array Sort","description":"Low-cost pay-per-call utility APIs for autonomous agents using x402 on Base.","url":"https://one-search.one-engine.workers.dev/v1/array/sort?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"order":{"enum":["asc","desc"],"type":"string"},"values":{"type":"array","description":"Array containing only numbers or only strings, maximum 1000 items"}}},"responseSchema":{"type":"json","example":{"count":4,"values":[1,2,3,4]}},"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_8gdMxrBHQEYwibi-RLGRH","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":"Sorts an array of up to 1000 numbers or strings in ascending or descending order","exampleAgentPrompt":"Sort these numbers in ascending order: [42, 7, 100, 3, 56]. Give me the full sorted list back.","exampleUseCases":[{"title":"Leaderboard score ranking","prompt":"I have a list of player scores — [8800, 3200, 15000, 4700, 9900] — can you sort them from highest to lowest so I can display a leaderboard?"},{"title":"Alphabetical name ordering","prompt":"Sort these product names alphabetically in ascending order: ['Zinc Bolt', 'Amber Plate', 'Mercury Ring', 'Bronze Pin']."},{"title":"Cheapest-first price sorting","prompt":"I've got a list of prices from different vendors — [19.99, 5.49, 12.00, 8.75, 22.50] — sort them ascending so I can pick the cheapest option first."}],"resultDescription":"A JSON object containing the sorted array under the 'values' key and a 'count' field indicating the number of items in the array.","failureModes":["Mixed types in array (numbers and strings together) cause a validation error","Array exceeds 1000 items — request is rejected","Invalid 'order' value (anything other than 'asc' or 'desc') causes an error","Payment failure via x402 results in a 402 response and the sort is not performed","Empty array may return an empty result or an error depending on implementation"],"whenToPreferThis":"Choose this endpoint when an autonomous agent needs a simple, stateless array sort as a utility step in a pipeline, especially when running in a serverless or lightweight context where importing a sort library is impractical or when the x402 micropayment model fits the cost structure. Ideal for agents that process heterogeneous data and need a reliable, low-cost sort primitive without spinning up compute infrastructure.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-02T12:44:27.183Z","isFirstParty":false,"canonicalSlug":"one-engine-array-sort-d8a8e21b"}