---
title: URLScheme
description: Manages URL schemes for Scriptable.
---

Manages URL schemes for Scriptable.

Use URL schemes to launch the app and perform an action, such as running a script.
The app conforms to the `scriptable://` URL scheme. The following actions can be performed using the URL scheme.

<strong>Adding a script</strong>
To add a new script, you should use the following URL scheme:

`scriptable:///add`

<strong>Opening a script</strong>
To open an existing script, you should use the following URL scheme:

`scriptable:///open/Example`

The `scriptName` query parameter is the name of the script to open. `scriptName` must be URL encoded. You may optionally add the query parameter `openSettings` with a value of `true` to automatically open the script settings.

<strong>Running a script</strong>
To run an existing script, you should use the following URL scheme:

`scriptable:///run/Example`

The `scriptName` query parameter is the name of the script to run. `scriptName` must be URL encoded.

If you set `openEditor` to true, the script will run with the editor shown opposed to running directly from the list of scripts. Opening the editor to run the script is beneficial in cases where you need to view messages logged to the console.

In addition to the `scriptable://` scheme, you can also perform the above actions using the universal link `open.scriptable.app`, e.g. `https://open.scriptable.app/run/Example`

## Methods

### allParameters()

Gets all parameters from invocation of URL scheme.

```typescript
static allParameters(): {string: string}
```

Gets all the query parameters that were passed in the URL when running this script by invoking its URL scheme.

#### Return value

**`{string: string}`**

All query parameters.

### forOpeningScript()

URL for opening the script.

```typescript
static forOpeningScript(): string
```

Gets the URL for opening the current script. When making a request to the returned URL from another app, e.g. Safari, the script will be opened.

#### Return value

**`string`**

URL for opening script.

### forOpeningScriptSettings()

URL for opening script settings.

```typescript
static forOpeningScriptSettings(): string
```

Gets the URL for opening the settings of the current script. When making a request to the returned URL from another app, e.g. Safari, the settings of the current script will be opened.

#### Return value

**`string`**

URL for opening script settings.

### forRunningScript()

URL for running script.

```typescript
static forRunningScript(): string
```

Gets the URL for running the current script. When making a request to the returned URL from another app, e.g. Safari, the current script will run.

Get the query parameters using the `args.queryParameters`.

#### Return value

**`string`**

URL for opening script settings.

<span id="parameter" class="api-anchor"></span>

### parameter(name)

Gets a parameters from invocation of URL scheme.

```typescript
static parameter(name: string): string
```

Gets the value of a query parameter that was passed in the URL when running this script by invoking its URL scheme.

#### Parameters

**`name` `string`**

Name of the query parameter to get the value for.

#### Return value

**`string`**

Value of query parameter.