{"openapi":"3.1.0","info":{"title":"Japan Evidence Feed API","version":"0.1.0","description":"Bilingual evidence feed for Japanese official sources (FSA, BOJ, METI). Discovery routes below are free. Paid routes are metered per call via x402 (USDC on Base)."},"servers":[{"url":"https://japan-evidence-feed.jp-evidence.workers.dev"}],"paths":{"/":{"get":{"summary":"Latest events (HTML)","responses":{"200":{"description":"Latest events as an HTML list.","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/events/{eventId}":{"get":{"summary":"Public event page (HTML)","parameters":[{"name":"eventId","in":"path","required":true,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","pattern":"^(fsa|boj|meti)-\\d{8}-[a-f0-9]{8}$"}}],"responses":{"200":{"description":"Event page with provenance and JSON-LD.","content":{"text/html":{"schema":{"type":"string"}}}},"404":{"description":"No event with that id."}}}},"/api/v1/quote":{"get":{"summary":"Free result-count quote for a filter (no titles, summaries, or URLs)","parameters":[{"name":"query","in":"query","required":false,"schema":{"type":"string"}},{"name":"sources","in":"query","required":false,"schema":{"type":"array","items":{"type":"string","enum":["FSA","BOJ","METI"]}}},{"name":"topics","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"}}},{"name":"entities","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"}}},{"name":"from","in":"query","required":false,"schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},{"name":"to","in":"query","required":false,"schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}}],"responses":{"200":{"description":"Match count and coverage for the filters.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"count":{"type":"integer","minimum":0,"maximum":9007199254740991},"newest":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"oldest":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"sources":{"type":"array","items":{"type":"string","enum":["FSA","BOJ","METI"]}}},"required":["count","newest","oldest","sources"],"additionalProperties":false}}}}}}},"/api/v1/samples/evidence":{"get":{"summary":"Stable sample of a paid Evidence Pack response","responses":{"200":{"description":"Sample Evidence Pack.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"eventId":{"type":"string","pattern":"^(fsa|boj|meti)-\\d{8}-[a-f0-9]{8}$"},"source":{"type":"string","enum":["FSA","BOJ","METI"]},"sourceUrl":{"type":"string","format":"uri","pattern":"^https:\\/\\/.*"},"snapshotHash":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"retrievedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"publishedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"detectedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"freshness":{"type":"string","enum":["current","stale"]},"verification":{"type":"string","enum":["source-matched","insufficient-evidence"]},"titleJa":{"type":"string","minLength":1},"titleEn":{"type":"string","minLength":1},"summaryJa":{"type":"string","minLength":1},"summaryEn":{"type":"string","minLength":1},"excerpts":{"type":"array","items":{"type":"object","properties":{"text":{"type":"string","maxLength":1000},"locator":{"type":"string"}},"required":["text","locator"],"additionalProperties":false}},"changes":{"type":"array","items":{"type":"string"}}},"required":["eventId","source","sourceUrl","snapshotHash","retrievedAt","publishedAt","detectedAt","freshness","verification","titleJa","titleEn","summaryJa","summaryEn","excerpts","changes"],"additionalProperties":false}}}}}}},"/rss.xml":{"get":{"summary":"Latest events (RSS 2.0)","responses":{"200":{"description":"RSS feed.","content":{"application/rss+xml":{"schema":{"type":"string"}}}}}}},"/sitemap.xml":{"get":{"summary":"Sitemap of public URLs","responses":{"200":{"description":"Sitemap.","content":{"application/xml":{"schema":{"type":"string"}}}}}}},"/.well-known/x402":{"get":{"summary":"Static x402 discovery manifest for every paid route","description":"Lists each paid route with the exact `accepts` payment requirements its 402 challenge would emit (price, network, asset, pay-to address), so an index or wallet can price a call without provoking a challenge. Shape follows the x402 SDK's `DiscoveryResourcesResponse`. See src/api/well-known.ts.","responses":{"200":{"description":"Discovery manifest.","content":{"application/json":{"schema":{"type":"object","required":["x402Version","items","pagination"],"properties":{"x402Version":{"type":"integer"},"items":{"type":"array","items":{"type":"object","required":["resource","type","x402Version","accepts","lastUpdated"],"properties":{"resource":{"type":"string","description":"Absolute URL; dynamic segments stay in {param} template form."},"type":{"type":"string","const":"http"},"x402Version":{"type":"integer"},"accepts":{"type":"array","items":{"type":"object"}},"lastUpdated":{"type":"string","format":"date-time"},"description":{"type":"string"},"mimeType":{"type":"string"},"extensions":{"type":"object"}}}},"pagination":{"type":"object","required":["limit","offset","total"],"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"},"total":{"type":"integer"}}}}}}}},"503":{"description":"The manifest could not be built (e.g. the x402 facilitator is unreachable). No partial manifest is ever returned; retry after the `Retry-After` header's value."}}}},"/llms.txt":{"get":{"summary":"Agent-readable instructions and pricing","responses":{"200":{"description":"Plain-text instructions.","content":{"text/plain":{"schema":{"type":"string"}}}}}}},"/healthz":{"get":{"summary":"Liveness probe","responses":{"200":{"description":"ok"}}}},"/readyz":{"get":{"summary":"Readiness probe (D1 + KV)","responses":{"200":{"description":"ready"},"503":{"description":"not ready"}}}},"/api/v1/search":{"post":{"summary":"Structured update search (search_events)","description":"Paid route. Price: $0.01 USDC per call (x402 operation `search_events`).","requestBody":{"description":"Search filters.","required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"query":{"type":"string"},"sources":{"type":"array","items":{"type":"string","enum":["FSA","BOJ","METI"]}},"topics":{"type":"array","items":{"type":"string"}},"entities":{"type":"array","items":{"type":"string"}},"from":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"to":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"limit":{"default":10,"type":"integer","minimum":1,"maximum":50}},"required":["limit"],"additionalProperties":false}}}},"responses":{"200":{"description":"Matching events with provenance.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"events":{"type":"array","items":{"type":"object","properties":{"eventId":{"type":"string","pattern":"^(fsa|boj|meti)-\\d{8}-[a-f0-9]{8}$"},"source":{"type":"string","enum":["FSA","BOJ","METI"]},"eventType":{"type":"string","enum":["regulatory_update","policy_update","statistical_release","press_release"]},"titleJa":{"type":"string","minLength":1},"titleEn":{"type":"string","minLength":1},"summaryJa":{"type":"string","minLength":1},"summaryEn":{"type":"string","minLength":1},"publishedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"detectedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"entities":{"type":"array","items":{"type":"string"}},"topics":{"type":"array","items":{"type":"string"}},"sourceUrl":{"type":"string","format":"uri","pattern":"^https:\\/\\/.*"},"snapshotHash":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"freshness":{"type":"string","enum":["current","stale"]},"verification":{"type":"string","enum":["source-matched","insufficient-evidence"]},"parserVersion":{"type":"string","minLength":1}},"required":["eventId","source","eventType","titleJa","titleEn","summaryJa","summaryEn","publishedAt","detectedAt","entities","topics","sourceUrl","snapshotHash","freshness","verification","parserVersion"],"additionalProperties":false}}},"required":["events"],"additionalProperties":false}}}},"400":{"description":"Request failed schema validation.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"details":{"type":"array"}},"required":["error"]}}}},"402":{"description":"Payment required (x402)."},"409":{"description":"The payment identifier was already used for a different request body/path (PaidOperationStore.begin()'s \"conflict\" outcome).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}}},"/api/v1/evidence/{eventId}":{"get":{"summary":"Evidence Pack (get_evidence)","description":"Paid route. Price: $0.05 USDC per call (x402 operation `get_evidence`).","parameters":[{"name":"eventId","in":"path","required":true,"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","pattern":"^(fsa|boj|meti)-\\d{8}-[a-f0-9]{8}$"}}],"responses":{"200":{"description":"Evidence Pack with excerpts, locators, hashes, and changes.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"eventId":{"type":"string","pattern":"^(fsa|boj|meti)-\\d{8}-[a-f0-9]{8}$"},"source":{"type":"string","enum":["FSA","BOJ","METI"]},"sourceUrl":{"type":"string","format":"uri","pattern":"^https:\\/\\/.*"},"snapshotHash":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"retrievedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"publishedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"detectedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"freshness":{"type":"string","enum":["current","stale"]},"verification":{"type":"string","enum":["source-matched","insufficient-evidence"]},"titleJa":{"type":"string","minLength":1},"titleEn":{"type":"string","minLength":1},"summaryJa":{"type":"string","minLength":1},"summaryEn":{"type":"string","minLength":1},"excerpts":{"type":"array","items":{"type":"object","properties":{"text":{"type":"string","maxLength":1000},"locator":{"type":"string"}},"required":["text","locator"],"additionalProperties":false}},"changes":{"type":"array","items":{"type":"string"}}},"required":["eventId","source","sourceUrl","snapshotHash","retrievedAt","publishedAt","detectedAt","freshness","verification","titleJa","titleEn","summaryJa","summaryEn","excerpts","changes"],"additionalProperties":false}}}},"400":{"description":"Request failed schema validation.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"details":{"type":"array"}},"required":["error"]}}}},"402":{"description":"Payment required (x402)."},"404":{"description":"No event with that id."},"409":{"description":"The payment identifier was already used for a different request body/path (PaidOperationStore.begin()'s \"conflict\" outcome).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}}},"/api/v1/deep-check":{"post":{"summary":"Multi-source claim check (deep_check)","description":"Paid route. Price: $0.20 USDC per call (x402 operation `deep_check`).","requestBody":{"description":"Claim and optional filters.","required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"claim":{"type":"string","minLength":1},"sources":{"type":"array","items":{"type":"string","enum":["FSA","BOJ","METI"]}},"from":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"to":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["claim"],"additionalProperties":false}}}},"responses":{"200":{"description":"Verdict with per-source evidence.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"verdict":{"type":"string","enum":["supported","contradicted","insufficient_evidence"]},"explanationJa":{"type":"string","minLength":1},"explanationEn":{"type":"string","minLength":1},"citations":{"type":"array","items":{"type":"object","properties":{"eventId":{"type":"string","pattern":"^(fsa|boj|meti)-\\d{8}-[a-f0-9]{8}$"},"sourceUrl":{"type":"string","format":"uri","pattern":"^https:\\/\\/.*"},"excerpt":{"type":"string","maxLength":1000}},"required":["eventId","sourceUrl","excerpt"],"additionalProperties":false}},"checkedSources":{"type":"array","items":{"type":"string","enum":["FSA","BOJ","METI"]}},"retrievedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["verdict","explanationJa","explanationEn","citations","checkedSources","retrievedAt"],"additionalProperties":false}}}},"400":{"description":"Request failed schema validation.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"details":{"type":"array"}},"required":["error"]}}}},"402":{"description":"Payment required (x402)."},"409":{"description":"The payment identifier was already used for a different request body/path (PaidOperationStore.begin()'s \"conflict\" outcome).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}}}}}