# Consult-web: A package to get web and omni search results directly in emacs minibuffer!

**URL:** <https://forum.systemcrafters.net/t/consult-web-a-package-to-get-web-and-omni-search-results-directly-in-emacs-minibuffer/603>\
**Category:** Emacs Lisp\
**Created:** [April 19, 2024, 9:45am UTC](https://forum.systemcrafters.net/t/consult-web-a-package-to-get-web-and-omni-search-results-directly-in-emacs-minibuffer/603 "2024-04-19T09:45:23Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![armindarvish](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.systemcrafters.net/armindarvish/32/464_2.png) [@armindarvish](https://forum.systemcrafters.net/u/armindarvish)\
**Post date:** [April 19, 2024, 9:45am UTC](https://forum.systemcrafters.net/t/consult-web-a-package-to-get-web-and-omni-search-results-directly-in-emacs-minibuffer/603/1 "2024-04-19T09:45:23Z")

</div>

![consult-web-sc](https://canada1.discourse-cdn.com/flex029/uploads/systemcrafters/original/1X/721f4b06e9df516916c2276650927270b85c07bd.gif)

My new package, [consult-web](https://github.com/armindarvish/consult-web) allows you to get search results from both online sources (google, bing, brave, wikipedia, …) and local sources (buffers, org notes, elfeed feeds, gptel ai chatbots, …) directly in minibuffer. It provides similar functionality to `consult-buffer` but on steroid! It uses `consult`, `url-retrieve` and API services form online sources.

GitHub Repo: [https://github.com/armindarvish/consult-web](https://github.com/armindarvish/consult-web)

For detailed demonstration of features, comparison with other packages, and usage examples see the YouTube video and the blog post below.

YouTube Video: [https://www.youtube.com/watch?v=7pDfyqBZwvo](https://www.youtube.com/watch?v=7pDfyqBZwvo)  
Blog Post: [https://www.armindarvish.com/post/web\_omni\_search\_in\_emacs\_with\_consult-web/](https://www.armindarvish.com/post/web_omni_search_in_emacs_with_consult-web/)

---

<div class="post-metadata">

**Author:** ![jabbo](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.systemcrafters.net/jabbo/32/502_2.png) [@jabbo](https://forum.systemcrafters.net/u/jabbo)\
**Post date:** [April 19, 2024, 2:13pm UTC](https://forum.systemcrafters.net/t/consult-web-a-package-to-get-web-and-omni-search-results-directly-in-emacs-minibuffer/603/2 "2024-04-19T14:13:29Z")

</div>

Fantastic package! Thank you!  
It’s already useful to me, even though I have only figured out how to set up half of what I’d like to use it for. A damn shame that most search providers don’t let you search anonymously via API when it’s perfectly possible to do so via browser. If ddg, google and bing worked like wikipedia, this would be a dream come true!

I didn’t quite understand how to set up the consult-notes sources. I assumed that I should replace the “Reference Roam Nodes” and “Zettel Roam Nodes” with the entries I configured in `consult-notes-file-dir-sources`. But that didn’t work. Maybe because I use it with denote and not org-roam?

One idea for academic uses that immediately came to mind was to search through a bibtex file or leverage citar to do so.

But I’m starting to ramble. Thank you so much for this package!

---

<div class="post-metadata">

**Author:** ![armindarvish](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.systemcrafters.net/armindarvish/32/464_2.png) [@armindarvish](https://forum.systemcrafters.net/u/armindarvish)\
**Post date:** [April 19, 2024, 5:18pm UTC](https://forum.systemcrafters.net/t/consult-web-a-package-to-get-web-and-omni-search-results-directly-in-emacs-minibuffer/603/3 "2024-04-19T17:18:46Z")

</div>

@jabbo Thanks!

> I didn’t quite understand how to set up the consult-notes sources. I assumed that I should replace the “Reference Roam Nodes” and “Zettel Roam Nodes” with the entries I configured in `consult-notes-file-dir-sources`. But that didn’t work. Maybe because I use it with denote and not org-roam?

I do not use denote, so I don’t have it in the consult-notes sources. I should look into that. In the meanhile take a look at:  
[consult-web/sources/consult-web-notes.el at 0e065aeebac37bfaf307aa2b5c8aea4c83ce52ea · armindarvish/consult-web · GitHub](https://github.com/armindarvish/consult-web/blob/0e065aeebac37bfaf307aa2b5c8aea4c83ce52ea/sources/consult-web-notes.el#L58)

There is a macro `consult-web--make-source-from-consult-source` that should allow turning your consult-notes denote source to a consult-web compatible source, but you still need to figure out how to define the preview and callback functions if needed!

> One idea for academic uses that immediately came to mind was to search through a bibtex file or leverage citar to do so.

Take a look at my blog post here: [https://www.armindarvish.com/post/web\_omni\_search\_in\_emacs\_with\_consult-web/](https://www.armindarvish.com/post/web_omni_search_in_emacs_with_consult-web/)

I show how to use zotra and then pass things to citar, etc. I think all of that stuff is better done outside consult-wb, you just need to make a pipeline to integrate them together.

Lastly since you said

> A damn shame that most search providers don’t let you search anonymously via API when it’s perfectly possible to do so via browser.

There is a way to get anonymous results by parsing the http response similar to what some other tools/packages do. I won’t be directly supporting this because technically this would be violating terms of some of those services and I do not want to promote this. But I do pan to make some wiki page demonstration of parsing http response in general for example on a public database like PubMed, which then you can use to parse any webpage and get the results in consult-web if you decide to do so!

---

<div class="post-metadata">

**Author:** ![armindarvish](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.systemcrafters.net/armindarvish/32/464_2.png) [@armindarvish](https://forum.systemcrafters.net/u/armindarvish)\
**Post date:** [April 20, 2024, 12:34pm UTC](https://forum.systemcrafters.net/t/consult-web-a-package-to-get-web-and-omni-search-results-directly-in-emacs-minibuffer/603/4 "2024-04-20T12:34:34Z")

</div>

@daviwil I think you should do another emacs episode specifically for consult and embark (either a stream or one of you in-depth emacs reviews) focusing on workflows (getting items from consult and doing embark actions on them). I think people would be interested in seeing some interesting workflows especially with packages like my [consult-web](https://github.com/armindarvish/consult-web) and [consult-gh](https://github.com/armindarvish/consult-gh). But there are many of these consult-\* packages and commands and personally I would love to see one of your nicely organized reviews covering all the useful consult-\* packages/commands and how to put them to good use along with embark actions especially for coding and reviewing other packages, … I am also interested in reducing my time in the browser and porting things I do in the browser to emacs, and I think consult-\* and embark can help there too.

By the way, is there a good way for me to write this comment here from inside emacs. The editor in the browser is just killing me!
