# div papers

> Search arXiv without an API key and print papers one per line, or in full by ID.

## Synopsis

```text
div papers search <query> [--author <name>] [--category <cat>] [--sort <by>] [--limit <n>] [--json]
div papers get <id...> [--json]
```

Searches [arXiv](https://arxiv.org) and prints papers. Needs no API key and costs nothing.

## Subcommands

| Subcommand | Description |
| --- | --- |
| `search` | Search arXiv and print one paper per line. |
| `get` | Print one or more papers in full, including the abstract. |

## Arguments

| Argument | Description |
| --- | --- |
| `<query>` | Words to search for. Every word must appear in the paper, except stopwords such as "of" and "the". A phrase in double quotes must appear as written. A query in [arXiv's syntax](https://info.arxiv.org/help/api/user-manual.html#query_details) (`ti:`, `au:`, `abs:`, `cat:`, `AND`, `OR`, `ANDNOT`) is sent unchanged. |
| `<id...>` | One or more arXiv IDs, in any of these forms: `2410.17954`, `2410.17954v1`, `arXiv:2410.17954`, `hep-th/9901001`, or an abs or pdf URL. An ID without a version returns the latest version. |

## Flags

| Flag | Description | Default |
| --- | --- | --- |
| `--author <name>` | `search`: only papers by this author. | |
| `--category <cat>` | `search`: only papers in this category, such as `cs.LG`. | |
| `--sort <by>` | `search`: `relevance`, or newest first by `submitted` or `updated`. | `relevance` |
| `--limit <n>` | `search`: number of papers, 1 to 100. | `10` |
| `--json` | Print arXiv's response as JSON. | |

## Output

`search` prints one paper per line on stdout: ID, date of the first version, primary category and title. The match count goes to stderr.

```text
$ div papers search mixture of experts inference --limit 3
2410.17954v2  2024-10-23  cs.AI  ExpertFlow: Efficient Mixture-of-Experts Inference via Predictive Expert Caching and Token Scheduling
2402.14800v2  2024-02-22  cs.CL  Not All Experts are Equal: Efficient Expert Pruning and Skipping for Mixture-of-Experts Large Language Models
2601.15021v1  2026-01-21  cs.LG  Mixture-of-Experts Models in Vision: Routing, Optimization, and Generalization
3 of 1137 papers match. Run `div papers get <id>` for the abstract.
```

`get` prints the title, authors, categories, dates, links, the authors' comment and the abstract:

```text
$ div papers get 2410.17954
2410.17954v2  ExpertFlow: Efficient Mixture-of-Experts Inference via Predictive Expert Caching and Token Scheduling
Xin He, Shunkang Zhang, Kaijie Tang, Shaohuai Shi, Yuxin Wang, Zihao Zeng, Zhenheng Tang, Xiaowen Chu, Haiyan Yin, Ivor W. Tsang, Yew Soon Ong
cs.AI cs.CL · published 2024-10-23 · updated 2026-04-02
https://arxiv.org/abs/2410.17954v2  https://arxiv.org/pdf/2410.17954v2  https://doi.org/10.1145/3770743.3804292
Accepted in DAC'26, Mixture-of-Experts, Inference, Offloading

Sparse Mixture-of-Experts (MoE) models can outperform dense large language models at similar computation…
```

## Rate limits

arXiv allows about one request every three seconds. When it rejects a request for rate limiting, `div papers` exits `1`. Wait a few seconds and retry. Add a delay between searches in a loop.

## Exit codes

| Code | Meaning |
| --- | --- |
| `0` | Success. |
| `1` | arXiv could not be reached, rejected the query or rate-limited the request, or `get` could not find one of the IDs. Papers that were found are still printed. |
| `2` | Invalid flags, or an ID that is not an arXiv ID. |

## Examples

```bash
div papers search mixture of experts inference
div papers search '"speculative decoding"' --category cs.CL --sort submitted
div papers search --author 'Tri Dao' --limit 5
div papers search 'ti:lora ANDNOT abs:diffusion'
div papers get 2410.17954 2402.14800
div papers search mixture of experts | cut -d' ' -f1
```

The [MCP server](https://docs.divergentlabs.xyz/compute/mcp.md) provides the same operations as `search_papers` and `get_papers`.
