Switchbar provides a URL-based API for opening links in browsers and email clients using your configured rules.
URL Format
switchbar://open/<link>
Supported link types:
https://http://mailto:
Append the link directly without percent-encoding it.
Switchbar applies your existing rules and link settings. If no rule matches, it prompts you to choose where to open the link.
Examples
Terminal
macOS
open "switchbar://open/https://example.com"
open "switchbar://open/mailto:hello@example.com"
Windows
start "" "switchbar://open/https://example.com"
AppleScript
open location "switchbar://open/https://example.com"
JavaScript
window.location.href = "switchbar://open/https://example.com";
Swift
let url = URL(string: "switchbar://open/https://example.com")!
NSWorkspace.shared.open(url)
Choosy Compatibility
Switchbar also supports Choosy URL schemes, allowing existing scripts and integrations to work without modification.
Supported URL prefixes:
x-choosy://open/
x-choosy://prompt.all/
x-choosy://prompt.running/
x-choosy://best.all/
x-choosy://best.running/
Append the target link to the appropriate prefix.