> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dema.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Semrush

> Let the Dema Agent pull SEO, keyword, backlink, and domain analytics plus market and competitive intelligence from Semrush when you ask.

## Overview

Once Semrush is connected, the Dema Agent can pull live data from your Semrush account — keyword and domain analytics, backlinks, and market and competitive intelligence — directly inside a conversation. Semrush is read-only: the agent fetches data, it does not change anything in your Semrush account.

The agent only acts when you ask it to.

***

## Prerequisites

* A Semrush subscription with **API units** (the Standard and Trends APIs are billed in API units — see [API units](#api-units) below).
* Permission to view the **Subscription Info** page on the account, where the API key lives.

***

## Connect Semrush

<Steps>
  <Step title="Find your API key in Semrush">
    1. In Semrush, open the **Subscription Info** page.
    2. Go to the **API Units** tab. Your API key is shown there.
    3. Copy the key.

    <Note>
      Your API key gives access to your API units balance — treat it like a password and do not share it publicly.
    </Note>
  </Step>

  <Step title="Connect in Dema">
    In Dema, go to **Agents → Settings → Integrations**, find **Semrush**, and click **Connect**. Enter:

    * **API key** — the key you copied from Semrush.

    Click **Add**. Dema marks the integration as Active.
  </Step>
</Steps>

***

## API units

Semrush bills the API in **API units**, and every request the agent makes spends them from your balance. Each call costs a set number of units depending on the report and the number of lines returned — for example, Backlinks calls cost 40 units per line — so a broad question that pulls large reports consumes more units than a narrow one. Units are included in your subscription and unused units expire at each renewal rather than carrying over.

The agent draws from the same units balance as the rest of your Semrush usage. Keep an eye on it on the **Subscription Info** page; if you run out, the agent's Semrush requests will fail until you top up or your units renew.

<Tip>
  Ask the agent for what you actually need rather than broad sweeps across many domains or keywords — narrower questions return smaller reports and spend fewer units.
</Tip>

***

## Rotating the key

To rotate, generate a new key on the **API Units** tab in Semrush, click **Reconnect** on the Semrush integration card in Dema, and enter the new key.

***

## Troubleshooting

<AccordionGroup>
  <Accordion title="Dema cannot authenticate">
    Check that you copied the full API key from the **API Units** tab on the Subscription Info page. If you are unsure, copy it again and reconnect.
  </Accordion>

  <Accordion title="The agent's Semrush requests are failing">
    You may be out of API units. Check your balance on the **Subscription Info** page and top up or wait for your units to renew.
  </Accordion>
</AccordionGroup>

If you are still stuck, contact [support](mailto:info@dema.ai) with the error message you see.

***

## Additional resources

* [How to find your API key](https://www.semrush.com/kb/92-api-key)
* [Semrush API documentation](https://www.semrush.com/kb/5-api-documentation)
