paper-lookup
Paper Lookup
This skill gives you 11 academic literature APIs with documented endpoints. Your job is to turn the user's intent into a reproducible retrieval: pick the authoritative database(s), make bounded and rate-limited calls, and return an answer with enough provenance (endpoints, parameters, identifiers, access date) that a human or another agent can repeat it.
A literature lookup is only as trustworthy as it is repeatable. Prefer explicit identifiers and documented endpoints over broad guessing, report what you queried, and say plainly when a result is partial or a database came back empty — a silent gap reads as "nothing exists" when it may just mean "not indexed here."
These APIs fail with HTTP 200. That is the recurring hazard across all eleven, and the reason for most of the rules below. PMC eFetch returns a well-formed article with no <body> when the publisher forbids redistribution. arXiv returns totalResults: 1 and one entry titled Error for a malformed parameter, and silently rewrites an unknown field prefix to all:. Europe PMC puts errCode in a 200 body. bioRxiv accepts an out-of-step pagination cursor and returns the wrong 30 records. None of these raise, and every one of them produces a confident, wrong answer. Verify the shape of what you got, not just the status code.
Core Workflow
-
Define the retrieval contract — What is the user after? A specific paper by DOI/PMID/arXiv ID? Papers on a topic? An author's publications? A citation graph? An open-access PDF? Full text? Note any constraints that change the answer: date range, field of study, open-access-only, exhaustive list vs. a few top hits. If a constraint that affects correctness is missing (e.g., "recent" with no year, or an author name with many namesakes), ask rather than guess.
-
Select database(s) — Use the selection guide below. Route to the primary database for the intent, then add others only when they earn their place: identifier resolution, open-access lookup, or a known coverage gap. Don't fan out across all eleven just because they're available.
-
Read the reference file — Each database has a file in
references/with endpoints, parameters, example calls, response shapes, and the specific ways it fails quietly. Read the relevant file(s) before calling. The hazard sections are not optional background; they are where the wrong answers come from. -
Prefer the bundled scripts over hand-rolled parsing — See Bundled Scripts. Pagination, JATS full text, arXiv Atom, and OpenAlex abstracts each have a script that already handles the traps. Reaching for
python3 -cinstead is how the traps get re-introduced. -
Make bounded API calls — See Making API Calls. For a targeted lookup, the first page is usually enough. For an exhaustive search ("all papers by X", "every citation of Y"), count first when the API exposes a total, paginate deterministically, and reconcile what you retrieved against that total. Ask before a retrieval would exceed ~1,000 records or ~50 calls.