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
| Service | URL |
|---|---|
https://www.google.com/search?q={text} | |
| DuckDuckGo | https://duckduckgo.com/?q={text} |
| Bing | https://www.bing.com/search?q={text} |
| YouTube | https://www.youtube.com/results?search_query={text} |
Reference
| Service | URL |
|---|---|
| Wikipedia | https://en.wikipedia.org/wiki/{text} |
| Dictionary | https://www.dictionary.com/browse/{text} |
| Thesaurus | https://www.thesaurus.com/browse/{text} |
| MDN | https://developer.mozilla.org/en-US/search?q={text} |
Translation
| Service | URL |
|---|---|
| Google Translate | https://translate.google.com/?sl=auto&tl=en&text={text} |
Development
| Service | URL |
|---|---|
| Stack Overflow | https://stackoverflow.com/search?q={text} |
| GitHub | https://github.com/search?q={text} |
| npm | https://www.npmjs.com/search?q={text} |
Deep Links
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}
Static Links
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.