$npx -y skills add adityahimaone/hermes-agent-rtk-caveman --skill arxivSearch and retrieve academic papers from arXiv using their free REST API. No API key needed. Search by keyword, author, category, or ID. Combine with web_extract or the ocr-and-documents skill to read full paper content.
| 1 | # arXiv Research |
| 2 | |
| 3 | Search and retrieve academic papers from arXiv via their free REST API. No API key, no dependencies — just curl. |
| 4 | |
| 5 | ## Quick Reference |
| 6 | |
| 7 | | Action | Command | |
| 8 | |--------|---------| |
| 9 | | Search papers | `curl "https://export.arxiv.org/api/query?search_query=all:QUERY&max_results=5"` | |
| 10 | | Get specific paper | `curl "https://export.arxiv.org/api/query?id_list=2402.03300"` | |
| 11 | | Read abstract (web) | `web_extract(urls=["https://arxiv.org/abs/2402.03300"])` | |
| 12 | | Read full paper (PDF) | `web_extract(urls=["https://arxiv.org/pdf/2402.03300"])` | |
| 13 | |
| 14 | ## Searching Papers |
| 15 | |
| 16 | The API returns Atom XML. Parse with `grep`/`sed` or pipe through `python3` for clean output. |
| 17 | |
| 18 | ### Basic search |
| 19 | |
| 20 | ```bash |
| 21 | curl -s "https://export.arxiv.org/api/query?search_query=all:GRPO+reinforcement+learning&max_results=5" |
| 22 | ``` |
| 23 | |
| 24 | ### Clean output (parse XML to readable format) |
| 25 | |
| 26 | ```bash |
| 27 | curl -s "https://export.arxiv.org/api/query?search_query=all:GRPO+reinforcement+learning&max_results=5&sortBy=submittedDate&sortOrder=descending" | python3 -c " |
| 28 | import sys, xml.etree.ElementTree as ET |
| 29 | ns = {'a': 'http://www.w3.org/2005/Atom'} |
| 30 | root = ET.parse(sys.stdin).getroot() |
| 31 | for i, entry in enumerate(root.findall('a:entry', ns)): |
| 32 | title = entry.find('a:title', ns).text.strip().replace('\n', ' ') |
| 33 | arxiv_id = entry.find('a:id', ns).text.strip().split('/abs/')[-1] |
| 34 | published = entry.find('a:published', ns).text[:10] |
| 35 | authors = ', '.join(a.find('a:name', ns).text for a in entry.findall('a:author', ns)) |
| 36 | summary = entry.find('a:summary', ns).text.strip()[:200] |
| 37 | cats = ', '.join(c.get('term') for c in entry.findall('a:category', ns)) |
| 38 | print(f'{i+1}. [{arxiv_id}] {title}') |
| 39 | print(f' Authors: {authors}') |
| 40 | print(f' Published: {published} | Categories: {cats}') |
| 41 | print(f' Abstract: {summary}...') |
| 42 | print(f' PDF: https://arxiv.org/pdf/{arxiv_id}') |
| 43 | print() |
| 44 | " |
| 45 | ``` |
| 46 | |
| 47 | ## Search Query Syntax |
| 48 | |
| 49 | | Prefix | Searches | Example | |
| 50 | |--------|----------|---------| |
| 51 | | `all:` | All fields | `all:transformer+attention` | |
| 52 | | `ti:` | Title | `ti:large+language+models` | |
| 53 | | `au:` | Author | `au:vaswani` | |
| 54 | | `abs:` | Abstract | `abs:reinforcement+learning` | |
| 55 | | `cat:` | Category | `cat:cs.AI` | |
| 56 | | `co:` | Comment | `co:accepted+NeurIPS` | |
| 57 | |
| 58 | ### Boolean operators |
| 59 | |
| 60 | ``` |
| 61 | # AND (default when using +) |
| 62 | search_query=all:transformer+attention |
| 63 | |
| 64 | # OR |
| 65 | search_query=all:GPT+OR+all:BERT |
| 66 | |
| 67 | # AND NOT |
| 68 | search_query=all:language+model+ANDNOT+all:vision |
| 69 | |
| 70 | # Exact phrase |
| 71 | search_query=ti:"chain+of+thought" |
| 72 | |
| 73 | # Combined |
| 74 | search_query=au:hinton+AND+cat:cs.LG |
| 75 | ``` |
| 76 | |
| 77 | ## Sort and Pagination |
| 78 | |
| 79 | | Parameter | Options | |
| 80 | |-----------|---------| |
| 81 | | `sortBy` | `relevance`, `lastUpdatedDate`, `submittedDate` | |
| 82 | | `sortOrder` | `ascending`, `descending` | |
| 83 | | `start` | Result offset (0-based) | |
| 84 | | `max_results` | Number of results (default 10, max 30000) | |
| 85 | |
| 86 | ```bash |
| 87 | # Latest 10 papers in cs.AI |
| 88 | curl -s "https://export.arxiv.org/api/query?search_query=cat:cs.AI&sortBy=submittedDate&sortOrder=descending&max_results=10" |
| 89 | ``` |
| 90 | |
| 91 | ## Fetching Specific Papers |
| 92 | |
| 93 | ```bash |
| 94 | # By arXiv ID |
| 95 | curl -s "https://export.arxiv.org/api/query?id_list=2402.03300" |
| 96 | |
| 97 | # Multiple papers |
| 98 | curl -s "https://export.arxiv.org/api/query?id_list=2402.03300,2401.12345,2403.00001" |
| 99 | ``` |
| 100 | |
| 101 | ## BibTeX Generation |
| 102 | |
| 103 | After fetching metadata for a paper, generate a BibTeX entry: |
| 104 | |
| 105 | {% raw %} |
| 106 | ```bash |
| 107 | curl -s "https://export.arxiv.org/api/query?id_list=1706.03762" | python3 -c " |
| 108 | import sys, xml.etree.ElementTree as ET |
| 109 | ns = {'a': 'http://www.w3.org/2005/Atom', 'arxiv': 'http://arxiv.org/schemas/atom'} |
| 110 | root = ET.parse(sys.stdin).getroot() |
| 111 | entry = root.find('a:entry', ns) |
| 112 | if entry is None: sys.exit('Paper not found') |
| 113 | title = entry.find('a:title', ns).text.strip().replace('\n', ' ') |
| 114 | authors = ' and '.join(a.find('a:name', ns).text for a in entry.findall('a:author', ns)) |
| 115 | year = entry.find('a:published', ns).text[:4] |
| 116 | raw_id = entry.find('a:id', ns).text.strip().split('/abs/')[-1] |
| 117 | cat = entry.find('arxiv:primary_category', ns) |
| 118 | primary = cat.get('term') if cat is not None else 'cs.LG' |
| 119 | last_name = entry.find('a:author', ns).find('a:name', ns).text.split()[-1] |
| 120 | print(f'@article{{{last_name}{year}_{raw_id.replace(\".\", \"\")},') |
| 121 | print(f' title = {{{title}}},') |
| 122 | print(f' author = {{{authors}}},') |
| 123 | print(f' year = {{{year}}},') |
| 124 | print(f' eprint = {{{raw_id}}},') |
| 125 | print(f' archivePrefix = {{arXiv}},') |
| 126 | print(f' primaryClass = {{{primary}}},') |
| 127 | print(f' url = {{https://arxiv.org/abs/{raw_id}}}') |
| 128 | print('}') |
| 129 | " |
| 130 | ``` |
| 131 | {% endraw %} |
| 132 | |
| 133 | ## Reading Paper Content |
| 134 | |
| 135 | After finding a paper, read it: |
| 136 | |
| 137 | ``` |
| 138 | # Abstract page (fast, metadata + abstract) |
| 139 | web_extrac |