Below, I will show you how to create a custom search engine shortcut in your web browser to a Wallabag instance. Wallabag is free-and-open-source read-it-later software. The developers of Wallabag run a paid Wallabag service. It provides similar functionality to Mozilla’s Pocket service.

The Idea For A Wallabag Custom Search Shortcut

Instead of using a single search engine for all of my web searching, I employ a growing number of custom search engine shortcuts in Firefox. In short, this means that I add search engines (including single-site searches) to the list of default search engines (my primary browser at the moment is Firefox) and then assign shortcuts to them so that I can direct searches to them from my address bar. For example, if I want to search for something in the Arch Linux Wiki, I need only type :archw before my query. I demonstrated the potential of search engine shortcuts in two earlier posts showing how to create timer shortcuts in Brave, DuckDuckGo, and Google.

Despite my affinity for custom search engine shortcuts, it had not occurred to me to create one for Wallabag. As I explained at the top, Wallabag is a free and open source read-it-later tool with similar functionality to Mozilla’s Pocket. I have self-hosted Wallabag before, but at the moment I am using it with an account on the service run by its developers. It is amenable to different use-cases. Because it archives articles and allows for highlights and tagging, it can function as a link archiving service and repository. However, my main use case for it is as a read-it-later tool. Reading articles in Wallabag is usually more pleasant and less cluttered than reading articles in their original form. For this reason, when I find interesting internal links in articles in my RSS feeds or elsewhere around the web, I send them to Wallabag.

Despite the fact that my main use-case for Wallabag is for reading rather than archiving, I currently (as of this writing) have accumulated 1925 articles since early August. It provides full-text search of all articles in its database, so being able to find articles that are on my to-do list or that I read and saved is useful. Before, when I wanted to search for an article in Wallabag, I would navigate to the homepage my account page. When I undertook this process today, it occurred to me that it would be much more convenient for me to be able to search directly in my browser’s address bar or search box.

General Rules For Adding Custom Search Engines

Before continuing, I will refer you to resources on adding custom search engines to your browser. If you use Chrome or a browser based on Chromium (e.g., Microsoft Edge, Chromium, Brave, Vivaldi, Opera), consult this guide provided by Google. If you use Firefox like I do, I recommend installing one of the two following free and open source extensions to make adding new search engines convenient:

In many cases, you can also add search engines in Firefox from the search bar (the search bar is distinguishable from the address bar).

For both Chromium-based browsers and Firefox and its derivatives, you can assign shortcuts to search engines and designate a default search engine in the search engine settings.

Preface Note on Wallabag

For these examples, I am using the developer-run Wallabag service at https://app.wallabag.com. Because Wallabag can be self-hosted, your domain will be different if you are using it on your own server or on a server hosted by an entity unrelated to the main project. The following URL examples will only work with the Wallabag service run by the developers. However, the template should be the same for Wallabag instances under different domains. You can apply my examples while changing the URLs so that the app.wallabag.it/ part of the URL instead matches the URL of your instance.

Creating a Wallabag Custom Search Shortcut

I explained how to create a search engine shortcut in detail in my article on timer shortcuts for Brave and DuckDuckGo:

In general, in order to add a specific search engine to the browser, you need that search engine’s GET URL … This will come in the form of a URL string for a search performed with the search engine but with %s in place of the query.

(Also see my piece on domain-specific full text searches.)

For example, if you search for Wallabag at The New Leaf Journal (using our search box), the resulting URL string is: https://thenewleafjournal.com/?s=wallabag. If you want to add The New Leaf Journal search to your browser, you have to replace wallabag with %s. Thus, the resulting URL is:
https://thenewleafjournal.com/?s=%s.

