Search DOI metadata via Crossref API.
printf '{"q":"golang","rows":5}' | ./tools/bin/crossref_search | jq- Required env:
CROSSREF_MAILTO(used in User-Agent andmailtoparameter) - Optional env:
HTTP_TIMEOUT_MS
q(string): search queryrows(int, default 10, max 50): number of results
{
"results": [
{
"title": "...",
"doi": "...",
"issued": "YYYY[-MM[-DD]]",
"container": "Journal ...",
"title_short": "..."
}
]
}- 8s default timeout; up to 5 redirects; SSRF guard blocks private/loopback unless
CROSSREF_ALLOW_LOCAL=1for tests. - On HTTP 429, the tool exits non‑zero and prints a single‑line stderr JSON with
RATE_LIMITED.