Search code examples
google-chromegoogle-chrome-extensionopensearch

Can you register an OpenSearch URL for a Chrome extension?


Is it possible to write a Chrome extension that registers an OpenSearch search handler, which would allow you to tab complete a search in the URL bar and capture the output with your extension? Like the photo below, but hitting Enter would load my chrome extension in a full webpage. I've tried searching the documentation and Google, but did not find any relevant results.


Solution

  • It's unclear what you're asking exactly, but here's the corresponding API: Omnibox API

    It allows you to add your own search, with which you can do as you please from chrome.omnibox.onInputEntered, suggest autocompletions, etc.

    But there's a requirement of having your own keyword before the search terms.