Use code BLACKFRIDAY2021 to save 20% on all purchases — ends Nov 28.


Switchbar API

Switchbar has a URL-based API. Opening a specially formatted URL will cause Switchbar to get into action, and send a link to the right browser or email client (or prompt user to pick one).

A Switchbar API URL looks like this: switchbar://api-method/web-url. The web-url part tells Switchbar which web address it should open, and the api-method part tells Switchbar what to do with it.

Here's a real example: switchbar://open/ Opening that URL will tell Switchbar to prompt you to select from all of your browsers, and to open in the browser you pick.

API Methods

API MethodDescriptionExample
openSwitchbar should decide what to do based on the user's settings.switchbar://open/

Using the API

Exactly how you trigger the API will depend on the programming tools that you are using. To get you started, here are a few examples:

  • From the Terminal, or in a shell script, you can use the Choosy API via the open command:
open switchbar://open/
set choosy_url to "switchbar://open/"
open location choosy_url
const url = "switchbar://open/";
window.location.href = url;
let url: URL! = URL(
    string: "switchbar://open/"
) url)

Choosy API Compatibility

Switchbar also supports Choosy API so it will work with Choosy browser extensions and any applications that support Choosy.