[Integrations](https://spiral.ai/integrations) › [Codex](https://spiral.ai/integrations/codex) › [PubMed and PMC literature search](https://spiral.ai/integrations/codex/pubmed-and-pmc-literature-search)

# How to Use PubMed and PMC literature search in Codex

Find article identifiers and optional summaries for a biomedical topic, author, or journal. Use it to build an initial reading list before examining individual records or available full text.

|  |  |
| --- | --- |
| Model | PubMed and PMC literature search |
| Available through | Alexandria |
| Category | Health |
| Price | $0.00873 per call. |
| Returns | json |
| Runs | In the background |
| Setup | About 2 minutes, no API key |

## Prompts to try with PubMed and PMC literature search in Codex

- Use PubMed and PMC literature search to find papers about wastewater surveillance for SARS-CoV-2 published in 2024, then build a citation-list component in this project.
- Use PubMed and PMC literature search to look this up and give me the result as a table. Save the result in ./assets.
- Pull the latest numbers from PubMed and PMC literature search and tell me what changed since last week.
- Check PubMed and PMC literature search and summarize what you find in three bullet points.
- Pull the newest data from PubMed and PMC literature search and give me the result as a table.

## How to set up PubMed and PMC literature search in Codex

Pick the way that suits you. Each takes about two minutes.

### Use Spiral's MCP server

1. **Add the hosted server**

```bash
codex mcp add spiral --url https://api.spiral.ai/mcp
```

2. **Sign in**: Codex opens the browser: sign in to Spiral and click Authorize. No API key. `codex mcp list` then shows Spiral.

```bash
codex mcp login spiral
```

### Use the Spiral skill

1. **Send Codex this message**: Your agent reads Spiral's skill and sets itself up.

```
set up https://spiral.ai/SKILL.md
```

2. **Sign in or paste a key**: Approve Spiral in the browser, or give the agent a key from the console.

### Use the Spiral CLI

1. **Install and sign in**: Installs the Spiral CLI, signs you in and adds its skill to your coding agents.

```bash
npx -y spiral-cli@latest init
```

### Call the Spiral API

1. **Create an API key**: In the console, under API keys.

2. **Run PubMed and PMC literature search**: One request; the result comes back by polling or a webhook.

```bash
curl https://api.spiral.ai/v1/runs \
  -H "Authorization: Bearer $SPIRAL_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
    "provider": "alexandria",
    "model": "pubmed-ncbi-nlm-nih-gov/publications/search",
    "input": {
      "query": "<query>"
    }
  }'
```

Then paste one of the prompts above: Codex finds PubMed and PMC literature search on Spiral, shows the price and runs it.

Setup guide in the docs: https://spiral.ai/docs/quickstarts/codex

## PubMed and PMC literature search tools and prices

- [PubMed and PMC · Search](https://spiral.ai/tools/alexandria/pubmed-ncbi-nlm-nih-gov/publications/search) (Alexandria): $0.00873 per call.

## Settings you can ask for

| Setting | Allowed values | Default | Description |
| --- | --- | --- | --- |
| db | pubmed, pmc | pubmed | Entrez database: `pubmed` (citations and abstracts) or `pmc` (PubMed Central full-text articles). |
| sort | relevance, pub_date | relevance | `relevance` (PubMed best match) or `pub_date` (newest first). |
| limit | 1 to 50 | 20 | Results per page (esearch retmax). |
| offset | 0 to 9950 | 0 | Zero-based index of the first result (esearch retstart). E-utilities cap offset + limit at 10,000. |
| max_date |  | — | Latest publication date, same forms as `min_date`. Requires `min_date`. Pattern: ^[0-9]{4}(/[0-9]{2}(/[0-9]{2})?)?$. |
| min_date |  | — | Earliest publication date, `YYYY`, `YYYY/MM` or `YYYY/MM/DD` (esearch mindate with datetype=pdat). Requires `max_date`. Pattern: ^[0-9]{4}(/[0-9]{2}(/[0-9]{2})?)?$. |

## What can you do with PubMed and PMC literature search in Codex?

Build a literature browser with citation cards, abstracts, and links to available PMC text. Your coding agent can connect identifiers and add related-paper navigation to the project.

### Prepare a journal club reading pack

Find papers on semaglutide and cardiovascular outcomes, organize the citations, inspect abstracts, and read available PMC methods and results. Match article identifiers and follow related papers to prepare discussion questions.

### Build a literature review screening queue

Search for wastewater surveillance studies, collect citation summaries, and screen individual abstracts against a written research question. Connect identifiers, inspect available full text, and follow related records for additional candidates.

### Check the evidence behind a science article

Locate papers supporting an article about antimicrobial resistance. Match its DOI references, verify citation details and abstracts, read available PMC text, and inspect related research before drafting an evidence note.

### Compare published research methods

Find single-cell RNA sequencing papers and organize their citations. Resolve identifiers, check abstracts, inspect available full-text methods, and use related articles to find alternative approaches worth comparing.

### Maintain a research team reading digest

Periodically search for new publications on long COVID, compare results with the prior reading list, and prepare citation cards. Add abstract-based notes, available full-text findings, identifier matches, and relevant linked papers.

### Develop a grant proposal bibliography

Search for research on tuberculosis diagnostics, organize candidate citations, and inspect abstracts and available full text for unanswered questions. Match identifiers and follow related papers to strengthen the background reading.

## Overview

- [Alexandria](https://spiral.ai/providers/alexandria)
- [All Codex guides](https://spiral.ai/integrations/codex)

## PubMed and PMC literature search in other agents

- [Amp](https://spiral.ai/integrations/amp/pubmed-and-pmc-literature-search)
- [ChatGPT](https://spiral.ai/integrations/chatgpt/pubmed-and-pmc-literature-search)
- [Claude](https://spiral.ai/integrations/claude-desktop/pubmed-and-pmc-literature-search)
- [Claude Code](https://spiral.ai/integrations/claude-code/pubmed-and-pmc-literature-search)
- [Cline](https://spiral.ai/integrations/cline/pubmed-and-pmc-literature-search)
- [Cursor](https://spiral.ai/integrations/cursor/pubmed-and-pmc-literature-search)
- [Devin](https://spiral.ai/integrations/devin/pubmed-and-pmc-literature-search)
- [dots](https://spiral.ai/integrations/dots/pubmed-and-pmc-literature-search)
- [Factory Droid](https://spiral.ai/integrations/factory-droid/pubmed-and-pmc-literature-search)
- [Gemini](https://spiral.ai/integrations/gemini/pubmed-and-pmc-literature-search)
- [Gemini CLI](https://spiral.ai/integrations/gemini-cli/pubmed-and-pmc-literature-search)
- [Google Antigravity](https://spiral.ai/integrations/antigravity/pubmed-and-pmc-literature-search)
- [goose](https://spiral.ai/integrations/goose/pubmed-and-pmc-literature-search)
- [Grok](https://spiral.ai/integrations/grok/pubmed-and-pmc-literature-search)
- [Grok Build](https://spiral.ai/integrations/grok-build/pubmed-and-pmc-literature-search)
- [Hermes](https://spiral.ai/integrations/hermes/pubmed-and-pmc-literature-search)
- [Instinct](https://spiral.ai/integrations/instinct/pubmed-and-pmc-literature-search)
- [Manus](https://spiral.ai/integrations/manus/pubmed-and-pmc-literature-search)
- [Muse](https://spiral.ai/integrations/muse/pubmed-and-pmc-literature-search)
- [Muse Code](https://spiral.ai/integrations/muse-code/pubmed-and-pmc-literature-search)
- [n8n](https://spiral.ai/integrations/n8n/pubmed-and-pmc-literature-search)
- [Notion](https://spiral.ai/integrations/notion/pubmed-and-pmc-literature-search)
- [OpenClaw](https://spiral.ai/integrations/openclaw/pubmed-and-pmc-literature-search)
- [opencode](https://spiral.ai/integrations/opencode/pubmed-and-pmc-literature-search)
- [Perplexity](https://spiral.ai/integrations/perplexity/pubmed-and-pmc-literature-search)
- [Raycast](https://spiral.ai/integrations/raycast/pubmed-and-pmc-literature-search)
- [VS Code](https://spiral.ai/integrations/vscode/pubmed-and-pmc-literature-search)
- [Windsurf](https://spiral.ai/integrations/windsurf/pubmed-and-pmc-literature-search)
- [Zapier](https://spiral.ai/integrations/zapier/pubmed-and-pmc-literature-search)

## More Codex guides

- [PubMed and PMC citation summaries](https://spiral.ai/integrations/codex/pubmed-and-pmc-citation-summaries)
- [PubMed article details](https://spiral.ai/integrations/codex/pubmed-article-details)
- [PubMed and PMC article ID lookup](https://spiral.ai/integrations/codex/pubmed-and-pmc-article-id-lookup)
- [PubMed related articles](https://spiral.ai/integrations/codex/pubmed-related-articles)
- [PubChem similar compounds](https://spiral.ai/integrations/codex/pubchem-similar-compounds)
- [RCSB PDB ligand details](https://spiral.ai/integrations/codex/rcsb-pdb-ligand-details)

## Questions about PubMed and PMC literature search in Codex

**Can Codex use PubMed and PMC literature search?**

Yes. Add Spiral to Codex as an MCP server, and Codex can find and run PubMed and PMC literature search like any built-in tool.

**How much does PubMed and PMC literature search cost in Codex?**

$0.00873 per call. You pay from your Spiral balance as you go, with no subscription, and a failed run is not charged. Your Codex plan is separate.

**Do I need an Alexandria account to use PubMed and PMC literature search in Codex?**

No. Spiral runs PubMed and PMC literature search on its own Alexandria account. You sign in to Spiral once and never paste a key.

**How long does it take to set up PubMed and PMC literature search in Codex?**

About two minutes: add the hosted server, then sign in.

**Does Codex wait while PubMed and PMC literature search runs?**

PubMed and PMC literature search runs in the background. Codex starts the run, checks on it and gives you the json when it's ready.

**What does PubMed cover?**

PubMed contains more than 40 million citations and abstracts from biomedical literature. MEDLINE is its largest component; PMC contributes citations for archived full-text articles.

**How far back does the literature go?**

PubMed supports searches for literature from 1946 onward. A small number of articles published before 1946 are searchable through records from PMC.

**How often does PubMed receive new citations?**

New citations from MEDLINE journals appear daily. That schedule describes citation availability, rather than a guarantee that every new publication immediately has a record.

**Does every PubMed record include full text?**

PubMed contains citations and abstracts rather than full journal articles. Full-text links can lead to PMC or a publisher, so a PubMed record alone does not establish PMC text availability.

**Are PubMed’s citing-article lists complete?**

No. PubMed explicitly says its cited-by list may omit works that cite a paper, so the returned list should not be presented as its total citation count.

