{"uid":"cap_XCGmOPA_L3MEvC0ULGCok","slug":"relaystation-data-sort-88d3a88a","name":"Relaystation Data Sort","description":"$0.0002/MB. Sort rows by one or more columns, ascending or descending. 1¢ x402 min; remainder auto-credits — relaystation.ai/penny","url":"https://api.relaystation.ai/v1/data/sort","method":"POST","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method","bodyType","body"],"properties":{"body":{"type":"object","properties":{"by":{"type":"array","items":{"type":"object","required":["column"],"properties":{"dir":{"enum":["asc","desc"],"type":"string"},"type":{"enum":["string","number"],"type":"string","description":"Force the compare type; default value-typed."},"column":{"type":"string"}}},"minItems":1},"to":{"enum":["csv","tsv","json","ndjson"],"type":"string","description":"A tabular file format: csv, tsv, json (array of objects), or ndjson."},"file":{"type":"object","description":"cputools input-source: { inline: <base64 ≤ 4 MiB> } or { inputKey: <scratch key from /v1/cputools/upload-url, ≤ 50 MB> }."},"from":{"enum":["csv","tsv","json","ndjson"],"type":"string","description":"A tabular file format: csv, tsv, json (array of objects), or ndjson."}}},"type":{"type":"string","const":"http"},"method":{"enum":["POST","PUT","PATCH"],"type":"string"},"bodyType":{"enum":["json","form-data","text"],"type":"string"}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.01","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"registry","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_bqI8SyMhyxlymOsNma3l9","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":null,"unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Sort rows in a dataset by one or more columns, ascending or descending, billed at $0.0002/MB via x402","exampleAgentPrompt":"Sort these rows by the 'revenue' column in descending order, then by 'region' ascending — it's about 50KB of JSON data.","exampleUseCases":[{"title":"Rank sales records by revenue","prompt":"I have a list of sales records in JSON and I need them sorted by revenue from highest to lowest before I generate the report — can you run the sort for me?"},{"title":"Sort log entries by timestamp","prompt":"Sort these server log rows by the 'timestamp' column in ascending order so I can analyze them in chronological sequence."},{"title":"Multi-column leaderboard ordering","prompt":"I need this leaderboard dataset sorted first by 'score' descending and then by 'username' ascending — it's about 200KB of data."}],"resultDescription":"Returns the input rows reordered according to the specified sort columns and directions. The response is the same data structure as the input but with rows in the new sort order. Billing is $0.0002/MB with a 1¢ minimum, and any remainder auto-credits to your account.","failureModes":["Invalid column name specified — column not found in dataset returns an error","Malformed or unparseable input data returns a parsing error","Payload too large or unsupported data format","Missing sort direction defaults or errors depending on API behavior","Insufficient x402 payment balance causes request rejection"],"whenToPreferThis":"Choose this endpoint when you need a lightweight, pay-per-MB sort operation on tabular data without spinning up a full database or compute environment. It is ideal for agent workflows that need to reorder data on the fly before passing it downstream (e.g., to a spreadsheet exporter or ranking step). The per-MB pricing makes it cost-effective for small-to-medium datasets compared to provisioning compute infrastructure.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T06:49:38.637Z","isFirstParty":false}