{"uid":"cap_-rkusizjMCtcmpCyFJAW7","slug":"one-engine-sort-keys-e459878a","name":"ONE Engine Sort Keys","description":"Low-cost pay-per-call utility APIs for autonomous agents using x402 on Base.","url":"https://one-search.one-engine.workers.dev/v1/json/sort-keys?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"value":{}}},"responseSchema":{"type":"json","example":{"value":{"a":{"b":3,"y":2},"z":1}}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.0011","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.0011/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.0011","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.0011","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_WXDIbprmSsyHXucj2HVVd","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.0011","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Recursively sorts all keys in a JSON object alphabetically and returns the canonically ordered result.","exampleAgentPrompt":"Can you sort all the keys in this JSON object alphabetically, including nested ones? Here it is: {\"z\":1,\"a\":{\"y\":2,\"b\":3}}","exampleUseCases":[{"title":"Canonical JSON for deterministic hashing","prompt":"I need to hash this JSON payload consistently — can you sort all its keys alphabetically first so the key order doesn't affect the hash? Here's the object: {\"timestamp\":\"2024-01-01\",\"amount\":100,\"currency\":\"USD\",\"metadata\":{\"source\":\"web\",\"id\":42}}"},{"title":"Normalizing API response for comparison","prompt":"I'm comparing two API responses that might have the same data but different key orderings — can you sort all the keys in this JSON so I can diff them cleanly? Object: {\"status\":\"ok\",\"data\":{\"name\":\"Alice\",\"age\":30},\"code\":200}"},{"title":"Preparing JSON for canonical signature","prompt":"Before I sign this JSON payload, I need all keys sorted alphabetically at every level — please sort this for me: {\"user\":{\"role\":\"admin\",\"email\":\"a@b.com\"},\"action\":\"delete\",\"resource\":\"post\"}"}],"resultDescription":"Returns a JSON object identical in content to the input but with all keys sorted alphabetically at every level of nesting. The structure and values are preserved; only key ordering changes.","failureModes":["Invalid or missing 'value' field in request body — endpoint may return an error or empty result","Non-object input types (arrays, primitives) may not be sorted or may return unexpected output","Payment failure via x402 protocol blocks the call entirely","Deeply nested objects may have unexpected behavior if circular references exist"],"whenToPreferThis":"Choose this endpoint when you need a cheap, pay-per-call, agent-native way to canonicalize JSON key order — especially in workflows where deterministic key ordering matters for hashing, signing, or diffing. At $0.0011 USDC per call via x402 on Base, it is ideal for high-frequency agent pipelines where spinning up a local utility is impractical. Prefer it over ad-hoc sorting logic when you need a reliable, stateless microservice call.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-02T12:43:36.797Z","isFirstParty":false,"canonicalSlug":"one-engine-sort-keys-e459878a"}