> For the complete documentation index, see [llms.txt](https://docs.incogniton.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.incogniton.com/automation-api-and-sdks/local-rest-api.md).

# Use the local REST API

Turn on Incogniton's local REST API in Settings → Automation, choose its port, and control your profiles from scripts on your own computer.

Open **Settings** in the left-side menu and click the **Automation** tab. Switch on **Enable automation API** and click **Save**. Your scripts can then reach Incogniton at `http://127.0.0.1:35000`.

The local REST API lets scripts and tools on your computer list, create, edit, launch and stop your browser profiles. The Incogniton CLI and the JavaScript and Python SDKs all use this API.

{% hint style="info" %}
The automation API is a paid feature. On a plan without automation, the settings on this tab are locked and the tab shows **Automation isn't included in your plan.** with an **Upgrade** link.
{% endhint %}

<div data-with-frame="true"><figure><img src="https://1094567560-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FH8yXxFJjKNEduZ4cdtjg%2Fuploads%2Fgit-blob-7473a7b26483d0ea94836e86906bf6ce35d3dd5e%2Fv5-settings-automation-api.png?alt=media" alt="Settings, Automation tab: automation API switch and ports"><figcaption></figcaption></figure></div>

### Turn the API on or off

{% stepper %}
{% step %}

#### Open the Automation tab

Click **Settings** in the left-side menu, then click the **Automation** tab.
{% endstep %}

{% step %}

#### Switch the API on

Turn on **Enable automation API**. The port fields and the CLI buttons can only be used while this switch is on.
{% endstep %}

{% step %}

#### Save

Click **Save** in the bar at the bottom of the screen. Turning the API on or off is applied as soon as you save.
{% endstep %}
{% endstepper %}

The Incogniton app must be open and logged in for the API to work. When you close the app, the API stops too.

### Change the API port

The API listens on port **35000** by default. To use another port, enter it in the **API port** field and click **Save**. A new port number is used the next time you start Incogniton.

If another program already uses the port, Incogniton shows a message that the port is already in use and does not start the API. You can fix this in two ways:

* Enter a free port in **API port**.
* Turn on **Use next free port if the configured one is taken**. Incogniton then picks the next free port. While the API runs, the tab shows the port it actually uses: "The REST API is currently running on port …".

The **Selenium port** field (default 4444) sets the port of the Selenium grid that Incogniton runs next to the API for Selenium scripts.

### Who can reach the API

The API only listens on `127.0.0.1` (localhost). Other computers on your network cannot connect to it. Websites you visit cannot send requests to it through your browser either. Scripts, the CLI and the SDKs running on the same computer work normally.

The API works with the account that is logged in to the app. It sees the same profiles you see in the app.

### What you can do with the API

With the API you can list, create, edit, clone and delete profiles, launch and stop them, read and change their cookies, and launch a profile for Puppeteer, Playwright or Selenium. To call a profile you need its ID: expand the profile in the profile list and click **Copy** next to **Profile ID**.

The endpoints, their parameters and example requests are in the developer documentation:

* [Quickstart](https://api-docs.incogniton.com/getting-started/quickstart): your first call in a few minutes.
* [API reference](https://api-docs.incogniton.com/apis): every endpoint. You can also open it from the **API documentation** link on the Automation tab.
* [Automation examples](https://api-docs.incogniton.com/how-to-guides/automation-examples): ready-to-run Puppeteer, Playwright and Selenium scripts.

### Use the CLI or an SDK instead

You don't have to write HTTP calls yourself:

* **Incogniton CLI**: run the same actions as commands in a terminal. Click **Download CLI** on the Automation tab; while it is installed, it updates itself when the app starts. See the [CLI documentation](https://api-docs.incogniton.com/cli).
* [**JavaScript and Python SDK**](/automation-api-and-sdks/javascript-and-python-sdk.md): call the API from code.
* [**Connect AI clients (MCP)**](/automation-api-and-sdks/connect-ai-clients-mcp.md): let an AI client such as Claude or Cursor manage your profiles.
