Browse the docs

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 #

ParameterTypeRequiredValuesWhat it does
urltextYesRequired. Must include the scheme (https://, mailto:, and so on).
apptextA 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 a web page in Safari (really opens it)
Do
  1. Open example.com
Open in Switchboard to try it

Build the address from a variable. This one does not open anything real in a dry run:

Example
Do
  1. Set query to “mac automation”
  2. Open https://duckduckgo.com/?q={{urlEncode(query)}}
Open in Switchboard to try it

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