Skip to main content

URL Actions

Open web pages and app deep links with your selected text.

Basic URL Action

A URL action opens a link in your default browser. Use {text} as a placeholder for the selected text.

https://www.google.com/search?q={text}

When you select "macOS tips" and trigger this action, it opens:

https://www.google.com/search?q=macOS%20tips
tip

OnText automatically URL-encodes special characters like spaces, quotes, and ampersands.

Examples

Search Engines

ServiceURL
Googlehttps://www.google.com/search?q={text}
DuckDuckGohttps://duckduckgo.com/?q={text}
Binghttps://www.bing.com/search?q={text}
YouTubehttps://www.youtube.com/results?search_query={text}

Reference

ServiceURL
Wikipediahttps://en.wikipedia.org/wiki/{text}
Dictionaryhttps://www.dictionary.com/browse/{text}
Thesaurushttps://www.thesaurus.com/browse/{text}
MDNhttps://developer.mozilla.org/en-US/search?q={text}

Translation

ServiceURL
Google Translatehttps://translate.google.com/?sl=auto&tl=en&text={text}

Development

ServiceURL
Stack Overflowhttps://stackoverflow.com/search?q={text}
GitHubhttps://github.com/search?q={text}
npmhttps://www.npmjs.com/search?q={text}

OnText supports all URL schemes, not just http://:

Raycast

raycast://extensions/raycast/raycast/search?text={text}

Obsidian

obsidian://search?query={text}

Bear

bear://x-callback-url/search?term={text}

Things 3

things:///add?title={text}

You can omit {text} for links that don't need the selected text:

https://github.com

This simply opens GitHub regardless of what text is selected.