Back to articles
arXiv API: Search 2M+ Research Papers Programmatically (No Key)

arXiv API: Search 2M+ Research Papers Programmatically (No Key)

via Dev.to TutorialАлексей Спинов

arXiv has over 2 million papers and a completely free API. No authentication, no rate limits (within reason), structured XML responses. Basic Search curl 'http://export.arxiv.org/api/query?search_query=all:machine+learning&max_results=5' Returns Atom XML with: title, abstract, authors, categories, published date, PDF link. Node.js Example async function searchArxiv ( query , maxResults = 10 ) { const url = `http://export.arxiv.org/api/query?search_query=all: ${ encodeURIComponent ( query )} &max_results= ${ maxResults } &sortBy=submittedDate&sortOrder=descending` ; const res = await fetch ( url ); const xml = await res . text (); // Simple XML parsing without dependencies const entries = xml . split ( ' <entry> ' ). slice ( 1 ); return entries . map ( entry => ({ title : entry . match ( /<title> ( .* ?) < \/ title>/ s )?.[ 1 ]?. trim (), abstract : entry . match ( /<summary> ( .* ?) < \/ summary>/ s )?.[ 1 ]?. trim (). substring ( 0 , 200 ), published : entry . match ( /<published> ( .

Continue reading on Dev.to Tutorial

Opens in a new tab

Read Full Article
2 views

Related Articles