TL;DR
arXiv's API provides search access to 2.5+ million scholarly papers across physics, mathematics, computer science, quantitative biology, quantitative finance, statistics, electrical engineering, and economics. Submit complex search queries with boolean operators, filter by category and date range, and retrieve paper metadata including title, authors, abstract, categories, and PDF links. Returns Atom XML. No API key required.
Quick start: http://export.arxiv.org/api/query?search_query=all:electron&start=0&max_results=1
No API key needed — free academic paper search!
How to Use This API
1. Basic Search
Search all fields for "electron":
http://export.arxiv.org/api/query?search_query=all:electron&max_results=2
2. Search by Title and Author
http://export.arxiv.org/api/query?search_query=ti:transformer+AND+au:vaswani
3. Filter by Category
http://export.arxiv.org/api/query?search_query=cat:cs.AI+AND+all:machine+learning&max_results=5
4. JavaScript — Parse arXiv XML
fetch('http://export.arxiv.org/api/query?search_query=all:quantum+computing&max_results=5')
.then(r => r.text())
.then(xml => {
const parser = new DOMParser();
const doc = parser.parseFromString(xml, 'text/xml');
const entries = doc.querySelectorAll('entry');
entries.forEach(entry => {
const title = entry.querySelector('title').textContent.trim();
const authors = [...entry.querySelectorAll('author name')].map(a => a.textContent);
const summary = entry.querySelector('summary').textContent.trim().slice(0, 100);
const pdf = entry.querySelector('link[title="pdf"]')?.getAttribute('href');
console.log(`${title}\n By: ${authors.join(', ')}\n PDF: ${pdf}\n`);
});
});
5. Python — Search and Summarize
import requests, xml.etree.ElementTree as ET
resp = requests.get(
'http://export.arxiv.org/api/query',
params={'search_query': 'cat:cs.LG+AND+all:reinforcement+learning',
'start': 0, 'max_results': 5}
)
root = ET.fromstring(resp.text)
ns = {'a': 'http://www.w3.org/2005/Atom'}
for entry in root.findall('a:entry', ns):
title = entry.find('a:title', ns).text.strip()
authors = [a.find('a:name', ns).text for a in entry.findall('a:author', ns)]
pdf_link = entry.find('a:link[@title="pdf"]', ns)
pdf_url = pdf_link.get('href') if pdf_link is not None else 'N/A'
print(f"• {title[:70]}...")
print(f" Authors: {', '.join(authors[:3])}...")
print(f" PDF: {pdf_url}\n")
http://export.arxiv.org/api/query?search_query=all:electron&max_results=1
Frequently Asked Questions
- What search prefixes are available?
all(all fields),ti(title),au(author),abs(abstract),co(comment),jr(journal reference),cat(subject category),rn(report number). Combine with AND, OR, ANDNOT.- What subject categories are available?
- Major categories:
cs(Computer Science),math,physics,astro-ph,cond-mat,hep-th,q-bio,q-fin,stat,eess,econ. Subcategories available:cs.AI,cs.LG,math.AG, etc. - What format does the API return?
- Atom XML with OpenSearch extensions. Parse with DOMParser (browser) or xml.etree.ElementTree (Python). The response includes
entryelements for each result with title, authors, abstract, categories, links, and published date. - How many results can I retrieve?
- Up to 30,000 results per query. Paginate with
start(offset) andmax_results(max 2000 per request). Usemax_results=0to get just the total count. - Is there a rate limit?
- No documented rate limits, but be reasonable. The arXiv API is a free service provided by Cornell University. Avoid making rapid repeated queries. Use caching where possible.
- Can I get the full PDF from the API results?
- Yes — each entry includes a link with
title="pdf"pointing to the PDF download URL. The API returns the metadata; you download PDFs separately from the arXiv site.
API Details
- API URL
http://export.arxiv.org/api/query- Documentation
- arXiv API Documentation
- Category
- Academic
- Authentication
- Not Required
- Output Format
- Atom XML
What You Can Build
- Daily paper alert system for new arXiv submissions in your field
- Research paper recommender by category and author network
- Literature review aggregator collecting papers on a topic
- Conference paper tracker watching for submissions from specific authors
- Citation network visualizer linking related arXiv papers