Citation Validator (Scite-style, free)
Verify a citation and assess whether a paper supports/contradicts a claim — using free scholarly APIs + an LLM stance classifier.
What it does
1. Existence + metadata via fallback chain: OpenAlex → Crossref → Semantic Scholar (no API key needed). Returns title, authors, year, venue, DOI, and citation count. 2. Stance classification (optional--claim): feeds the paper's abstract to gemini-3.1-pro-preview, returns SUPPORTING / CONTRADICTING / NEUTRAL + one-sentence reason (strict JSON).Setup
- Lookups: no key (OpenAlex/Crossref/S2 are free).
--claimclassification:GEMINI_API_KEY/GOOGLE_API_KEY.- Python stdlib +
requests.
Usage
bash
. /data/.openclaw/secrets/env.sh
python3 scripts/cite_check.py --doi 10.1038/s41586-021-03819-2
python3 scripts/cite_check.py --title "Attention is all you need"
python3 scripts/cite_check.py --doi 10.1038/s41586-021-03819-2 \
--claim "Deep learning predicts protein structure with high accuracy"
python3 scripts/cite_check.py --doi <doi> --json # machine-readable
Verified (2026-05-31)
- DOI lookup (AlphaFold, Nature 2021) via OpenAlex → 44,513 citations ✅
- Claim "DL predicts protein structure" → SUPPORTING ✅
- Title lookup ("Attention is all you need") → resolved ✅
- Claim "Transformers rely on recurrence" → CONTRADICTING ✅
- Fake DOI →
{"exists": false}, exit 1 ✅
Notes
- Stance is judged from the abstract only; if no abstract, returns
UNKNOWN. - OpenAlex may match a re-indexed/duplicate record (venue can be null); existence + citation count remain reliable. Crossref/S2 act as fallback.
- Rate limits: all three APIs are generous for light use; add a contact email in the
UAheader for OpenAlex/Crossref "polite pool" if scaling up.