GuidesARXIV

arXiv API from JavaScript

Prefix https://proxy.cors.dev/ to an export.arxiv.org API URL: free, no signup, no key, 600 requests per minute, Atom XML up to 1 MiB, which fits about 400 results per call. The arXiv API sends no Access-Control-Allow-Origin header, so fetch() from your page fails with a CORS error. Through the proxy you can search papers by title, author, abstract, category and submission date, then parse the feed with DOMParser in a few lines.

Why the arXiv API fails in the browser

The arXiv API is one endpoint, https://export.arxiv.org/api/query, that answers GET requests with an Atom 1.0 feed, errors included. It needs no key, but its responses carry no Access-Control-Allow-Origin header, so a fetch() from your site is blocked by the browser even though the same URL opens fine in a tab. Through a proxy the request runs on a server and comes back with the header set to your origin.

Query syntax

search_query takes field prefixes joined with AND, OR and ANDNOT. Use id_list for papers you already know, and sortBy with sortOrder for newest first; the default order is relevance.

arXiv API query parameters, checked October 2026
GoalParameterNote
Words in the titlesearch_query=ti:transformerabs: searches abstracts, co: comments
Papers by an authorsearch_query=au:bengioSurname; join two-part names with _
An exact phrasesearch_query=ti:"large language model"Quotes are sent as %22
A subject categorysearch_query=cat:cs.AIAny arXiv category, such as math.CO or q-bio.NC
Combine fieldssearch_query=au:bengio AND cat:cs.LGAND, OR and ANDNOT, group with ( )
Leave something outsearch_query=cat:cs.CL ANDNOT ti:surveyANDNOT filters the left side
A submission date rangesearch_query=cat:cs.AI AND submittedDate:[202601010000 TO 202602010000]YYYYMMDDHHMM in GMT
Known papersid_list=1706.03762,1810.04805Latest version unless you add v1, v2
Newest firstsortBy=submittedDate&sortOrder=descendingOr lastUpdatedDate, relevance
Pagingstart=0&max_results=100Default 10, arXiv maximum 2,000 per call

Paging and arXiv rate limits

start and max_results page through a result set. arXiv allows up to 2,000 results per call and 30,000 in total, but on the free tier 1 MiB is the real ceiling: 400 recent cs.AI entries came to 999,810 bytes, and 500 returned 502 response_too_large. Pages of 100 to 200 are a comfortable size.

arXiv's terms ask for no more than one request every three seconds and one connection at a time, counted across everything you run. Results only change when new papers are announced once a day, so cache them instead of repeating a query.

Page through a large result set at arXiv speed
// Uses searchArxiv() from the example above, in a module script or the DevTools console
const sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms));

async function collect(query, { pageSize = 200, limit = 1000 } = {}) {
  const papers = [];
  for (let start = 0; start < limit; start += pageSize) {
    const page = await searchArxiv(query, { start, max: pageSize, sortBy: 'submittedDate' });
    papers.push(...page.papers);
    if (page.papers.length < pageSize || start + pageSize >= page.total) break;
    await sleep(3000);
  }
  return papers.slice(0, limit);
}

const recent = await collect('cat:cs.CL', { pageSize: 200, limit: 600 });
console.log(recent.length, recent[0]);

Category feeds such as https://rss.arxiv.org/rss/cs.AI also work through the proxy for a daily list of new papers, but they have no new papers on Saturdays and Sundays, when arXiv announces nothing. See fetch an RSS feed in JavaScript for parsing RSS.

  • cors.dev free tier: GET and HEAD, 600 requests per minute per client IP, no daily or monthly quota, text responses up to 1 MiB and 10 seconds for arXiv to answer. A 400-result query took about a second.
  • [Pro](/pricing): $5 per month for 500,000 requests, with a 7-day trial of 1,000 requests and no card. Responses up to 6 MiB of any content type.

Good questions.

Does the arXiv API need an API key?

No. export.arxiv.org/api/query is open to anyone who follows the arXiv API terms of use. The only obstacle in a browser is the missing CORS header.

How many results can I get per request?

arXiv returns up to 2,000 per call and 30,000 per query in total. Through the cors.dev free tier the 1 MiB response limit comes first, at about 400 entries, so page with start and max_results to get more.

How often may I call the arXiv API?

arXiv asks for at most one request every three seconds, one connection at a time, across all machines you control. New papers appear once a day, so the same query never needs to run more than daily.

How do I get the newest papers first?

Add sortBy=submittedDate&sortOrder=descending. Without them arXiv sorts by relevance, which is why API results look out of order next to the arxiv.org listing pages.

How do I search for an exact phrase?

Wrap it in double quotes inside the field, for example ti:"large language model", and let URLSearchParams encode it. Spaces become + and quotes become %22, which is what arXiv expects.

Can I download PDFs through the proxy?

Not on the free tier, which relays text responses only and returns 502 unsupported_response for a PDF. Link to the arxiv.org abstract or PDF page instead; arXiv also asks that you send readers there rather than serve copies yourself.