Documentation
¶
Overview ¶
Command spike1 tests whether OpenAlex works can be fetched in batches by ID.
Spike 1 of docs/ARCHITECTURE_PHASE1.md §9. ADR-002's cost model rests on this entirely: a list request costs 10 credits and returns up to 50 works (0.20 credits/work), against 1 credit for a single work (1.00 credits/work). If filtering by a pipe-separated list of OpenAlex IDs does not work, batching collapses, expansion costs 5x more, and the fallback is batching by DOI — which silently drops every work that has none.
Measures three things:
- Does filter=openalex_id:W1|W2|... work at all, and does ids.openalex: too?
- What is the ceiling on the number of piped values — 50, 100, or higher?
- Does referenced_works arrive complete inside a batched list response? ("edges arrive free" is the premise of the whole expansion algorithm)
Usage:
go run ./spikes/1-batch-by-id
Click to show internal directories.
Click to hide internal directories.