arXiv API
Query the arXiv repository of scientific papers and preprints.
What it does
The arXiv API is a search interface to the arXiv preprint repository (physics, maths, computer science, quantitative biology, economics and more). Query by keyword, author, category or arXiv ID and get back article metadata: title, abstract, authors, categories, dates and PDF links.
Base URL
Authentication
None. Note the response is Atom XML, not JSON — parse it with an Atom/feed library. Parameters: search_query, id_list, start, max_results, sortBy.
Code examples
curl -s "http://export.arxiv.org/api/query?search_query=all:transformer+AND+cat:cs.CL&start=0&max_results=5"
import urllib.request, feedparser
url = ("http://export.arxiv.org/api/query?"
"search_query=au:Hinton&sortBy=submittedDate&sortOrder=descending&max_results=5")
feed = feedparser.parse(urllib.request.urlopen(url).read())
for e in feed.entries:
print(e.published[:10], e.title.strip())Rate limits & quotas
arXiv asks callers to make no more than one request every 3 seconds and to page in batches of at most ~2,000 with start/max_results. For bulk or full-corpus harvesting use the separate OAI-PMH interface, not this search API. Excessive traffic gets your IP throttled.
Key response fields
| feed.entry[].title / summary | Article title and abstract |
| feed.entry[].author[].name | Author names |
| feed.entry[].published / updated | Submission and last-revision dates |
| feed.entry[].id | Canonical arXiv URL (contains the ID and version) |
| feed.entry[].arxiv:primary_category | Main subject category (e.g. cs.LG) |
| feed.opensearch:totalResults | Total number of matches for the query |
Common errors
| (empty feed) | No matches, or a malformed search_query — check field prefixes (ti:, au:, cat:). |
| 400 | Bad parameter combination (e.g. both id_list and an incompatible sort). |
| 503 / slow responses | You are querying too fast — add the 3-second delay. |
When to use it (and alternatives)
The tool for literature search, ‘papers by this author’ feeds, and research dashboards. For citation graphs and richer metadata across publishers, Semantic Scholar or Crossref are complementary. For space-mission data see Launch Library 2.
FAQ
Why is the response XML and not JSON?
The arXiv API predates the JSON norm and returns Atom. Use feedparser (Python), a generic Atom parser, or an XML-to-dict step. The structure is stable and well documented.
How do I search a specific field?
Prefix the term: ti: title, au: author, abs: abstract, cat: category, all: everything. Combine with AND/OR/ANDNOT.
Can I get a specific paper by ID?
Yes — ?id_list=2301.00001 (comma-separated for several). Append v2 etc. for a specific version.
New to APIs?
Short guides for working with this API — and any other.