{"uid":"cap_9WKMW5VudmEeEjONs8IEA","slug":"trim-deduplicate-filter-and-sort-records-pipeline-fde348b8","name":"Trim, Deduplicate, Filter, and Sort Records Pipeline","description":"Trim text fields → Remove duplicate rows → Keep rows with a value → Sort numbers descending: Process customer-supplied records: Trim text fields → Remove duplicate rows → Keep rows with a value → Sort numbers descending. Returns the processed output and row counts per step. No external data lookup. 0.01 USDC includes up to 300 flat records.","url":"https://market.datapackvibe.com/x402/assistant-cap-edf69c0121309e730d93?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"field":{"type":"string","default":"value","pattern":"^[a-zA-Z][a-zA-Z0-9_]{0,39}$","maxLength":40},"records":{"type":"array","items":{"type":"object","maxProperties":30,"additionalProperties":{"type":["string","number","boolean","null"]}},"default":[{"text":" Useful example ","value":10},{"text":"Useful example","value":20},{"text":"Other row","value":5}],"maxItems":300,"minItems":1}}},"responseSchema":null,"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_OIskX8_240_3J8We63Wlx","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":"Processes an array of records through four sequential steps: trim text fields, remove duplicate rows, keep rows with a value in a specified field, then sort by that field descending.","exampleAgentPrompt":"Clean up this list of customer records by trimming whitespace from text fields, removing duplicates, dropping any rows where the 'value' field is empty, and sorting the remaining rows by 'value' descending — here are the records: [{\"text\": \" Acme Corp \", \"value\": 50}, {\"text\": \"Acme Corp\", \"value\": 50}, {\"text\": \"Beta LLC\", \"value\": null}, {\"text\": \"Gamma Inc\", \"value\": 30}].","exampleUseCases":[{"title":"Deduplicating a product SKU list","prompt":"I have a list of product records with a 'price' field — can you trim any extra whitespace in the text columns, remove duplicates, drop rows where price is missing, and sort the rest by price from highest to lowest? Here are the records: [{\"name\": \" Widget A \", \"price\": 19.99}, {\"name\": \"Widget A\", \"price\": 19.99}, {\"name\": \"Gadget B\", \"price\": null}, {\"name\": \"Doohickey C\", \"price\": 9.49}]"},{"title":"Cleaning a leads database export","prompt":"Can you clean up this leads export by trimming whitespace from text fields, removing any duplicate entries, filtering out rows where the 'score' field has no value, and sorting the remaining leads by score from highest to lowest? Here are my records: [{\"company\": \" Initech \", \"score\": 85}, {\"company\": \"Initech\", \"score\": 85}, {\"company\": \"Umbrella Corp\", \"score\": null}, {\"company\": \"Globex\", \"score\": 72}]"},{"title":"Preprocessing survey responses for ranking","prompt":"I've got survey response records with a 'rating' field — please trim any stray spaces in the text columns, drop duplicate rows, remove entries where rating is blank, and sort the valid responses by rating descending so I can see the top ones first. Records: [{\"respondent\": \" Alice \", \"rating\": 9}, {\"respondent\": \"Alice\", \"rating\": 9}, {\"respondent\": \"Bob\", \"rating\": null}, {\"respondent\": \"Carol\", \"rating\": 7}]"}],"resultDescription":"Returns the processed records after all four pipeline steps (trimmed, deduplicated, filtered, sorted descending), along with row counts at each stage so you can see how many rows were removed at each step.","failureModes":["Empty records array (minItems:1 violated) — returns validation error","Field name does not match pattern ^[a-zA-Z][a-zA-Z0-9_]{0,39}$ — returns schema validation error","Records array exceeds 300 items — returns error due to maxItems limit","Individual record has more than 30 properties — rejected by maxProperties constraint","Payment failure — x402 payment of 0.01 USDC not processed, request rejected"],"whenToPreferThis":"Choose this endpoint when you need a self-contained, sequential data-cleaning pipeline (trim → deduplicate → filter non-null → sort descending) on up to 300 flat records without any external data lookups. It is ideal for preprocessing structured records before storage, analysis, or display, and for workflows where each cleaning step's row count matters for auditing or debugging.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-18T00:58:30.698Z","isFirstParty":false,"canonicalSlug":"trim-deduplicate-filter-and-sort-records-pipeline-fde348b8"}