Adding custom search keywords in Chrome

Ever notice how you can type in “youtube” in Chrome and press tab to search directly in the URL bar?

In Chrome this is defined as a “search engine”. You can see these by going to: chrome://settings/searchEngines.

Chrome will set up many search engines for you (youtube, amazon, etc.). But you can also define your own. Do you find yourself often going to a site and immediately using the site’s search?

Searching for a word or phrase

I often search in Confluence (for those unfamiliar, Confluence is sort of a Wikipedia for companies). When I manually search for “unicorns“, I’ll get this URL:

https://calendlyapp.atlassian.net/wiki/search?text=unicorn

Notice my search term comes after /search?text=. This is important. Replacing “unicorn” with %s will give me my search URL:

https://calendlyapp.atlassian.net/wiki/search?text=%s
  1. Open Chrome settings and navigate to “Search Engines” (or visit chrome://settings/searchEngines)
  2. Click “Add”
  3. Enter a search engine name. This is arbitrary and unimportant.
  4. Enter a keyword. This is what will trigger the search engine.
  5. Enter your Search URL from above. Be sure to replace the search term with %s.

To use, go to the URL bar, type your keyword and press tab.

Other examples

  1. Jira: Navigate directly to a Jira ticket (e.g., for project with ID “CAL”): https://myproject.atlassian.net/browse/CAL-%s
  2. GitHub: Navigate directly to a GitHub commit (note the repository is undeniablyrob/dotfiles): https://github.com/undeniablyrob/dotfiles/%s
  3. GitHub: Search GitHub for a keyword or phrase: https://github.com/search?q=%s&ref=opensearch
  4. GitHub: Search GitHub for a pull request based on a Jira ticket number (or other words in the PR): https://github.com/calendly/calendly/pulls?&q=is%3Apr+cal-%s

TL;DR

  1. Navigate to the site you want to add.
  2. Manually search for a phrase or keyword.
  3. Copy the “search” URL. For example, when searching Confluence, the URL is https://myproject.atlassian.net/wiki/search?text=MySearchText
  4. Open Chrome settings – chrome://settings/searchEngines
  5. Click “Add”
  6. Enter a name and keyword. The name is arbitrary, and the keyword is what you will use to “trigger” the search, e.g., “youtube”.
  7. Past the “search” URL you got above. Replace your actual search text with %s.

Your Thoughts?

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s