AI for Research Efficiency, episode 10: Research APIs, a ladder of keys Narration: an AI-generated voice (ElevenLabs). [0:00] Research APIs How much does the University of Arkansas publish each year? Ask your agent, and it asks OpenAlex. 25,613 works in ten years, counted by one web address. No key, and the answer even says what it cost: a hundredth of a cent. AI for Research Efficiency. Episode 10: Research APIs, a ladder of keys. Last time: what never goes to an agent, and why keys live in a .env file. In this episode: three research services, and the three kinds of key they take: none, a free key you limit, and a key that spends money. [0:52] 1. A door for programs One: an API is a door for programs. You ask with a web address, and the answer comes back as JSON: plain text that a program can read. OpenAlex adds what each answer cost, and how much of today's allowance is left. [1:12] 2. No key: OpenAlex Two: no key at all. OpenAlex catalogs the world's research: works, authors, institutions. Its data is free to reuse, for anything. Ask the agent to read the documentation first. Names are ambiguous, so it finds the university's ID before it counts. One request groups ten years of works by year. It's only a web address: open it in a browser, and the numbers are the same. Without a key, you get ten cents of use a day: about 1,000 of these requests. A free key gives you ten times that. [1:55] 3. A free key you limit Three: a free key you limit. Your reference library is private. Zotero's API needs a key to read it, and you choose what the key may do: read, and nothing else. The key goes in the .env file, never into the chat, even where a guide suggests it. The agent gets only the variable's name. Then ask: is anything in my library retracted? Here the library is exported as a list of DOIs, and the agent checks each one against OpenAlex. Single lookups are free. One comes back retracted, a flag OpenAlex takes from the Retraction Watch database. Open the notice, and confirm it yourself. Notice the agent's note, too: it calls OpenAlex's email lane optional. That lane closed in February, which is why you ask an agent to read the current documentation. When the work is done, delete the key. [2:57] 4. Where a key can go Four: where a key can go. Claude Code can be told never to read the .env file, and here it refused. But a script it ran could still read the key. Codex has a setting for which variables reach its commands, and by default it doesn't remove names with KEY, SECRET or TOKEN in them. Antigravity's sandbox blocks .env files, but in its command line, the sandbox is off until you turn it on. So in all three: the key stays in the file, the agent gets its name, and you read what a script prints. [3:38] 5. A key that spends: estimate first Five: a key that spends money. ElevenLabs turns text into speech. It's paid, and it's the service that narrates this series. Before a paid request, estimate. This summary of the practice folder's paper is 401 characters: about 45 credits. Make a key for this job only: text to speech, with a credit limit. The request names the key's variable, and the key itself never appears. Then listen before you use it. Draining rice paddies now and then, instead of keeping them flooded, cuts methane. And check the license: ElevenLabs' free plan is for non-commercial use, with its name in the title. Paid plans include a commercial license. [4:33] 6. Manners: limits and licenses Six: manners. 401 or 403 means no key, or the wrong one. 429 means too many requests: wait, and try again, more slowly. And data comes with a license. OpenAlex's is free for any use; some services allow only non-commercial use, and Google Scholar has no API at all. The companion page lists them. [5:04] Try it Pause here, and try one: ask your agent for your campus's works per year from OpenAlex. No key needed. Then open the address it used. [5:19] Review and next So: no key, a key you limit, a key that spends. Each key in the .env file, each paid request estimated, each answer checked. Next: Map a research field with OpenAlex.