(For those of you who want to add us to your browser, you can also use
https://thenewleafjournal.com/search/%s).

The URL for the official Wallabag service is https://app.wallabag.it/. In order to figure out what URL I needed in order to create my custom search, I decided to try a search for the term markdown. The resulting query is as follows:

Screenshot of a Wallabag account and archive in the Firefox web browser.

Our URL is:
https://app.wallabag.it/search?currentRoute=all&search_entry%5Bterm%5D=markdown.

Just like before, we replace the query, here being markdown, with %s:
https://app.wallabag.it/search?currentRoute=all&search_entry%5Bterm%5D=%s.

I then used the Search Engines Helper extension to add my custom Wallabag search to Firefox and assigned it the shortcut :wb:

Custom search engines with shortcuts in the Firefox web browser.

Now I try my shortcut. While on The New Leaf Journal homepage, I typed :wb markdown into my address bar. Because :wb was the shortcut which I assigned to Wallabag, Firefox indicates that the search query will go to Wallabag.

Custom search engine for Wallabag with shortcut.

Now let us hit enter.

Screenshot of Wallabag archive with the user searching for saved articles with the word "markdown"

Using the shortcut, I was able to jump straight into Wallabag from an open page on The New Leaf Journal.

Creating Additional Wallabag Search Shortcuts

Look carefully at the first Wallabag shortcut that I created:
https://app.wallabag.it/search?currentRoute=all&search_entry%5Bterm%5D=%s.

Note the part of the URL which reads: currentRoute=all. Wallabag has several categories: Unread, Starred, Archive, With annotations, All entries, and Tags. It is possible to create different custom search engine shortcuts for most of these entries.

For example, let us say that you only wanted to search in articles that you previously starred. In that case, your shortcut would be: https://app.wallabag.it/search?currentRoute=starred&search_entry%5Bterm%5D=%s.

Special shortcuts are possible for other paths:

  • Archived entries:
    https://app.wallabag.it/search?currentRoute=archive&search_entry%5Bterm%5D=%s
  • Unread entries:
    https://app.wallabag.it/search?currentRoute=unread&search_entry%5Bterm%5D=%s
  • Annotated entries:
    https://app.wallabag.it/search?currentRoute=annotated&search_entry%5Bterm%5D=%s
  • Tagged entries:
    https://app.wallabag.it/search?currentRoute=tag&search_entry%5Bterm%5D=%s

You can add each one of these custom searches as a distinct custom search engine to your browser. So long as you are logged into your Wallabag account, you can easily find content in your Wallabag archive straight from your browser’s address bar (if you enable address bar search) or from your designated search box.

Applying These Lessons Elsewhere

The same principle behind my Wallabag search engine shortcuts should work for a number of other similar services, self-hosted and otherwise. For example, while I do not use Pocket or Instapaper, I will venture that it should be possible to create custom search engines with shortcuts for those services as well.

Custom Search Engine Shortcut for TinyGem

In order to show how the principle applies in a different context, I will use TinyGem as an example. TinyGem is a well-designed and feature-rich social-bookmarking service (see my account). Like Wallabag, it supports searching through bookmarks. I tried a search for markdown using TinyGem’s on-site search:

Search in the TinyGem bookmarking service.

My resulting URL is: https://tinygem.org/search/link/?search=markdown&user=on.

While it looks different than the Wallabag search URL, you can clearly see the search query toward the end of the URL. Note here that I have TinyGem configured to search only my own bookmarks. If I were to toggle on Public Feeds or Tags, the URL would be different (but the method for creating a custom search engine would be the same). Because I am only demonstrating how the method I used with Wallabag applies on a different bookmarking service, I will stick with the search of my own bookmarks.

Following the rule, my custom search engine URL is: https://tinygem.org/search/link/?search=%s&user=on.

After adding my TinyGem search engine to my list of search engines and assigning it :tg as a shortcut, I tried a search:

Search with TinyGem custom search engine.

It worked exactly as expected:

Screenshot of search box in Tiny Gem bookmarking service.

Creating shortcuts for TinyGem works the same as creating shortcuts for Wallabag. I will venture, without having confirmed it myself, that most similar bookmarking and read-it-later services support the same custom search engine shortcut functionality.

Conclusion

I have come across many complaints about the current state of general search engines. While results vary depending on your search engine and your particular needs, there are many legitimate concerns regarding search engine centralization, advertising, and different websites abuse of search algorithms with bad content. Google dominates the search market in the United States, and most of the alternative search engines rely on Bing.

While generalist search engines are necessary, one way to improve your searching experience is through adding custom search engines to your browser. For example, I discussed how I use a DuckDuckGo domain-specific Project Gutenberg search to search the texts of books on Project Gutenberg. I noted above that I use a custom search for the Arch Wiki to look up information about my computer. Custom searches for link-management and read-it-later services offer another way to search through content that you have already marked as noteworthy or interesting. With a bit of effort and ingenuity, it is possible to fine-tune your browser and searching experience to quickly find useful information about many of topics.