For developers checking AI-written code and docs before they ship. Claude extracts the checkable claims from your text, SerpApi fetches live Google results for each one, and each claim comes back with a verdict and a source you can open.
One POST · three upstream calls per unseen claim, at most seven
Claude splits the text into discrete claims and restates each one so it stands alone as a search query.
Typedfact, code_api or statistic. Versions and figures are copied verbatim — correcting them would defeat the point.
The verdict prompt rules against the returned snippets, not the model's own knowledge.
A model checking a model agrees when both are wrong. The live search is the source of truth; Claude is the reader.The answer_box and knowledge_graph from the same response are read as evidence and ranked above the organic results.
source_url. Each claim reports its source_type: answer_box, knowledge_graph, organic or null.
A claim that only holds for now is searched inside Google's past year (tbs=qdr:y) and tagged fresh results.
unconfirmed, buys one unfiltered search of the same query. Worst case per claim: 3 searches, 4 Claude calls. Its verdict is cached for 7 days, not forever.
unconfirmed means the evidence was thin. A reply that could not be parsed is an error instead.
verification_failed (500). No code path turns an unreadable answer into a verdict.
A source URL is kept only if it matches a result we actually sent to the model.
An invented link is dropped and logged rather than shown. The verdict still stands on the snippets.For a code_api claim whose method name appears in no result, the verdict is contradicted.
Each claim is keyed by a SHA256 of its normalized text, unique-indexed in MongoDB.
A hit returnscached: true with zero upstream calls. Normalization collapses case and spacing, not paraphrase. Time-sensitive verdicts expire after 7 days; the rest are kept.
Timeouts, connection resets, 429s and 5xx get exactly one retry, shared by both API clients. A query whose results come back about a different subject gets one rewrite; a past-year window that is too thin, or that produced unconfirmed, gets one unfiltered search — and none of them can stack.
Retry-After honoured but capped at 2s.
One JSON error envelope for every failure
Authenticate with an X-API-Key header. This page uses the public key
demo-key, rate limited to 30 checks per minute.
curl -X POST https://serpguard.onrender.com/api/v1/checks \
-H 'content-type: application/json' \
-H 'X-API-Key: demo-key' \
-d '{"text":"The Eiffel Tower is located in London."}'