Open URL
Opens a URL in the default browser or another app you name.
Open url
Keyboard Maestro: OpenURL
Details #
Opens the URL the way a click on a link would. Any URL with a scheme works: https://example.com, mailto:, tel:, or an app's own scheme such as things:///add?title=Milk. The system picks the app that handles the scheme.
Set app to send the URL to a specific app instead of the default one.
The text can use variables, so https://example.com/search?q={{query}} works. Leading and trailing spaces are ignored. Text with no scheme fails with a message that shows an example.
The step's output holds the url it opened.
Parameters #
| Parameter | Type | Required | Values | What it does |
|---|---|---|---|---|
url | text | Yes | Required. Must include the scheme (https://, mailto:, and so on). | |
app | text | A bundle id or app name to open the URL with. It must be an installed app; otherwise the step fails with "no app called". |
Every step also accepts label, onFailure, timeout and dryRunSafe.
Examples #
- Open example.com
Build the address from a variable. This one does not open anything real in a dry run:
- Set query to “mac automation”
- Open https://duckduckgo.com/?q={{urlEncode(query)}}
Gotchas #
Encode values you put in a query string with
urlEncode(...). A space or&in a variable breaks the address otherwise.The step finishes when the system accepts the URL, not when the page has loaded.
See also #
Open file or folder, Activate app, Run JavaScript in browser