{"uid":"cap_P4AUCzdOsPZkN564pPCuM","slug":"one-engine-stable-sort-array-6e96c8b1","name":"ONE Engine Stable Sort Array","description":"Low-cost pay-per-call utility APIs for autonomous agents using x402 on Base.","url":"https://one-search.one-engine.workers.dev/v3/array/stable-sort/t8?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","required":["values"],"properties":{"size":{"type":"integer"},"other":{"type":"array","description":"Optional comparison array"},"offset":{"type":"integer"},"values":{"type":"array","description":"JSON array with at most 1000 items"}}},"responseSchema":{"type":"object","additionalProperties":true},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.01","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.01/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_wJ6A11GhmfZlXo7V6fOhA","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Sorts a JSON array of up to 1000 items using a stable sort algorithm, with optional comparison array support.","exampleAgentPrompt":"Sort this array of values [42, 7, 19, 3, 88, 15] using a stable sort and return the ordered result.","exampleUseCases":[{"title":"Sort leaderboard scores for display","prompt":"I have a list of game scores [1500, 200, 4800, 200, 900] — can you stable sort them so ties stay in their original order for the leaderboard?"},{"title":"Order product prices for ranking","prompt":"Sort these product prices [29.99, 9.99, 49.99, 9.99, 19.99] in ascending order, keeping duplicate prices in the order they appeared."},{"title":"Arrange numeric IDs for processing","prompt":"I need to process these IDs in sorted order: [1042, 37, 512, 37, 888, 100] — stable sort them so duplicate IDs maintain their original sequence."}],"resultDescription":"Returns a JSON object containing the stably-sorted array, preserving the relative order of equal elements as they appeared in the input.","failureModes":["Input array exceeds 1000 items — request rejected","Invalid or non-array values field — schema validation error","Payment not provided or insufficient USDC — 402 payment required","Malformed JSON body — 400 bad request","Network timeout on Cloudflare Worker — 5xx error"],"whenToPreferThis":"Choose this endpoint when you need a guaranteed stable sort (preserving relative order of equal elements) on a JSON array of up to 1000 items via a lightweight pay-per-call API, especially in agentic workflows on Base where x402 micropayments are already supported. Prefer it over building your own sort when you want deterministic, server-side computation without managing infrastructure.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-02T12:44:05.457Z","isFirstParty":false,"canonicalSlug":"one-engine-stable-sort-array-980781c7"}