{"openapi":"3.1.0","info":{"title":"x402 Product Recall API","version":"2.0.0","description":"Pay-per-call US product recall safety check.","x-guidance":"Use GET /safety-check?q={product} for a recalled-or-not verdict (with details) from live CPSC + openFDA data. A clean 'no recalls found' IS a real paid answer and is charged — but only when every source actually answered. If a source is down and we therefore cannot certify an absence, you get 502 partial_source_failure and are NOT charged. Check `sourcesSucceeded` / `sourcesFailed` on any 200 for exact provenance.","x-payment-policy":"NEVER CHARGED FOR AN UNDELIVERABLE ANSWER. The x402 middleware cancels settlement for any response >= 400, so every error below moves $0.00 and emits no payment-response header. A negative ('no recalls') verdict is only billed when the full corpus was searched; a positive ('recalled') verdict is billed even if one source was down, because a confirmed recall is definitive on its own."},"paths":{"/safety-check":{"get":{"operationId":"safetyCheck","summary":"Product recall safety verdict","tags":["Data"],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.010000"},"protocols":[{"x402":{}}]},"parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string"},"description":"Product name to check"}],"responses":{"200":{"description":"Safety verdict — either 'recalled' (with matching recall records) or a fully-searched 'no recalls found'. The only response you are charged for.","content":{"application/json":{"schema":{"type":"object","properties":{"query":{"type":"string"},"verdict":{"type":"string","enum":["recalled","no recalls found"]},"matchCount":{"type":"integer"},"sourcesQueried":{"type":"array","items":{"type":"string"}},"sourcesSucceeded":{"type":"array","items":{"type":"string"},"description":"Sources that actually answered. A 'no recalls found' verdict is only returned when this equals sourcesQueried."},"sourcesFailed":{"type":"array","description":"Sources that errored. Non-empty only possible alongside a definitive 'recalled' verdict."},"recalls":{"type":"array"},"checkedAt":{"type":"string"}}}}}},"400":{"description":"NOT CHARGED. `missing_query` — the q param is required."},"402":{"description":"Payment Required"},"405":{"description":"NOT CHARGED. Wrong HTTP verb for this resource; see the Allow header."},"502":{"description":"NOT CHARGED. `all_sources_unavailable` (every source failed) or `partial_source_failure` (a source was down and we therefore refuse to certify 'no recalls found' on a half-searched corpus). Both `retryable:true`.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["all_sources_unavailable","partial_source_failure"]},"message":{"type":"string"},"charged":{"type":"boolean","enum":[false]},"retryable":{"type":"boolean","enum":[true]},"sourcesSucceeded":{"type":"array"},"sourcesFailed":{"type":"array"}}}}}}}}}}}