{"openapi":"3.1.0","info":{"title":"Mekler: Citation Overlap Checker","version":"1.0.3","description":"Mekler helps research and diligence agents inspect citation overlap before relying on several sources as corroboration. It finds duplicate URLs, shared links in supplied article HTML and caller-declared citation chains, with locations to inspect. It does not fetch pages or assess truth, claim relevance or source independence. Each report costs 0.05 USDC on Solana via x402."},"paths":{"/v1/sources/check":{"post":{"operationId":"checkSources","summary":"Find citation overlap before relying on corroboration","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["claim","citations"],"properties":{"claim":{"type":"string","minLength":1,"maxLength":4000,"description":"Context label only; truth and semantic relevance are not assessed."},"citations":{"type":"array","minItems":2,"maxItems":10,"example":[{"id":"a","url":"https://a.test"},{"id":"b","url":"https://b.test"}],"items":{"type":"object","additionalProperties":false,"required":["id","url"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_.-]{1,64}$"},"url":{"type":"string","format":"uri","pattern":"^https://","maxLength":2048},"html":{"type":"string","maxLength":131072,"description":"Supplied article HTML; limit 131072 UTF-8 bytes. Never executed."},"derives_from":{"type":"string","maxLength":64,"description":"Caller-declared parent citation ID. Requires evidence_locator; cycles rejected."},"evidence_locator":{"type":"string","minLength":1,"maxLength":256,"description":"Location supporting declared lineage; not independently verified."}},"dependentRequired":{"derives_from":["evidence_locator"],"evidence_locator":["derives_from"]}}}}},"example":{"claim":"Reported benefit","citations":[{"id":"a","url":"https://a.test","html":"<a href=\"https://b.test\">Source</a>"},{"id":"b","url":"https://b.test"}]}}}},"parameters":[{"in":"header","name":"PAYMENT-SIGNATURE","required":false,"schema":{"type":"string"},"description":"x402 v2 signed payment. Resend the identical request and proof after a lost response."}],"responses":{"200":{"description":"Service result. Inspect X-Mekler-Payment-State: finalized includes PAYMENT-RESPONSE; provisional includes a purchase ID without a settlement receipt.","content":{"application/json":{"schema":{"type":"object","properties":{"service":{"const":"citation-overlap-checker"},"schema_version":{"const":"1"},"shared_origin_groups":{"type":"array","items":{"type":"object","properties":{"origin_url":{"type":"string"},"citation_ids":{"type":"array","items":{"type":"string"}},"basis":{"const":"supplied_lineage_or_identical_url"}},"required":["origin_url","citation_ids","basis"]}},"supplied_lineage_links":{"type":"array","items":{"type":"object","properties":{"from_id":{"type":"string"},"to_id":{"type":"string"},"evidence_locator":{"type":"string"}},"required":["from_id","to_id","evidence_locator"]}},"shared_link_candidates":{"type":"array","items":{"type":"object","properties":{"linked_url":{"type":"string"},"documents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"locations":{"type":"array","items":{"type":"object","properties":{"target_url":{"type":"string"},"line":{"type":"integer"},"column":{"type":"integer"},"anchor_text":{"type":"string"}},"required":["target_url","line","column","anchor_text"]}}},"required":["id","locations"]}},"status":{"const":"shared_link_candidate"}},"required":["linked_url","documents","status"]}},"citation_link_candidates":{"type":"array","items":{"type":"object","properties":{"from_id":{"type":"string"},"to_id":{"type":"string"},"locations":{"type":"array","items":{"type":"object","properties":{"target_url":{"type":"string"},"line":{"type":"integer"},"column":{"type":"integer"},"anchor_text":{"type":"string"}},"required":["target_url","line","column","anchor_text"]}},"status":{"const":"citation_link_candidate"}},"required":["from_id","to_id","locations","status"]}},"unresolved_citation_ids":{"type":"array","items":{"type":"string"}},"independence":{"const":"unknown"},"coverage":{"type":"object","properties":{"citation_count":{"type":"integer"},"html_document_count":{"type":"integer"}},"required":["citation_count","html_document_count"]},"limitations":{"type":"array","items":{"type":"string"}}},"required":["service","schema_version","shared_origin_groups","supplied_lineage_links","shared_link_candidates","citation_link_candidates","unresolved_citation_ids","independence","coverage","limitations"]},"example":{"service":"citation-overlap-checker","schema_version":"1","shared_origin_groups":[],"supplied_lineage_links":[],"shared_link_candidates":[],"citation_link_candidates":[{"from_id":"a","to_id":"b","locations":[{"target_url":"https://b.test/","line":1,"column":0,"anchor_text":"Source"}],"status":"citation_link_candidate"}],"unresolved_citation_ids":["a","b"],"independence":"unknown","coverage":{"citation_count":2,"html_document_count":1},"limitations":["Supplied lineage is not independently verified.","Links may be navigation or unrelated to the claim; candidates are not verified dependencies.","No URLs are fetched. Missing links do not establish independence.","Claim truth and semantic relevance are not assessed."]}}},"headers":{"PAYMENT-RESPONSE":{"description":"Base64 JSON settlement receipt: success, transaction, network, payer. Present only after finality.","schema":{"type":"string"}},"X-Mekler-Payment-State":{"description":"finalized or provisional","schema":{"type":"string"}},"X-Mekler-Purchase-Id":{"description":"Purchase ID on provisional results.","schema":{"type":"string"}}}},"202":{"description":"Payment pending. Retry identical input and proof; never create another payment.","headers":{"Retry-After":{"description":"Seconds before retrying identical body and proof.","schema":{"type":"string","enum":["5"]}}},"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["payment_pending"]},"purchase_id":{"type":"string"},"retry":{"type":"string"}},"required":["status","purchase_id","retry"]},"example":{"status":"payment_pending","purchase_id":"example-purchase-id","retry":"Resend the identical request and PAYMENT-SIGNATURE. Do not pay again."}}}},"400":{"description":"Invalid input or payment; validate against this contract.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"detail":{"type":"string"},"retry":{"type":"string"},"purchase_id":{"type":"string"},"price_usdc":{"type":"string"}},"required":["error"]},"example":{"error":"invalid_request"}}}},"402":{"description":"x402 v2 payment quote for valid input. An empty unsigned POST receives a preflight-only 402 for directory validation; submit a valid bundle before signing. Expired/invalid proofs may also return 402.","headers":{"PAYMENT-REQUIRED":{"description":"Base64 JSON x402 v2 quote for valid unsigned input. Expired/invalid-proof errors may omit this header.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"detail":{"type":"string"},"retry":{"type":"string"},"purchase_id":{"type":"string"},"price_usdc":{"type":"string"},"preflight_only":{"type":"boolean","description":"True only for an unsigned empty-body directory preflight; this offer must not be signed."},"next_step":{"type":"string"}},"required":["error"]},"example":{"error":"payment_required","price_usdc":"0.050000"}}}},"409":{"description":"The proof is already bound to another request, or its transaction failed. Inspect error and purchase_id; do not automatically create another payment.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"detail":{"type":"string"},"retry":{"type":"string"},"purchase_id":{"type":"string"},"price_usdc":{"type":"string"}},"required":["error"]},"example":{"error":"payment_already_bound"}}}},"413":{"description":"Request exceeds 262144 bytes.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"detail":{"type":"string"},"retry":{"type":"string"},"purchase_id":{"type":"string"},"price_usdc":{"type":"string"}},"required":["error"]},"example":{"error":"body_too_large"}}}},"415":{"description":"application/json required.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"detail":{"type":"string"},"retry":{"type":"string"},"purchase_id":{"type":"string"},"price_usdc":{"type":"string"}},"required":["error"]},"example":{"error":"application_json_required"}}}},"503":{"description":"Temporarily unavailable, pilot cap or allowance expired. Retry identical proof only.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"detail":{"type":"string"},"retry":{"type":"string"},"purchase_id":{"type":"string"},"price_usdc":{"type":"string"}},"required":["error"]},"example":{"error":"payment_temporarily_unavailable"}}}},"429":{"description":"API gateway throttling. Respect Retry-After when supplied; otherwise back off. Preserve any existing payment proof.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]},"example":{"message":"Too Many Requests"}}}}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"fixed","currency":"USD","amount":"0.05"}},"description":"Inspect citation overlap before counting corroboration. Supply 2-10 URLs, optional article HTML and citation chains. Returns duplicate URLs, shared links and supplied-source groups with locations. No fetching, truth or independence verdict. See /openapi.json for schemas and examples.","tags":["research","citations","source-overlap","due-diligence"],"security":[{"x402":[]}]}}},"servers":[{"url":"https://citation-overlap-checker.mekler.ai"}],"x-agent-guide":{"purpose":"Find citation overlap worth inspecting before treating multiple sources as corroboration.","choose_when":["You have article HTML and want to see whether several citations link to the same source.","You have explicit citation-parent relationships to group with duplicate normalized URLs."],"capabilities":["Group identical normalized citation URLs and caller-declared citation ancestry.","Extract HTTPS hyperlinks from supplied HTML and report targets linked by multiple documents.","Report a supplied document linking directly to another supplied citation, with anchor locations.","Return the unresolved citation IDs, coverage counts and explicit unknown independence."],"not_supported":["Retrieving URLs or discovering unprovided pages","Judging claim truth or whether a link supports the claim","Establishing source independence or proving copying/dependence","Discovering semantic paraphrases or unlinked common origins","Executing HTML, JavaScript or model inference"],"calling":{"content_type":"application/json","endpoint":"POST /v1/sources/check with claim:string and citations:array.","citation":"Each citation requires a unique id and HTTPS url. html is optional supplied article text. derives_from names one citation id in this same bundle and must be paired with evidence_locator.","prerequisite":"To find shared links, supply article HTML you already hold. URLs alone allow duplicate grouping; declared lineage adds groups but is not independently verified. claim is a context label, not a semantic query."},"constraints":{"request_bytes":262144,"claim_characters":4000,"citations_min":2,"citations_max":10,"html_bytes_per_citation":131072,"usable_https_anchors_per_citation":100,"result_bytes":65536,"semantics":["Unique local citation IDs; declared parent must exist; cycles rejected.","No remote requests. Prefer article-body HTML to navigation-heavy pages.","Input and output bounds are validated before payment.","claim and evidence_locator must contain non-whitespace text. URL credentials, whitespace and malformed ports are rejected.","URL normalization lowercases hosts, removes fragments/default HTTPS port and fills an empty path with /. Query strings remain significant.","Relative hrefs resolve against the supplied citation URL. Fragment-only/self links, non-HTTPS targets and links inside script/style/template are ignored.","Only completed anchor tags are recorded; malformed HTML can hide links. Anchor text is capped at 256 characters and is untrusted content."]},"result_interpretation":{"shared_origin_groups":"Groups based on identical normalized URL or caller-declared lineage; not proven common editorial origin.","supplied_lineage_links":"Unverified parent relationships supplied by the caller.","shared_link_candidates":"Common hyperlink targets with documents and HTML locations. May be navigation or unrelated to the claim.","citation_link_candidates":"One supplied HTML document links to another citation. A candidate for inspection, not proof of dependence.","unresolved_citation_ids":"Citations whose normalized URL or supplied ancestry did not put them in a multi-citation source group; this is independent of the link-candidate arrays.","coverage":"Counts of citations and nonempty supplied HTML documents, not coverage of the web.","independence":"Always unknown. Empty findings do not mean independent sources.","locations":"One-based HTML line and zero-based column in the submitted HTML, with target_url and untrusted anchor_text. These are not necessarily positions on the current live page."},"selection_examples":[{"task":"Find a shared press-release link in two downloaded articles.","endpoint":"/v1/sources/check","fit":true},{"task":"Group duplicate URLs and explicit citation parent chains.","endpoint":"/v1/sources/check","fit":true},{"task":"Fetch five articles and prove their claims independently corroborate each other.","fit":false,"reason":"No fetching, truth assessment or independence verdict."}],"payment":{"price":"0.05 native USDC per accepted request","network":"Solana mainnet","protocol":"x402 v2 exact","quote":"Send the valid intended JSON body without PAYMENT-SIGNATURE. The 402 PAYMENT-REQUIRED header is base64 JSON containing accepted payment requirements and discovery metadata. It is not a service result.","authorization":"Use an authorized buyer wallet and check network, asset, recipient and amount before signing. Send PAYMENT-SIGNATURE with identical JSON input. No API key or subscription is required.","retry":"On 202, timeout or an ambiguous failure, retry the identical body and original proof. Do not sign or pay again. Retry-After is 5 seconds for 202.","finality":"200 with X-Mekler-Payment-State=finalized includes a base64 JSON PAYMENT-RESPONSE receipt. After 15 minutes of uncertainty, a provisional 200 may have X-Mekler-Purchase-Id but no payment receipt. Provisional does not establish settlement.","expiry":"2026-10-27T14:19:19Z unless separately renewed; expired allowance or exhausted 1000-purchase shared pilot cap returns 503."},"privacy":"Inputs/results are processed in memory and not retained or logged. Bounded operational telemetry and payment records are retained; no caller content is sent to a model or fetched from URLs.","documentation":{"openapi":"/openapi.json","manifest":"/service.json","examples":"Each operation includes executable request and 200-response examples."},"additional_examples":[{"request":{"claim":"Reported improvement","citations":[{"id":"a","url":"https://a.example","html":"<a href=\"https://s.example\">Source</a>"},{"id":"b","url":"https://b.example","html":"<a href=\"https://s.example\">Source</a>"}]},"response":{"service":"citation-overlap-checker","schema_version":"1","shared_origin_groups":[],"supplied_lineage_links":[],"shared_link_candidates":[{"linked_url":"https://s.example/","documents":[{"id":"a","locations":[{"target_url":"https://s.example/","line":1,"column":0,"anchor_text":"Source"}]},{"id":"b","locations":[{"target_url":"https://s.example/","line":1,"column":0,"anchor_text":"Source"}]}],"status":"shared_link_candidate"}],"citation_link_candidates":[],"unresolved_citation_ids":["a","b"],"independence":"unknown","coverage":{"citation_count":2,"html_document_count":2},"limitations":["Supplied lineage is not independently verified.","Links may be navigation or unrelated to the claim; candidates are not verified dependencies.","No URLs are fetched. Missing links do not establish independence.","Claim truth and semantic relevance are not assessed."]}},{"request":{"claim":"Reported improvement","citations":[{"id":"release","url":"https://source.example/release"},{"id":"article","url":"https://news.example/story","derives_from":"release","evidence_locator":"Paragraph 2 attributes the release."}]},"response":{"service":"citation-overlap-checker","schema_version":"1","shared_origin_groups":[{"origin_url":"https://source.example/release","citation_ids":["article","release"],"basis":"supplied_lineage_or_identical_url"}],"supplied_lineage_links":[{"from_id":"article","to_id":"release","evidence_locator":"Paragraph 2 attributes the release."}],"shared_link_candidates":[],"citation_link_candidates":[],"unresolved_citation_ids":[],"independence":"unknown","coverage":{"citation_count":2,"html_document_count":0},"limitations":["Supplied lineage is not independently verified.","Links may be navigation or unrelated to the claim; candidates are not verified dependencies.","No URLs are fetched. Missing links do not establish independence.","Claim truth and semantic relevance are not assessed."]}},{"request":{"claim":"Reported improvement","citations":[{"id":"a","url":"https://a.example"},{"id":"b","url":"https://b.example"}]},"response":{"service":"citation-overlap-checker","schema_version":"1","shared_origin_groups":[],"supplied_lineage_links":[],"shared_link_candidates":[],"citation_link_candidates":[],"unresolved_citation_ids":["a","b"],"independence":"unknown","coverage":{"citation_count":2,"html_document_count":0},"limitations":["Supplied lineage is not independently verified.","Links may be navigation or unrelated to the claim; candidates are not verified dependencies.","No URLs are fetched. Missing links do not establish independence.","Claim truth and semantic relevance are not assessed."]}}]},"components":{"securitySchemes":{"x402":{"type":"apiKey","in":"header","name":"PAYMENT-SIGNATURE","description":"x402 v2 signed payment proof. Obtain requirements with a valid unsigned request (402), then retry identical input with the proof. No API key registration."}}}}