Other agents
AI agents are often the easiest way to use OpenAlex — and frequently the most powerful. You describe what you want; the agent figures out the queries, calls the API, and hands you results. Agents already know OpenAlex well: for most tasks, “use OpenAlex” is all the setup they need.
Using the OpenAlex API, find the 25 most-cited papers about microplastics
published since 2024 and save them as a CSV with title, year, citations, and DOI.
This page is about how to work with agents effectively — which kind to use, how to set them up, and how far you can push them.
Which agent, for what
- A chat agent (Claude, ChatGPT, Gemini) is right for one-off questions and small exports: “who are the most-cited authors at my university this decade?”, “get me these 200 DOIs as a spreadsheet.” Zero setup.
- A coding agent (Claude Code, Cursor, Codex) is right when the output is a dataset or analysis: it writes real scripts that page through results, retries failures, and save clean files — and the scripts are yours to re-run and audit. This is the sweet spot for systematic reviews, bibliometric analyses, and anything you’ll want to reproduce later.
- To keep watching a topic, any agent with your key can set an email alert for new works that match a search, and list, change or stop your alerts later: “email me every week when new papers on microplastics in drinking water come out.”
- For big pulls, a coding agent can drive the CLI (“download all works on this topic as JSONL”) or work against the snapshot — you get bulk-scale results without learning the tooling yourself.
Set your agent up for success
Let it get a key for you. Agents make a lot of requests, and the keyless budget runs out fast, so they need a key. A coding agent can get one itself: tell it to use OpenAlex, and when it needs a key it can ask for your email address. Or say it up front: “Get me a free OpenAlex API key; my email is ana@usp.br.” Click the link in the email we send you (“Activate your OpenAlex API key”), and that’s all. The key works from then on, with the full free budget, and you never copy or paste anything. (How it works.)
Or give it your own key. Already have an account, or using a chat assistant that can’t call APIs on its own? Copy your key from Settings → API key and paste it into the chat. (If a key ever leaks, rotate it in Settings, and the old one stops working within about two minutes.) See Authentication for how budgets work.
Point it at the docs. Anything the agent is unsure of, it can read right here — this whole site is optimized for AI use. If it seems lost, saying “check help.openalex.org” is usually enough. For heavy API work, hand it the LLM quick reference, a condensed page written specifically for agents.
For agents that write queries programmatically, point them at OQO — the JSON query format with a schema to validate against, much harder to get wrong than assembling query strings.
Make it durable. If you use a coding agent regularly, tell it once — in its memory or config file — that you use OpenAlex and where your key lives. Every future session starts already set up.
Reading openalex.org pages
Agents and scripts are welcome to read OpenAlex record pages directly. Every OpenAlex ID is a URL: open openalex.org/W2741809807 and you get that work’s page, rendered on the server, with its title, authors, abstract, DOI and a schema.org JSON-LD block. The same holds for authors, sources, institutions, topics, funders, publishers and the other entity types.
-
Ask for Markdown with an
Accept: text/markdownheader, and you get the page as Markdown at about a tenth of the HTML’s size:curl -H "Accept: text/markdown" https://openalex.org/works/W2741809807 -
Every record page names its API twin in a
Linkheader (rel="alternate"; type="application/json"), and pages served to scripts and AI assistants open with a short notice that links it. -
Search and list pages aren’t for scripts. A script that opens
openalex.org/works?search=...gets a short page pointing to the API instead.
For anything past a few records, use the API: it has more data (every attribute of every record) and it’s faster. The same work is api.openalex.org/works/W2741809807; single-record lookups are free, and one call can fetch up to 100 records by ID, or filter, search, group and page through millions.
Trust, but verify
Agents very rarely hallucinate OpenAlex results — the API is well-structured, and answers come from real responses, not the model’s memory. Still, for consequential work:
- Ask to see the API calls it made. They’re URLs; you can open them yourself.
- Spot-check a few rows against the website.
- Prefer scripts over vibes for anything you’ll cite: a coding agent’s script is checkable and re-runnable in a way a chat transcript isn’t.
Related pages
- Quickstart — the five-minute version: website → API → agent
- LLM quick reference — the condensed API reference to hand your agent
- CLI — the command-line tool agents can drive for bulk downloads
- Alerts and saved searches — the API agents use to set and manage email alerts for you
Last updated
View as Markdown