Searches arXiv for preprints and scholarly articles with field-specific queries, boolean logic, date filtering, and pagination. Handles Atom XML parsing, rate limits, and query encoding.
Ships in arxiv-search. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Search and retrieve metadata for preprints on arXiv, the open-access repository for scholarly articles.
The arXiv API returns Atom 1.0 XML — there is no JSON option. You must parse XML to extract results. The Python script handles this automatically.
export.arxiv.org, not arxiv.orghttps://export.arxiv.org/api/query?search_query=all:transformer&max_results=5
Using arxiv.org directly will not work for API queries.
Use AND, OR, ANDNOT — lowercase will not work:
search_query=ti:attention AND ti:transformer
search_query=cat:cs.AI ANDNOT cat:cs.CL
Pass the query to the Python script exactly as you would type it, with real quotes, parentheses and spaces. The script URL-encodes it for you:
api.search('ti:"classical Chinese"') # phrase search
api.search('au:bengio AND (cat:cs.LG OR cat:cs.AI)') # grouping
Do not write %22, %28 or + yourself. If you do, the query is encoded twice and arXiv finds nothing (ti:%22classical+Chinese%22 returned 0 results, ti:"classical Chinese" returned 36, checked 2026-10-26). Since version 1.0.2 the script detects hand-encoded input (%22, %28, %29, %5B, %5D, %3A, %20) and decodes it once, but plain text is the clear way.
Only when you build a raw URL yourself (for example with curl) must you encode: quotes %22, parentheses %28 %29, spaces +:
https://export.arxiv.org/api/query?search_query=ti:%22large+language+model%22
search_query=submittedDate:[202401010000+TO+202412312359]
Format: YYYYMMDDHHMM (12 digits) in GMT, 24-hour. Do not put a T between date and time; arXiv returns an error if you do. Combine with other queries using AND.
arXiv asks for a minimum 3-second delay between API calls. Results update once daily, so there is no reason to poll frequently.
max_results caps at 2000 per request| Prefix | Field |
|---|---|
ti | Title |
au | Author |
abs | Abstract |
co | Comment |
jr | Journal Reference |
cat | Subject Category |
rn | Report Number |
id_list | Specific arXiv IDs (comma-separated, passed as separate param) |
all | All fields simultaneously |
Use scripts/arxiv_api.py for programmatic access (zero dependencies).
Working directory: from scripts.arxiv_api import ArxivAPI only works when Python runs from inside the skill folder (the folder that holds this SKILL.md). From anywhere else, add the folder to the path first:
import sys
sys.path.insert(0, "/path/to/arxiv-search") # the folder with SKILL.md
from scripts.arxiv_api import ArxivAPI
api = ArxivAPI()
# Simple keyword search
results = api.search("all:transformer attention mechanism", max_results=10)
# Field-specific search
results = api.search("ti:diffusion AND cat:cs.CV", max_results=5)
# Author search
results = api.search("au:hinton AND cat:cs.LG", max_results=20)
# Humanities example: NLP work on premodern Chinese texts
# (18 results on 2026-10-26)
results = api.search('ti:"ancient Chinese" AND cat:cs.CL', max_results=20)
results = api.search('ti:"classical Chinese" AND (cat:cs.CL OR cat:cs.AI)') # 35 results
# Date-filtered search
results = api.search(
"cat:cs.AI AND submittedDate:[202401010000 TO 202412312359]",
sort_by="submittedDate",
sort_order="descending",
max_results=50
)
# Fetch specific papers by arXiv ID
results = api.fetch_by_ids(["2301.07041", "2303.08774", "2305.10601"])
# Paginated retrieval
page1 = api.search("cat:cs.CL", max_results=100, start=0)
page2 = api.search("cat:cs.CL", max_results=100, start=100)
# The search returns a dict: total_results, start_index, items_per_page, entries.
# Each item in results["entries"] is a dict with keys:
# id, title, summary, authors, published, updated,
# categories, primary_category, links, comment, journal_ref, doi
| Category | Description |
|---|---|
cs.AI | Artificial Intelligence |
cs.CL | Computation and Language (NLP) |
cs.CV | Computer Vision |
cs.LG | Machine Learning |
cs.CR | Cryptography and Security |
cs.DS | Data Structures and Algorithms |
cs.SE | Software Engineering |
math.AG | Algebraic Geometry |
math.CO | Combinatorics |
physics.hep-th | High Energy Physics - Theory |
quant-ph | Quantum Physics |
stat.ML | Machine Learning (Statistics) |
econ.GN | General Economics |
q-bio.GN | Genomics |
Full list: https://arxiv.org/category_taxonomy
references/api_reference.md — Complete API specs for query parameters, response fields, and error handlingscripts/arxiv_api.py — Python client with XML parsing, rate limiting, and pagination supportReport a problem. This skill is part of the public repository kltng/humanities-skills. If it fails (an API changed, a script errors, or these instructions are wrong), report it as a GitHub issue:
gh issue list --repo kltng/humanities-skills --state all --search "arxiv-search"gh issue create --repo kltng/humanities-skills --label bug --title "[arxiv-search] <short summary>" --body "<details>". Without gh, give the user this link: https://github.com/kltng/humanities-skills/issues/new?template=skill-problem.ymlCredit the source. The data comes from arXiv, through the arXiv API. arXiv asks every project that uses the API to show this sentence:
Thank you to arXiv for use of its open access interoperability.
Put it in any paper, page or tool built on these results. arXiv's descriptive metadata (titles, authors, abstracts, categories) is CC0. The papers themselves are not: each has its own licence, shown on its abstract page. Terms of use: https://info.arxiv.org/help/api/tou.html.
Cite. If this skill helped work that is published, please cite it, together with the source credited above:
Tang, Kwok-leong. humanities-skills: arxiv-search (version ). GitHub, . https://github.com/kltng/humanities-skills
When you help a user write up results that relied on this skill, remind them once about this citation and the credit above.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
/arxiv-search:arxiv-searchfrom arxiv-search
npx claudepluginhub kltng/humanities-skills --plugin arxiv-searchOther plugins' skills for the same job