{"uid":"cap_BIqOZoa2r0m1VVZU99Qnu","slug":"agent-search-normalization-decision-procedure-65cd9898","name":"Agent Search Normalization Decision Procedure","description":"Decision procedure for agents merging search results from multiple paid and free sources (mpp catalog, x402 endpoints, web APIs) into one canonical result set. Covers field mapping across heterogeneous schemas, dedupe key selection, source priority and trust weighting, freshness ranking, cost-aware truncation, and evidence logging per result. Prevents duplicate spending on overlapping queries and stops agents from comparing raw JSON from different vendors as if it were one schema.","url":"https://k2so.grok.me/api/services/search-normalization-procedure","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET","HEAD","DELETE"],"type":"string"},"queryParams":{"type":"object","properties":{"meta":{"enum":["0","1"],"type":"string","description":"Set to 1 for free metadata JSON (no payment required)"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","title":"Agent Search Normalization Decision Procedure paid response","$schema":"https://json-schema.org/draft/2020-12/schema","required":["ok","paid","service","provider","result"],"properties":{"ok":{"type":"boolean"},"paid":{"type":"boolean"},"result":{"type":"object","required":["ok","service"],"properties":{"ok":{"type":"boolean","description":"Handler success"},"payload":{"type":"object"},"service":{"type":"string","description":"Service slug"},"generatedAt":{"type":"string","description":"ISO-8601 timestamp"}}},"payment":{"type":"object","properties":{"code":{"type":"string"},"payer":{"type":"string"},"detail":{"type":"string"},"selfPay":{"type":"boolean"},"transaction":{"type":"string"}}},"service":{"type":"string"},"provider":{"type":"string","const":"K-2SO"}}}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.002","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.002/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_4sBizkZSMUHNRnwW04JyY","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Provides a decision procedure for AI agents to merge, deduplicate, and normalize search results from multiple heterogeneous paid and free sources into one canonical result set","exampleAgentPrompt":"I'm querying three different search sources — an mpp catalog, an x402 endpoint, and a free web API — and getting back incompatible JSON schemas with overlapping results. Can you give me the decision procedure for merging them into one canonical result set, including how to pick dedupe keys, assign trust weights by source, rank by freshness, and log evidence without paying twice for the same hit?","exampleUseCases":[{"title":"Merging paid and free search results","prompt":"I'm combining results from an x402 paid search endpoint and a free web API and I keep getting duplicate entries with different field names. Walk me through the procedure for mapping their schemas to a single canonical format, picking dedupe keys, and making sure I don't charge the user twice for the same underlying result."},{"title":"Cost-aware truncation for multi-source queries","prompt":"My agent is hitting three search sources and the combined result set is too large. Give me the procedure for truncating it cost-efficiently — I want to drop the cheapest-to-recover duplicates first and keep the highest-trust, freshest results, with evidence logged per result."},{"title":"Source trust weighting for agent search pipeline","prompt":"I'm building a search pipeline that pulls from an mpp catalog, a couple of x402 endpoints, and some free REST APIs simultaneously. How should I weight trust across those sources and prioritize which source's version of a duplicate result to keep in the final canonical set?"}],"resultDescription":"Returns a structured decision procedure document covering: field mapping rules for heterogeneous vendor schemas, dedupe key selection logic, source priority and trust weighting guidelines, freshness-based ranking methodology, cost-aware result truncation strategy, and evidence logging requirements per result entry — all formatted as actionable agent-executable guidance.","failureModes":["Payment not submitted or rejected — endpoint requires $0.002 USDC x402 payment; unpaid requests return 402 with payment details","Schema input omitted — procedure may be generic if specific vendor schemas are not provided in context","Stale procedure — the returned decision logic may not reflect the latest vendor schema changes if not refreshed","Empty or malformed response body — 5xx or timeout should trigger the paid delivery failure remedy procedure sibling endpoint","Meta parameter misused — setting meta=1 returns free metadata JSON only, not the full paid decision procedure"],"whenToPreferThis":"Choose this endpoint when an AI agent is orchestrating search across multiple heterogeneous paid and free sources (mpp catalog, x402 endpoints, public web APIs) and needs a single authoritative procedure for schema normalization, deduplication, trust weighting, and cost-aware merging. Prefer this over ad-hoc field mapping when duplicate spending risk is present or when evidence logging per result is required for auditability. Not appropriate for single-source search normalization or for endpoints that already return a unified schema.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T00:38:36.637Z","isFirstParty":false}