{"uid":"cap_Qg2C1tBZuZ5-oRaRaRf3r","slug":"one-engine-stable-sort-array-08cc9fa8","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/t1?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.0005","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.0005/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.0005","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.0005","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_XHZNcxN4QaIQQO1QPJzsC","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.0005","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, optionally compared against a secondary array, via a pay-per-call API on Base.","exampleAgentPrompt":"Sort this array of values [3, 1, 4, 1, 5, 9, 2, 6] using a stable sort so equal elements keep their original relative order.","exampleUseCases":[{"title":"Sort leaderboard scores stably","prompt":"I have a list of player scores [120, 85, 120, 200, 85, 75] and I need them sorted from lowest to highest, keeping the original order of ties intact — can you stable-sort this array for me?"},{"title":"Order product prices for display","prompt":"Sort this array of product prices [29.99, 9.99, 49.99, 9.99, 19.99] in ascending order using a stable sort so that identical prices stay in their original sequence."},{"title":"Stable sort strings alphabetically","prompt":"I need to sort this list of names [\"Zara\", \"Alice\", \"Bob\", \"Alice\", \"Charlie\"] alphabetically using a stable sort — duplicates should keep their original order."}],"resultDescription":"Returns a JSON object containing the stably sorted array, preserving the relative order of equal elements from the original input. The response schema is open (additionalProperties: true), so it may include metadata alongside the sorted result.","failureModes":["Array exceeds 1000 items — request rejected or truncated","Invalid or non-array values field — validation error","Payment failure via x402 on Base — 402 response before processing","Malformed JSON body — parse error returned","Empty required 'values' field — missing required parameter error"],"whenToPreferThis":"Choose this endpoint when you need a reliable, pay-per-call stable sort for arrays of up to 1000 items without spinning up your own compute, especially in autonomous agent workflows on Base using x402 micropayments. Prefer this over client-side sorting when the sort must be auditable, reproducible, or when the agent environment lacks native sort utilities.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-02T12:44:23.723Z","isFirstParty":false,"canonicalSlug":"one-engine-stable-sort-array-980781c7"}