# Search Papers

## Basic Search

```bash
axm-bib search "loop invariants"
```

Returns up to 5 results by default from Semantic Scholar, with CrossRef as fallback.

## Control Result Count

```bash
# Get 10 results
axm-bib search "formal methods" -n 10

# Maximum is 100
axm-bib search "machine learning" -n 100
```

!!! warning "Limit validation"
    - Values ≤ 0 produce an error
    - Values > 100 are clamped to 100

## Abstract Display

By default, full abstracts are shown. You can control this:

```bash
# Hide abstracts entirely
axm-bib search "neural networks" --no-abstract

# Truncate to 100 characters
axm-bib search "neural networks" --abstract-len 100
```

## DOI Fallback

When a paper lacks a DOI, the arXiv ID is shown instead:

```
Year: 2017  DOI: arXiv:1706.03762
```

## Search Sources

`axm-bib` tries Semantic Scholar first, then falls back to CrossRef:

| Source | Abstract | Citations | arXiv ID |
|---|---|---|---|
| Semantic Scholar | ✅ | ✅ | ✅ |
| CrossRef (fallback) | ❌ | ❌ | ❌ |

## Python API

```python
from axm_bib.pipeline import BibPipeline

pipeline = BibPipeline()
papers = pipeline.search("attention mechanisms", limit=5)

for p in papers:
    print(f"{p.title} ({p.year}) — {p.doi}")
    print(f"  {p.abstract[:100]}...")
```
