# How to find arXiv articles

I found at Twitter that is possible to search for arXiv articles with Mathematica, e.g. the following code:

arXiv = ServiceConnect["ArXiv"];
articles = arXiv["Search", {"Query" -> "Mathematica"}];
articles[All, {"URL", "Title"}]


gives as result:

My question is:

1. How can I specify the time range in between the articles were published?

2. Is it possible to combine search keywords with binary operators (AND, OR, etc.)?

UPDATE:

To my second question:

articles =
arXiv["Search", {"Query" -> {"Title" -> {"Mathematica" | "Solving"}}}];


searches for all articles containing "Mathematica" OR "Solving" in "Title"

articles =
arXiv["Search", {"Query" -> {"Title" -> {"Mathematica", "Solving"}}}];


searches for all articles containing "Mathematica" AND "Solving" in "Title"

• Interesting that you only get 10 results - on the ArXiv web page there are more than 1000 hits - ah one needs a , MaxItems -> 250 or some such. – user21 Dec 3 '16 at 19:34
• Just use google :) – M.R. Dec 7 '16 at 16:11

Following up on the previous answer you can restrict by date pretty trivially using Mathematica:

arXiv = ServiceConnect["ArXiv"];
articles = arXiv["Search", {
"Query" -> "Mathematica",
"MaxItems" -> 1000,
"SortBy" -> "DateSubmitted"}];

selectFromRange[articles_, dmin_, dmax_] :=

With[{min = DateObject@Normal@dmin, max = DateObject@Normal@dmax},
articles[Select[min < #Published < max &]]
];

selectFromRange[articles, DateObject@Today[{"Year"}], Today]


Looking through the API documentation there doesn't seem to be a way to restrict within an API call and so any processing by date would have to be done after the fact anyway.

• That could be shortened a fair bit: articles[Select[#Updated ~Between~ {DateObject[{2016, 12, 20}], Today} &]]. – J. M. will be back soon Dec 29 '16 at 18:54
• I figured for generality I'd leave the conversion of an arbitrary DateObject to it's most expanded form. Size comparisons for DateObjects with the different degrees of specificity, e.g., DateObject[{2016, 12}] and DateObject[{2016, 12, 10}] don't evaluate and the Normal scheme gets them to (by expanding to a DateList. One error though is that Today["Year"] should be DateObject@Today[{"Year"}]. – b3m2a1 Dec 29 '16 at 18:59
• Huh. This works, tho: articles[Select[#Published ~Between~ {DateObject[{2016, 10}], DateObject[{2016, 12}]} &]] – J. M. will be back soon Dec 29 '16 at 19:17
• That should select anything from Dec 11 2016. Try: Between[DateObject[{2016, 12, 10}], {DateObject[{2016, 10}], DateObject[{2016, 12}]}] to see what I mean. You get DateObject[{2016, 12, 10}] <= DateObject[{2016, 12}] as a return. – b3m2a1 Dec 29 '16 at 19:20

Something like this:

arXiv = ServiceConnect["ArXiv"];

articles =
arXiv["Search", {"Query" -> {"Abstract" -> {"Eigenvalues",
"Mathematica"}}, MaxItems -> 25, "SortBy" -> "DateSubmitted"}];
articles[All, {"URL", "Title", "Published"}]