{"uid":"cap_fHzptkAtUzPVckAqFOVML","slug":"one-engine-stable-sort-array-571a9644","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/t3?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.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_6l0REu7txmUyrL_ip-LVG","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 a JSON array of up to 1000 items using a stable sort algorithm, with optional offset and comparison array support.","exampleAgentPrompt":"Sort this array of values [42, 7, 3, 19, 5, 100, 2] into ascending order using a stable sort — keep equal elements in their original relative positions.","exampleUseCases":[{"title":"Sort leaderboard scores for ranking","prompt":"I have a list of player scores like [88, 72, 95, 72, 60, 95, 41] — can you stable-sort them so equal scores stay in original order for a fair leaderboard display?"},{"title":"Order product prices for display","prompt":"Sort this list of product prices [29.99, 9.99, 49.99, 9.99, 19.99] in ascending order, keeping items with the same price in their original sequence."},{"title":"Arrange timestamps chronologically","prompt":"I have an array of Unix timestamps [1700000050, 1699999900, 1700000050, 1700000010] — please stable-sort them chronologically so duplicate timestamps preserve their original order."}],"resultDescription":"Returns a JSON object containing the stably sorted array, preserving the relative order of equal elements, based on the provided input values and optional comparison parameters.","failureModes":["Array exceeds 1000 items — request rejected","Missing required 'values' field — validation error","Malformed JSON in values array — parse error","Payment failure via x402 — 402 response, call not executed","Network timeout on Cloudflare Worker — 5xx response"],"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 pay-per-call model. Ideal for autonomous agent pipelines that need lightweight, on-demand sorting without spinning up local compute, especially when already integrated with the x402 Base payment protocol.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-02T12:43:44.570Z","isFirstParty":false,"canonicalSlug":"one-engine-stable-sort-array-571a9644"}