3

Update: The arXiv has changed their search syntax so that setting it as a search engine for the Google omnibox now works in the conventional way (rendering this question moot).

For the record, this is the string you should use:

https://arxiv.org/search/?query=%s&searchtype=all

If you leave out the "&searchtype=all" flag, the search will fail to return anything.

If you'd like to complement this search with a Google search of the arXiv.org site (as suggested by @Arctiic in the comments), use this string:

https://www.google.com/search?q=%s+site%3Aarxiv.org


Old question:

I would like to be able to search the academic preprint server The arXiv from the Chrome omnibox. The actual search box I am trying to replicate can be found in the upper-right-hand corner of the arXiv.org homepage. (It's labeled "Search or Article-id".)

General instructions for adding new Chrome search engines can be found here. However, right-clicking on this arXiv box does not bring up the prompt "add as search engine". Instead, the arXiv website appears to use an unusual URL syntax, presumably created by some JavaScript on the page, such that I cannot manually use the url.com/search?q=%s syntax.

Searching for the string The quick brown fox is equivalent to entering the URL

http://arxiv.org/find/all/1/all:+AND+fox+AND+brown+AND+The+quick/0/1/0/all/0/1

which has the boolean operator AND inserted all over the place, along with +'s.

For someone like me with essentially no knowledge of JavaScript, is there a way to add arXiv search functionality to the omnibox in Chrome?

3
  • I'm confused. Why not just search whatever you want and add the site:arxiv.org operator? Otherwise, if you absolutely must have arXiv as a search engine entry via omnibox, I can only suggest: 1) find (or politely ask their web dev) for the parsing logic utilized when their URI...query(?? or path?) gets encoded from the search string input. 2) Politely ask their web dev "wtf were you thinking?!" 3) Find a way to automate or intercept the search input flow such that the string is modified accordingly. But wait, then you don't even need the search engine part, you just generate the URI.
    – Arctiic
    Commented Aug 9, 2022 at 4:58
  • Anyway, if the encoding process can be formulaically applied to the user input string, you could possibly create an AHK script that automates the conversion for you. Now if only you could do something crazy like somehow define an AHK script as a search engine, such that you could call upon it from any browser and it acts as a hosted service that converts your search term to the "finished" link? Naw, I'm just being crazy :)
    – Arctiic
    Commented Aug 9, 2022 at 5:07
  • "Why not just search whatever you want and add the site:arxiv.org operator?" I like having the omnibox and I want to be able to use the arXiv search, which is distinct from Google's search of the arXiv website. (Both are useful.). Luckily, in the last 8 years the arXiv has changed their search syntax and the conventional approach now works! Thanks for brining this to my attention; I'll edit the original question. Commented Aug 9, 2022 at 15:08

1 Answer 1

1

The below is a partial and incomplete answer to the question, as it only works for single-word searches.

This can be done directly from Chrome's Manage search engines tool in the Settings. You should add a new search engine, and provide the URL

http://arxiv.org/find/all/1/all:+AND+%s/0/1/0/all/0/1

I use arxiv as the keyword, which allows me fairly direct access: typing arxiv and then space will get me to the search mode, whereas arxiv and then tab will send me to arxiv.org.

The reason is that %s will change all spaces into %20s. Instead the desired behaviour is rather complicated:

  • For two terms, e.g. two terms, the desired string is two+terms.
  • For more than two terms, e.g. more than two terms, the desired string is terms+AND+two+AND+more+than.
2
  • 1
    Yes, I know that URL is what's generated when you manually run an arXiv search for two words, but the special form means it can't be used by Chrome for a search with an arbitrarily number of words. (If you use one word, or three or more, then it fails with this: "Search syntax error.") That's the entire reason I asked an arXiv-specific question. Commented May 7, 2014 at 17:36
  • Gah! Right you are. I only tested for single-word searches, apparently.
    – E.P.
    Commented May 7, 2014 at 18:04

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .