documentation/docs/features/online_search.md
Khoj will research on the internet to ground its responses, when it determines that it would need fresh information outside its existing knowledge to answer the query. It will always show any online references it used to respond to your requests.
By default, Khoj will try to infer which information sources, it needs to read to answer your question. This can include reading your documents or researching information online. You can also explicitly trigger an online search by adding the /online prefix to your chat query.
Example queries that should trigger an online search:
Try it out yourself! https://app.khoj.dev
Online search can work even with self-hosting! You have a few options:
docker-compose.yml.SERPER_DEV_API_KEY environment variable to your Serper.dev API key. These search results include additional context like answer box, knowledge graph etc.FIRECRAWL_API_KEY environment variable to your Firecrawl API key. These search results do not scrape social media results.EXA_API_KEY environment variable to your Exa API key.Out of the box, you don't have to do anything to enable webpage reading. Khoj will automatically read webpages by using the requests library. To get faster, more readable webpages for Khoj, you can use the following options: