# Semrush

> Semrush SEO and competitive research - domains, keywords, backlinks, traffic.

Lets an agent pull SEO and competitive research data from Semrush - domain
overviews, organic and paid keywords, backlinks, and traffic analytics.

## What it can do

| Method | What it does |
| --- | --- |
| `semrush_domain_overview` | Live or historical organic and paid summary for a domain. |
| `semrush_domain_organic_keywords` | Keywords a domain ranks for in organic search. |
| `semrush_domain_paid_keywords` | Keywords a domain buys in paid search. |
| `semrush_domain_ad_copies` | Unique paid ad copies a domain runs. |
| `semrush_domain_organic_competitors` | Domains competing for the same organic keywords. |
| `semrush_domain_vs_domain` | Compare keyword profiles of up to 5 domains. |
| `semrush_domain_rank_history` | Monthly or daily historical overview of a domain's rank and traffic. |
| `semrush_domain_rank` | Live or historical overview of a domain in one database. |
| `semrush_domain_ads_history` | Keywords a domain bid on in paid search over the last 12 months. |
| `semrush_keyword_overview` | Volume, CPC, competition and trend for a keyword in one database. |
| `semrush_keyword_overview_all_databases` | Same metrics for a keyword across all databases. |
| `semrush_keyword_overview_batch` | Metrics for up to 100 keywords at once. |
| `semrush_related_keywords` | Semantically related keywords with metrics. |
| `semrush_broad_match_keywords` | Broad-match and alternate-query keywords. |
| `semrush_phrase_questions` | Question-based keywords containing a seed phrase. |
| `semrush_keyword_difficulty` | Difficulty index (0-100) for one or many keywords. |
| `semrush_keyword_ads_history` | Domains that bid on a keyword over the last 12 months. |
| `semrush_v4_keyword_metrics` | Current v4 Keyword Reports metrics (volume, CPC, difficulty, intent, SERP features) for a keyword. |
| `semrush_backlinks_overview` | Authority score and backlink/referring-domain totals. |
| `semrush_backlinks` | Individual backlinks pointing to a target. |
| `semrush_backlinks_referring_domains` | Domains linking to a target. |
| `semrush_backlinks_referring_ips` | IPs hosting referring domains. |
| `semrush_backlinks_anchors` | Anchor texts used in backlinks. |
| `semrush_backlinks_indexed_pages` | Pages of a target that have backlinks. |
| `semrush_backlinks_competitors` | Domains with a similar backlink profile. |
| `semrush_v4_backlinks_overview` | Current v4 Backlinks API authority score and link/referring-domain totals. |
| `semrush_v4_backlinks_summary` | Month-by-month history of backlink and referring-domain totals (v4). |
| `semrush_v4_backlinks_links` | Current v4 Backlinks API list of individual backlinks to a target. |
| `semrush_v4_backlinks_ref_domains` | Current v4 Backlinks API list of referring domains. |
| `semrush_v4_backlinks_ref_ips` | Current v4 Backlinks API list of referring IPs. |
| `semrush_traffic_summary` | Estimated traffic for up to 200 targets. |
| `semrush_traffic_sources` | Channels driving traffic to a target. |
| `semrush_traffic_destinations` | Outbound domains users visit after a target. |
| `semrush_traffic_by_country` | Geographic distribution of a target's traffic. |
| `semrush_traffic_top_pages` | Most-visited pages of a target. |
| `semrush_traffic_daily` | Day-by-day visit estimates for a target. |
| `semrush_traffic_weekly` | Week-by-week visit estimates for a target. |
| `semrush_traffic_purchase_conversion` | Monthly share of a target's sessions that end in a purchase. |
| `semrush_traffic_categories` | Top domains and traffic share within an industry category. |

## How to get credentials

Semrush authenticates with an API key tied to your subscription's API
units - each request spends units from that pool.

1. Open [www.semrush.com/api-use](https://www.semrush.com/api-use/).
2. Sign in with a Semrush account that has API units (an API-enabled plan
   or the Trends/Analytics API add-on).
3. Find your API key under **Subscription info > API units**.
4. Copy the key string.

## Fields to fill in FlyMyAI

| FlyMyAI field | Where it comes from |
| --- | --- |
| `SEMRUSH_API_KEY` | Subscription info > API units at www.semrush.com/api-use |

## Troubleshooting

- **`ERROR 120 :: WRONG KEY`** - the key is wrong or expired. Re-copy it
  from www.semrush.com/api-use.
- **`ERROR 50 :: NOTHING FOUND`** - no data for that domain/keyword in the
  chosen database.
- **`ERROR 134 :: API UNITS BALANCE IS ZERO`** - top up API units on your
  Semrush plan.
- **Empty result** - check the `database` (e.g. us, uk, de) and that the
  target exists in that region.

## Links

- [Semrush API key](https://www.semrush.com/api-use/)
- [API reference](https://developer.semrush.com/api/)
