# Semrush

```json
{
  "name": "Semrush",
  "slug": "semrush",
  "url": "https://composio.dev/toolkits/semrush",
  "markdown_url": "https://composio.dev/toolkits/semrush.md",
  "logo_url": "https://logos.composio.dev/api/semrush",
  "categories": [
    "advertising & marketing"
  ],
  "is_composio_managed": false,
  "updated_at": "2026-05-06T08:27:20.223Z"
}
```

![Semrush logo](https://logos.composio.dev/api/semrush)

## Description

Securely connect your AI agents and chatbots (Claude, ChatGPT, Cursor, etc) with Semrush MCP or direct API to run keyword research, analyze competitors, audit SEO health, and optimize ad campaigns through natural language.

## Summary

Semrush is a leading SEO tool suite for keyword research, competitor analysis, and campaign tracking. It empowers marketers to improve search rankings and optimize online visibility.

## Categories

- advertising & marketing

## Toolkit Details

- Tools: 36

## Images

- Logo: https://logos.composio.dev/api/semrush

## Authentication

- **Api Key**
  - Type: `api_key`
  - Description: Api Key authentication for Semrush.
  - Setup:
    - Configure Api Key credentials for Semrush.
    - Use the credentials when creating an auth config in Composio.

## Suggested Prompts

- Show top anchor texts for example.com
- Compare backlink profiles for three domains
- Get keyword overview for 'organic coffee'
- List ad copies seen for my competitor

## Supported Tools

| Tool slug | Name | Description |
|---|---|---|
| `SEMRUSH_ADS_COPIES` | Get ad copies | Retrieves unique ad copies semrush has observed for a specified domain from a regional database, detailing ads seen in google's paid search results. |
| `SEMRUSH_ANCHORS` | Get anchor texts | Use this action to get a csv report of anchor texts for backlinks pointing to a specified, publicly accessible domain, root domain, or url. |
| `SEMRUSH_AUTHORITY_SCORE_PROFILE` | Get authority score profile | Retrieves the authority score (as) profile for a specified target, showing the count of referring domains that link to the target for each as value from 0 to 100. |
| `SEMRUSH_BACKLINKS` | Get backlinks | Fetches backlinks for a specified domain or url as a csv-formatted string, allowing customization of columns, sorting, and filtering; ensure `display limit` surpasses `display offset` when an offset is used, and note the `urlanchor` filter may have limitations for targets with extensive backlinks. |
| `SEMRUSH_BACKLINKS_OVERVIEW` | Backlinks overview | Provides a csv-formatted summary of backlinks, including authority score and link type breakdowns, for a specified and publicly accessible domain, root domain, or url. |
| `SEMRUSH_BATCH_COMPARISON` | Batch comparison | Compares backlink profiles for multiple specified targets (domains, subdomains, or urls) to analyze and compare link-building efforts. |
| `SEMRUSH_BATCH_KEYWORD_OVERVIEW` | Batch keyword overview | Fetches a keyword overview report from a semrush regional database for up to 100 keywords, providing metrics like search volume, cpc, and keyword difficulty. |
| `SEMRUSH_BROAD_MATCH_KEYWORD` | Broad match keyword | Fetches broad match keywords for a given phrase; `display sort` and `display filter` parameters are defined but currently not utilized by the api call. |
| `SEMRUSH_CATEGORIES` | Get categories | Retrieves categories and their 0-1 confidence ratings for a specified domain, subdomain, or url, with results sorted by rating. |
| `SEMRUSH_CATEGORIES_PROFILE` | Get categories profile | Retrieves a profile of content categories from referring domains for a specified target, analyzing its first 10,000 referring domains and sorting results by domain count. |
| `SEMRUSH_COMPETITORS` | Get competitor data | Retrieves a customizable csv report of competitors for a specified target (root domain, domain, or url) based on shared backlinks or referring domains, ensuring the target is valid and its type is correctly specified. |
| `SEMRUSH_COMPETITORS_IN_ORGANIC_SEARCH` | Get competitors in organic search | Use to get a domain's organic search competitors from semrush as a semicolon-separated string; `display date` requires 'yyyymm15' format if used. |
| `SEMRUSH_COMPETITORS_IN_PAID_SEARCH` | Get competitors in paid search | Retrieves a list of a domain's competitors in paid search results from a specified regional database. |
| `SEMRUSH_DOMAIN_AD_HISTORY` | Get domain ad history | Retrieves a domain's 12-month advertising history from semrush (keywords bid on, ad positions, ad copy) for ppc strategy and competitor analysis; most effective when the domain has ad history in the selected database. |
| `SEMRUSH_DOMAIN_ORGANIC_PAGES` | Get domain organic pages | Fetches a report on a domain's unique organic pages ranking in google's top 100 search results, with options for specifying database, date, columns, sorting, and filtering. |
| `SEMRUSH_DOMAIN_ORGANIC_SEARCH_KEYWORDS` | Get domain organic search keywords | Retrieves organic search keywords for a domain from a specified semrush regional database; `display positions` must be set if `display daily=1` for daily updates. |
| `SEMRUSH_DOMAIN_ORGANIC_SUBDOMAINS` | Get domain organic subdomains | Retrieves a report on subdomains of a given domain that rank in google's top 100 organic search results for a specified regional database. |
| `SEMRUSH_DOMAIN_PAID_SEARCH_KEYWORDS` | Get domain paid search keywords | Fetches keywords driving paid search traffic to a specified, existing domain using a supported semrush regional database. |
| `SEMRUSH_DOMAIN_PLA_SEARCH_KEYWORDS` | Get PLA search keywords for a domain | Retrieves product listing ad (pla) search keywords for a specified domain from a semrush regional database. |
| `SEMRUSH_DOMAIN_VS_DOMAIN` | Compare domains | Analyzes keyword rankings by comparing up to five domains to find common, unique, or gap keywords, using specified organic/paid types and comparison logic in the `domains` string. |
| `SEMRUSH_HISTORICAL_DATA` | Get historical data | Retrieves monthly historical backlink and referring domain data for a specified root domain, returned as a time series string with newest records first. |
| `SEMRUSH_INDEXED_PAGES` | Get indexed pages | Retrieves a list of indexed pages from semrush for a specified `target` (root domain, domain, or url) and `target type`, ensuring `target` is publicly accessible, semrush-analyzable, and correctly matches `target type`. |
| `SEMRUSH_KEYWORD_DIFFICULTY` | Get keyword difficulty | Determines the keyword difficulty (kd) score (0-100, higher means greater difficulty) for a given phrase in a specific semrush regional database to assess its seo competitiveness. |
| `SEMRUSH_KEYWORD_OVERVIEW_ALL_DATABASES` | Keyword overview all databases | Fetches a keyword overview from semrush for a specified phrase, including metrics like search volume, cpc, and competition. |
| `SEMRUSH_KEYWORD_OVERVIEW_ONE_DATABASE` | Get keyword overview for one database | Fetches a keyword summary for a specified phrase from a chosen regional database. |
| `SEMRUSH_KEYWORDS_ADS_HISTORY` | Get keywords ads history | Fetches a historical report (last 12 months) of domains advertising on a specified keyword in google ads, optionally for a specific month ('yyyymm15') or the most recent period, returning raw csv-like data. |
| `SEMRUSH_ORGANIC_RESULTS` | Get organic results | Retrieves up to 100,000 domains and urls from google's top 100 organic search results for a keyword and region, returning a raw string; use `display date` in 'yyyymm15' format (day must be '15') for historical data. |
| `SEMRUSH_PAID_RESULTS` | Get paid search results | Fetches domains ranking in google's paid search results (adwords) for a specified keyword and regional database. |
| `SEMRUSH_PHRASE_QUESTIONS` | Phrase questions | Fetches question-format keywords semantically related to a given query phrase for a specified regional database, aiding in understanding user search intent and discovering content ideas. |
| `SEMRUSH_PLA_COMPETITORS` | Get PLA competitors | Retrieves domains competing with a specified domain in google's product listing ads (pla) from a given semrush regional database. |
| `SEMRUSH_PLA_COPIES` | Get PLA copies | Fetches product listing ad (pla) copies that semrush observed for a domain in google's paid search results. |
| `SEMRUSH_REFERRING_DOMAINS` | Get referring domains | Retrieves a report as a text string (e.g., csv) listing domains that link to a target, with options to filter by type (not value). |
| `SEMRUSH_REFERRING_DOMAINS_BY_COUNTRY` | Get referring domains by country | Generates a csv report detailing the geographic distribution of referring domains (by country, determined via ip address) for a specified, publicly accessible target. |
| `SEMRUSH_REFERRING_I_PS` | Referring i ps | Fetches ip addresses that are sources of backlinks for a specified target domain, root domain, or url. |
| `SEMRUSH_RELATED_KEYWORDS` | Find related keywords | Call this to find related keywords (including synonyms and variations) for a target phrase in a specific regional database; `display date` (if used for historical data) must be 'yyyymm15' for a past month. |
| `SEMRUSH_TLD_DISTRIBUTION` | Get TLD distribution | Fetches a report on the top-level domain (tld) distribution of referring domains for a specified target, useful for analyzing geographic or categorical backlink diversity. |

## Supported Triggers

None listed.

## Installation and MCP Setup

### Path 1: SDK Installation

#### Path 1, Step 1: Install Composio

Install the Composio SDK
```python
pip install composio_openai
```

```typescript
npm install @composio/openai
```

#### Path 1, Step 2: Initialize Composio and Create Tool Router Session

Import and initialize Composio client, then create a Tool Router session
```python
from openai import OpenAI
from composio import Composio
from composio_openai import OpenAIResponsesProvider

composio = Composio(provider=OpenAIResponsesProvider())
openai = OpenAI()
session = composio.create(user_id='your-user-id')
```

```typescript
import OpenAI from 'openai';
import { Composio } from '@composio/core';
import { OpenAIResponsesProvider } from '@composio/openai';

const composio = new Composio({
  provider: new OpenAIResponsesProvider(),
});
const openai = new OpenAI({});
const session = await composio.create('your-user-id');
```

#### Path 1, Step 3: Execute Semrush Tools via Tool Router with Your Agent

Get tools from Tool Router session and execute Semrush actions with your Agent
```python
tools = session.tools
response = openai.responses.create(
  model='gpt-4.1',
  tools=tools,
  input=[{
    'role': 'user',
    'content': 'Show me a summary of top backlinks for example.com'
  }]
)
result = composio.provider.handle_tool_calls(
  response=response,
  user_id='your-user-id'
)
print(result)
```

```typescript
const tools = session.tools;
const response = await openai.responses.create({
  model: 'gpt-4.1',
  tools: tools,
  input: [{
    role: 'user',
    content: 'Show me a summary of top backlinks for example.com'
  }],
});
const result = await composio.provider.handleToolCalls(
  'your-user-id',
  response.output
);
console.log(result);
```

### Path 2: MCP Server Setup

#### Path 2, Step 1: Install Composio

Install the Composio SDK and Claude Agent SDK
```python
pip install composio claude-agent-sdk
```

```typescript
npm install @composio/core ai @ai-sdk/openai @ai-sdk/mcp
```

#### Path 2, Step 2: Create Tool Router Session

Initialize the Composio client and create a Tool Router session
```python
from composio import Composio
from claude_agent_sdk import ClaudeSDKClient, ClaudeAgentOptions

composio = Composio(api_key='your-composio-api-key')
session = composio.create(user_id='your-user-id')
url = session.mcp.url
```

```typescript
import { Composio } from '@composio/core';

const composio = new Composio({ apiKey: 'your-api-key' });

console.log("Creating Tool Router session...");
const { mcp } = await composio.create('your-user-id');
console.log(`Tool Router session created: ${mcp.url}`);
```

#### Path 2, Step 3: Connect to AI Agent

Use the MCP server with your AI agent
```python
import asyncio

options = ClaudeAgentOptions(
    permission_mode='bypassPermissions',
    mcp_servers={
        'tool_router': {
            'type': 'http',
            'url': url,
            'headers': {
                'x-api-key': 'your-composio-api-key'
            }
        }
    },
    system_prompt='You are a helpful assistant with access to Semrush tools.',
    max_turns=10
)

async def main():
    async with ClaudeSDKClient(options=options) as client:
        await client.query('Get authority score profile for example.com')
        async for message in client.receive_response():
            if hasattr(message, 'content'):
                for block in message.content:
                    if hasattr(block, 'text'):
                        print(block.text)

asyncio.run(main())
```

```typescript
import { openai } from '@ai-sdk/openai';
import { experimental_createMCPClient as createMCPClient } from '@ai-sdk/mcp';
import { generateText, stepCountIs } from 'ai';

const client = await createMCPClient({
  transport: {
    type: 'http',
    url: mcp.url,
    headers: { 'x-api-key': 'your-composio-api-key' }
  }
});

const tools = await client.tools();

const { text } = await generateText({
  model: openai('gpt-4o'),
  tools,
  messages: [{ role: 'user', content: 'Get authority score profile for example.com' }],
  stopWhen: stepCountIs(5)
});

console.log(`Agent: ${text}`);
```

## Why Use Composio?

### 1. AI Native Semrush Integration

- Supports both Semrush MCP and direct API based integrations
- Structured, LLM-friendly schemas for reliable tool execution
- Rich coverage for reading, writing, and querying your Semrush data

### 2. Managed Auth

- Built-in API key handling with secure storage and rotation
- Central place to manage, scope, and revoke Semrush access
- Per user and per environment credentials instead of hard-coded keys

### 3. Agent Optimized Design

- Tools are tuned using real error and success rates to improve reliability over time
- Comprehensive execution logs so you always know what ran, when, and on whose behalf

### 4. Enterprise Grade Security

- Fine-grained RBAC so you control which agents and users can access Semrush
- Scoped, least privilege access to Semrush resources
- Full audit trail of agent actions to support review and compliance

## Use Semrush with any AI Agent Framework

Choose a framework you want to connect Semrush with:

- [ChatGPT](https://composio.dev/toolkits/semrush/framework/chatgpt)
- [OpenAI Agents SDK](https://composio.dev/toolkits/semrush/framework/open-ai-agents-sdk)
- [Claude Agent SDK](https://composio.dev/toolkits/semrush/framework/claude-agents-sdk)
- [Claude Code](https://composio.dev/toolkits/semrush/framework/claude-code)
- [Claude Cowork](https://composio.dev/toolkits/semrush/framework/claude-cowork)
- [Codex](https://composio.dev/toolkits/semrush/framework/codex)
- [Cursor](https://composio.dev/toolkits/semrush/framework/cursor)
- [VS Code](https://composio.dev/toolkits/semrush/framework/vscode)
- [OpenCode](https://composio.dev/toolkits/semrush/framework/opencode)
- [OpenClaw](https://composio.dev/toolkits/semrush/framework/openclaw)
- [Hermes](https://composio.dev/toolkits/semrush/framework/hermes-agent)
- [CLI](https://composio.dev/toolkits/semrush/framework/cli)
- [Google ADK](https://composio.dev/toolkits/semrush/framework/google-adk)
- [LangChain](https://composio.dev/toolkits/semrush/framework/langchain)
- [Vercel AI SDK](https://composio.dev/toolkits/semrush/framework/ai-sdk)
- [Mastra AI](https://composio.dev/toolkits/semrush/framework/mastra-ai)
- [LlamaIndex](https://composio.dev/toolkits/semrush/framework/llama-index)
- [CrewAI](https://composio.dev/toolkits/semrush/framework/crew-ai)
- [Pydantic AI](https://composio.dev/toolkits/semrush/framework/pydantic-ai)
- [AutoGen](https://composio.dev/toolkits/semrush/framework/autogen)

## Related Toolkits

- [Metaads](https://composio.dev/toolkits/metaads) - Metaads is Meta's official Ads API that lets you manage, analyze, and optimize your Facebook and Instagram ad campaigns. Streamline ad operations and gain deeper insights with robust automation.
- [Adrapid](https://composio.dev/toolkits/adrapid) - Adrapid is a platform for rapid creation of digital marketing visuals using templates. It streamlines design workflows for banners, images, and HTML5 content with automation.
- [Adyntel](https://composio.dev/toolkits/adyntel) - Adyntel is an API that retrieves LinkedIn ads for any company using a domain or LinkedIn Page ID. Easily access competitive ad intelligence to power your marketing workflows.
- [Beaconstac](https://composio.dev/toolkits/beaconstac) - Beaconstac is a platform for creating and managing QR codes and proximity beacons. It helps businesses engage customers and track marketing performance with powerful analytics.
- [Campaign cleaner](https://composio.dev/toolkits/campaign_cleaner) - Campaign cleaner is an email campaign optimization tool that boosts compatibility and deliverability across email clients. It helps marketers get better results by cleaning, enhancing, and ensuring high performance for every campaign.
- [Deadline funnel](https://composio.dev/toolkits/deadline_funnel) - Deadline Funnel lets you create personalized deadlines and timers for your marketing campaigns. It helps marketers boost conversions by adding authentic urgency to offers.
- [Google Ads](https://composio.dev/toolkits/googleads) - Google Ads is Google's online advertising platform for creating, managing, and optimizing digital campaigns. It helps businesses reach targeted customers and maximize return on ad spend.
- [Instantly](https://composio.dev/toolkits/instantly) - Instantly is a platform for automating cold email outreach, managing leads, and optimizing deliverability. Get better results from email campaigns with minimal manual effort.
- [Proofly](https://composio.dev/toolkits/proofly) - Proofly is a social proof platform that displays real-time notifications of customer activity on your site. It helps you increase website conversions by building trust and urgency for visitors.
- [Segmetrics](https://composio.dev/toolkits/segmetrics) - Segmetrics is a marketing analytics platform that reveals detailed insights into your customer journeys. It helps businesses optimize marketing strategies with accurate, actionable reporting.
- [Sendloop](https://composio.dev/toolkits/sendloop) - Sendloop is an all-in-one email marketing platform built for SaaS, e-commerce, and small businesses. It makes it easy to send campaigns, manage lists, and track results—all in one place.
- [Sidetracker](https://composio.dev/toolkits/sidetracker) - Sidetracker is a marketing analytics platform that tracks expenses, sales funnels, and customer journeys. It helps optimize marketing spend and visualize campaign performance from start to finish.
- [Stannp](https://composio.dev/toolkits/stannp) - Stannp is an API-driven direct mail platform for sending postcards and letters programmatically. It lets you automate physical mail delivery—no manual printing or mailing required.
- [Tapfiliate](https://composio.dev/toolkits/tapfiliate) - Tapfiliate is an affiliate and referral tracking platform for businesses. It helps companies efficiently manage, track, and grow their affiliate programs.
- [Tpscheck](https://composio.dev/toolkits/tpscheck) - Tpscheck is a real-time service for verifying UK phone numbers against TPS and CTPS registers. It helps prevent unwanted marketing calls and ensures compliance with UK telemarketing laws.
- [Gmail](https://composio.dev/toolkits/gmail) - Gmail is Google's email service with powerful spam protection, search, and G Suite integration. It keeps your inbox organized and makes communication fast and reliable.
- [Google Calendar](https://composio.dev/toolkits/googlecalendar) - Google Calendar is a time management service for scheduling meetings, events, and reminders. It streamlines personal and team organization with integrated notifications and sharing options.
- [Google Drive](https://composio.dev/toolkits/googledrive) - Google Drive is a cloud storage platform for uploading, sharing, and collaborating on files. It's perfect for keeping your documents accessible and organized across devices.
- [Outlook](https://composio.dev/toolkits/outlook) - Outlook is Microsoft's email and calendaring platform for unified communications and scheduling. It helps users stay organized with powerful email, contacts, and calendar management.
- [Twitter](https://composio.dev/toolkits/twitter) - Twitter is a social media platform for sharing real-time updates, conversations, and news. Stay connected, informed, and engaged with communities worldwide.

## Frequently Asked Questions

### Do I need my own developer credentials to use Semrush with Composio?

Yes, Semrush requires you to configure your own API key credentials. Once set up, Composio handles secure credential storage and API request handling for you.

### Can I use multiple toolkits together?

Yes! Composio's Tool Router enables agents to use multiple toolkits. [Learn more](https://docs.composio.dev/tool-router/overview).

### Is Composio secure?

Composio is SOC 2 and ISO 27001 compliant with all data encrypted in transit and at rest. [Learn more](https://trust.composio.dev).

### What if the API changes?

Composio maintains and updates all toolkit integrations automatically, so your agents always work with the latest API versions.

---
[See all toolkits](https://composio.dev/toolkits) · [Composio docs](https://docs.composio.dev/llms.txt)
