# Semrush

Semrush is a popular SEO tool suite that specializes in keyword research, competitor analysis, and Google Ad campaign optimization.

- **Category:** marketing
- **Auth:** API_KEY
- **Composio Managed App Available?** N/A
- **Tools:** 37
- **Triggers:** 0
- **Slug:** `SEMRUSH`
- **Version:** 20260316_00

## Tools

### Check Semrush account units balance

**Slug:** `SEMRUSH_ACCOUNT_UNITS_BALANCE`

Tool to fetch the remaining Semrush Standard API units for the authenticated account. Use this before launching large batches of Semrush report requests to preflight and fail fast if units are exhausted or below a required threshold.

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get ad copies

**Slug:** `SEMRUSH_ADS_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. Results are a sampled subset, not a complete picture of the domain's advertising. Response is returned as a CSV-like string; parse columns (e.g., Tt, Ds) using the pipe or semicolon delimiter.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `domain` | string | Yes | Domain name to investigate for ad copies. |
| `database` | string ("us" | "uk" | "ca" | "ru" | "de" | "fr" | "es" | "it" | "br" | "au" | "ar" | "be" | "ch" | "dk" | "fi" | "hk" | "ie" | "il" | "mx" | "nl" | "no" | "pl" | "se" | "sg" | "tr" | "jp" | "in" | "hu" | "af" | "al" | "dz" | "ao" | "am" | "at" | "az" | "bh" | "bd" | "by" | "bz" | "bo" | "ba" | "bw" | "bn" | "bg" | "cv" | "kh" | "cm" | "cl" | "co" | "cr" | "hr" | "cy" | "cz" | "cd" | "do" | "ec" | "eg" | "sv" | "ee" | "et" | "ge" | "gh" | "gr" | "gt" | "gy" | "ht" | "hn" | "is" | "id" | "jm" | "jo" | "kz" | "kw" | "lv" | "lb" | "lt" | "lu" | "mg" | "my" | "mt" | "mu" | "md" | "mn" | "me" | "ma" | "mz" | "na" | "np" | "nz" | "ni" | "ng" | "om" | "py" | "pe" | "ph" | "pt" | "ro" | "sa" | "sn" | "rs" | "sk" | "si" | "za" | "kr" | "lk" | "th" | "bs" | "tt" | "tn" | "ua" | "ae" | "uy" | "ve" | "vn" | "zm" | "zw" | "ly" | "mobile-us" | "mobile-uk" | "mobile-ca" | "mobile-de" | "mobile-fr" | "mobile-es" | "mobile-it" | "mobile-br" | "mobile-au" | "mobile-dk" | "mobile-mx" | "mobile-nl" | "mobile-se" | "mobile-tr" | "mobile-in" | "mobile-id" | "mobile-il" | "il-ext" | "tr-ext" | "dk-ext" | "no-ext" | "se-ext" | "fi-ext" | "ch-ext" | "mobile-il-ext" | "pa" | "pk" | "tw" | "qa") | Yes | Regional database code. |
| `display_sort` | string ("pc_asc" | "pc_desc") | No | Sort order for results by ad position. |
| `display_limit` | integer | No | Maximum number of ad copies to return. |
| `export_decode` | integer ("0" | "1") | No | Set 1 for decoded response, 0 for URL-encoded. |
| `export_escape` | integer ("0" | "1") | No | Set 1 to wrap report columns in double quotation marks ("), 0 for unescaped. |
| `display_filter` | array | No | Ad components to filter on. Supported: Tt (Ad Title), Ds (Ad Description), Vu (Visible URL). |
| `display_offset` | integer | No | Number of initial ad copies to skip for pagination. |
| `export_columns` | array | No | Columns to include. If omitted, all are returned. Available: Ph (Keyword phrase), Un (Unique ad identifier), Tt (Ad Title), Ds (Ad Description), Vu (Visible URL), Ur (Destination URL), Pc (Ad Position), Ts (Timestamp last seen). |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get anchor texts

**Slug:** `SEMRUSH_ANCHORS`

Use this action to get a CSV report of anchor texts for backlinks pointing to a specified, publicly accessible domain, root domain, or URL.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `target` | string | Yes | Domain, root domain, or URL to analyze for its backlink anchor texts. |
| `target_type` | string ("root_domain" | "domain" | "url") | Yes | Specifies if the 'target' is a 'root_domain', 'domain', or 'url'. |
| `display_sort` | string ("domains_num_asc" | "domains_num_desc" | "backlinks_num_asc" | "backlinks_num_desc" | "first_seen_asc" | "first_seen_desc" | "last_seen_asc" | "last_seen_desc") | No | Sorting criteria for the report; defaults to `domains_num_desc` (most referring domains first). |
| `display_limit` | integer | No | Maximum number of anchor text entries to return. |
| `display_offset` | integer | No | Number of anchor text entries to skip for pagination. |
| `export_columns` | array | No | Columns to include in the report; defaults to all available columns if omitted. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get authority score profile

**Slug:** `SEMRUSH_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.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `target` | string | Yes | The target entity (URL, domain, or root domain) for which to retrieve the Authority Score profile. For example, 'example.com', 'https://example.com/blog', or 'blog.example.com'. |
| `target_type` | string ("root_domain" | "domain" | "url") | Yes | Specifies the type of the `target`. Valid options are 'root_domain' (e.g., 'example.com'), 'domain' (e.g., 'blog.example.com', which can be a subdomain), or 'url' (a specific page like 'https://example.com/article'). |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get backlinks

**Slug:** `SEMRUSH_BACKLINKS`

Fetches backlinks for a specified domain or URL as a semicolon-delimited CSV string (parse with `sep=';'`); allows customization of columns, sorting, and filtering. Consumes Semrush API credits per request. Ensure `display_limit` surpasses `display_offset` when an offset is used, and note the `urlanchor` filter may have limitations for targets with extensive backlinks.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `target` | string | Yes | The target for which to retrieve backlink data. This can be a root domain, a subdomain, or a specific URL. |
| `target_type` | string ("root_domain" | "domain" | "url") | Yes | The type of the specified target. Must be one of 'root_domain' (e.g., 'example.com'), 'domain' (e.g., 'sub.example.com', includes subdomains), or 'url' (a specific page address). |
| `display_sort` | string ("page_ascore_asc" | "page_ascore_desc" | "last_seen_asc" | "last_seen_desc" | "first_seen_asc" | "first_seen_desc") | No | Column and order for sorting backlink results. |
| `display_limit` | integer | No | Maximum number of backlinks to retrieve. If set to 0, it defaults to 10,000. The actual number returned is `max(0, display_limit - display_offset)`. For large domains, use conservative values and apply `display_filter` to avoid oversized responses. |
| `display_filter` | array | No | Filters to apply for refining backlink results (e.g., `['newlink']` for new, `['lostlink']` for lost). |
| `display_offset` | integer | No | Number of initial backlinks to skip. To get N backlinks after offset O, set `display_offset` to O and `display_limit` to O+N. |
| `export_columns` | array | No | Columns to include in the exported backlink data. Defaults to all available columns if not specified. An empty list may result in API-specific default columns or an error. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Backlinks overview

**Slug:** `SEMRUSH_BACKLINKS_OVERVIEW`

Provides a semicolon-delimited (sep=';') CSV summary of backlinks, including Authority Score and link type breakdowns, for a specified and publicly accessible domain, root domain, or URL. A result of 'ERROR 50 :: NOTHING FOUND' means the target has no data in the database and is a valid zero-result response.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `target` | string | Yes | The domain (e.g., 'example.com'), subdomain (e.g., 'blog.example.com'), or URL (e.g., 'https://example.com/page') for backlink analysis. |
| `target_type` | string ("root_domain" | "domain" | "url") | Yes | The type of the `target` (e.g., 'root_domain', 'domain', 'url'). |
| `export_columns` | array | No | Specifies columns for the CSV output. If omitted, all columns from `ExportColumns` are included. For available column names, see the `ExportColumns` enum. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Batch comparison

**Slug:** `SEMRUSH_BATCH_COMPARISON`

Compares backlink profiles for multiple specified targets (domains, subdomains, or URLs) to analyze and compare link-building efforts.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `targets` | array | Yes | A list of target domains, subdomains, or URLs for which to retrieve backlink comparison data. |
| `target_types` | array | Yes | Specifies the type for each corresponding target in 'targets'. Ensure this list aligns with 'targets' in order and count for accurate processing. |
| `export_columns` | array | No | Specific columns to include in the report. Defaults to all columns. An empty list may result in specific API behavior, like returning a default or minimal set of columns. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Batch keyword overview

**Slug:** `SEMRUSH_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. Response is CSV-like text (not JSON); parse accordingly. Returns literal string 'ERROR 50 :: NOTHING FOUND' for keywords with no data in the selected database — treat as zero results and fall back to SEMRUSH_KEYWORD_OVERVIEW_ONE_DATABASE or SEMRUSH_KEYWORD_OVERVIEW_ALL_DATABASES for those terms.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `phrase` | string | Yes | Up to 100 keywords to analyze. Keywords can be separated by newlines ('\n') or semicolons (';'). The API requires semicolon-separated format with total phrase length of 1-255 characters. Newlines are automatically converted to semicolons. If you have many keywords, consider reducing the list or using shorter keyword phrases to stay within the 255-character limit. |
| `database` | string ("us" | "uk" | "ca" | "ru" | "de" | "fr" | "es" | "it" | "br" | "au" | "ar" | "be" | "ch" | "dk" | "fi" | "hk" | "ie" | "il" | "mx" | "nl" | "no" | "pl" | "se" | "sg" | "tr" | "jp" | "in" | "hu" | "af" | "al" | "dz" | "ao" | "am" | "at" | "az" | "bh" | "bd" | "by" | "bz" | "bo" | "ba" | "bw" | "bn" | "bg" | "cv" | "kh" | "cm" | "cl" | "co" | "cr" | "hr" | "cy" | "cz" | "cd" | "do" | "ec" | "eg" | "sv" | "ee" | "et" | "ge" | "gh" | "gr" | "gt" | "gy" | "ht" | "hn" | "is" | "id" | "jm" | "jo" | "kz" | "kw" | "lv" | "lb" | "lt" | "lu" | "mg" | "my" | "mt" | "mu" | "md" | "mn" | "me" | "ma" | "mz" | "na" | "np" | "nz" | "ni" | "ng" | "om" | "py" | "pe" | "ph" | "pt" | "ro" | "sa" | "sn" | "rs" | "sk" | "si" | "za" | "kr" | "lk" | "th" | "bs" | "tt" | "tn" | "ua" | "ae" | "uy" | "ve" | "vn" | "zm" | "zw" | "ly" | "mobile-us" | "mobile-uk" | "mobile-ca" | "mobile-de" | "mobile-fr" | "mobile-es" | "mobile-it" | "mobile-br" | "mobile-au" | "mobile-dk" | "mobile-mx" | "mobile-nl" | "mobile-se" | "mobile-tr" | "mobile-in" | "mobile-id" | "mobile-il" | "il-ext" | "tr-ext" | "dk-ext" | "no-ext" | "se-ext" | "fi-ext" | "ch-ext" | "mobile-il-ext" | "pa" | "pk" | "tw" | "qa") | Yes | The Semrush regional database to use for the analysis (e.g., 'us', 'gb', 'de'). Refer to Semrush API documentation for a full list of available databases. Database choice materially affects returned search volume and keyword difficulty values. |
| `display_date` | string | No | Date in "YYYYMM15" format for past month data (e.g., "20231215"); uses most recent data if omitted. |
| `export_decode` | integer ("0" | "1") | No | Set to 0 for URL-encoded response, or 1 for plain text (non-converted) response. |
| `export_escape` | integer ("0" | "1") | No | Set to 1 to wrap report columns in double quotation marks ("), or 0 to disable. |
| `export_columns` | array | No | Specific columns for the report (e.g., Ph, Nq); defaults to all if omitted. Available columns: - Ph: Keyword/Phrase analyzed. - Nq: Search Volume (avg. monthly queries). - Cp: Cost-Per-Click (avg. CPC). - Co: Competition level of advertisers. - Nr: Number of URLs in organic results. - Td: Search volume trend (last 12 months). - In: Searcher intent (informational, navigational, commercial, transactional). - Kd: Keyword Difficulty score. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Broad match keyword

**Slug:** `SEMRUSH_BROAD_MATCH_KEYWORD`

Fetches broad match keywords for a given phrase. Response is CSV-like text (not JSON); parse by splitting on line breaks and delimiters. `display_sort` and `display_filter` parameters are defined but currently not utilized by the API call.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `phrase` | string | Yes | Keyword, phrase, or expression to investigate for broad matches and alternative search queries. |
| `database` | string ("us" | "uk" | "ca" | "ru" | "de" | "fr" | "es" | "it" | "br" | "au" | "ar" | "be" | "ch" | "dk" | "fi" | "hk" | "ie" | "il" | "mx" | "nl" | "no" | "pl" | "se" | "sg" | "tr" | "jp" | "in" | "hu" | "af" | "al" | "dz" | "ao" | "am" | "at" | "az" | "bh" | "bd" | "by" | "bz" | "bo" | "ba" | "bw" | "bn" | "bg" | "cv" | "kh" | "cm" | "cl" | "co" | "cr" | "hr" | "cy" | "cz" | "cd" | "do" | "ec" | "eg" | "sv" | "ee" | "et" | "ge" | "gh" | "gr" | "gt" | "gy" | "ht" | "hn" | "is" | "id" | "jm" | "jo" | "kz" | "kw" | "lv" | "lb" | "lt" | "lu" | "mg" | "my" | "mt" | "mu" | "md" | "mn" | "me" | "ma" | "mz" | "na" | "np" | "nz" | "ni" | "ng" | "om" | "py" | "pe" | "ph" | "pt" | "ro" | "sa" | "sn" | "rs" | "sk" | "si" | "za" | "kr" | "lk" | "th" | "bs" | "tt" | "tn" | "ua" | "ae" | "uy" | "ve" | "vn" | "zm" | "zw" | "ly" | "mobile-us" | "mobile-uk" | "mobile-ca" | "mobile-de" | "mobile-fr" | "mobile-es" | "mobile-it" | "mobile-br" | "mobile-au" | "mobile-dk" | "mobile-mx" | "mobile-nl" | "mobile-se" | "mobile-tr" | "mobile-in" | "mobile-id" | "mobile-il" | "il-ext" | "tr-ext" | "dk-ext" | "no-ext" | "se-ext" | "fi-ext" | "ch-ext" | "mobile-il-ext" | "pa" | "pk" | "tw" | "qa") | Yes | Regional database for keyword research (e.g., 'us' for United States, 'gb' for United Kingdom). |
| `display_date` | string | No | Date in "YYYYMM15" format (e.g., "20231215") for historical data. If omitted or empty, most recent data is returned. |
| `display_sort` | string ("nq_asc" | "nq_desc" | "cp_asc" | "cp_desc" | "co_asc" | "co_desc" | "nr_asc" | "nr_desc" | "kd_asc" | "kd_desc") | No | Column and order to sort results (e.g., 'nq_desc' for Search Volume descending). |
| `display_limit` | integer | No | Maximum number of results. The API interprets a value of 0 as the default (10,000). Max: 100,000. |
| `export_decode` | integer ("0" | "1") | No | If 1 (default), returns a raw text response; 0 for a URL-encoded string. |
| `export_escape` | integer ("0" | "1") | No | If 1 (default), wraps CSV columns in double quotes; 0 disables. Applies if output is CSV-like. |
| `display_filter` | array | No | Filter conditions for results, from predefined criteria. Behavior depends on API interpretation of these values. |
| `display_offset` | integer | No | Number of results to skip from the beginning of the list for pagination. |
| `export_columns` | array | No | Specific columns to include in the report (e.g., 'Ph' for Phrase). If not specified, all default columns are returned. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get categories

**Slug:** `SEMRUSH_CATEGORIES`

Retrieves categories and their 0-1 confidence ratings for a specified domain, subdomain, or URL, with results sorted by rating. Response is returned as semicolon-separated text in a single 'data' field requiring parsing before use. Some niche or atypical targets may return no category data.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `target` | string | Yes | Domain, subdomain, or URL to analyze for category information. |
| `target_type` | string ("root_domain" | "domain" | "url") | Yes | Type of the target being analyzed. |
| `display_limit` | integer | No | Maximum results to return. Note: if set to 0 (the field's default), the API service will default to returning 10,000 lines. |
| `display_offset` | integer | No | Number of initial results to skip. To maintain desired fetched records after offset, increase `display_limit` by this value. |
| `export_columns` | array | No | List of columns for the output. Defaults to all available columns if this list is empty or not provided. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get categories profile

**Slug:** `SEMRUSH_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.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `target` | string | Yes | The target URL, domain, or root domain for which to retrieve categories profile data. |
| `target_type` | string ("root_domain" | "domain" | "url") | Yes | Type of the target. |
| `display_limit` | integer | No | Maximum results to return. If 0 (default), 10,000 lines are returned. Max: 1,000,000. |
| `display_offset` | integer | No | Number of initial results to skip; `display_limit` should be `offset + desired_results` (e.g., for 100 results from 51st, `display_offset=50`, `display_limit=150`). |
| `export_columns` | array | No | Columns to include in the report; defaults to all available columns. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get competitor data

**Slug:** `SEMRUSH_COMPETITORS`

Retrieves a CSV-formatted report of competitors for a specified target (root domain, domain, or URL) based on shared backlinks or referring domains. Output is a CSV string; use display_limit and display_offset to paginate without silent truncation.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `target` | string | Yes | The domain, subdomain, or URL to analyze for competitors. |
| `target_type` | string ("root_domain" | "domain" | "url") | Yes | Type of the target: 'root_domain', 'domain', or 'url'. Must match the format of target exactly: passing a full URL with 'root_domain' or 'domain' (or vice versa) produces empty or error responses indistinguishable from missing data. |
| `display_sort` | string ("similarity_asc" | "similarity_desc") | No | Sort order for the competitors list. Only similarity-based sorting is supported (similarity_asc, similarity_desc). If omitted, the API returns results in its default order. |
| `display_limit` | integer | No | Maximum number of competitors to return. |
| `display_offset` | integer | No | Number of results to skip for pagination. |
| `export_columns` | array | No | Columns to include in the CSV report; defaults to all available columns if empty or omitted. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get competitors in organic search

**Slug:** `SEMRUSH_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.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `domain` | string | Yes | Domain to investigate (e.g., 'example.com'). |
| `database` | string ("us" | "uk" | "ca" | "ru" | "de" | "fr" | "es" | "it" | "br" | "au" | "ar" | "be" | "ch" | "dk" | "fi" | "hk" | "ie" | "il" | "mx" | "nl" | "no" | "pl" | "se" | "sg" | "tr" | "jp" | "in" | "hu" | "af" | "al" | "dz" | "ao" | "am" | "at" | "az" | "bh" | "bd" | "by" | "bz" | "bo" | "ba" | "bw" | "bn" | "bg" | "cv" | "kh" | "cm" | "cl" | "co" | "cr" | "hr" | "cy" | "cz" | "cd" | "do" | "ec" | "eg" | "sv" | "ee" | "et" | "ge" | "gh" | "gr" | "gt" | "gy" | "ht" | "hn" | "is" | "id" | "jm" | "jo" | "kz" | "kw" | "lv" | "lb" | "lt" | "lu" | "mg" | "my" | "mt" | "mu" | "md" | "mn" | "me" | "ma" | "mz" | "na" | "np" | "nz" | "ni" | "ng" | "om" | "py" | "pe" | "ph" | "pt" | "ro" | "sa" | "sn" | "rs" | "sk" | "si" | "za" | "kr" | "lk" | "th" | "bs" | "tt" | "tn" | "ua" | "ae" | "uy" | "ve" | "vn" | "zm" | "zw" | "ly" | "mobile-us" | "mobile-uk" | "mobile-ca" | "mobile-de" | "mobile-fr" | "mobile-es" | "mobile-it" | "mobile-br" | "mobile-au" | "mobile-dk" | "mobile-mx" | "mobile-nl" | "mobile-se" | "mobile-tr" | "mobile-in" | "mobile-id" | "mobile-il" | "il-ext" | "tr-ext" | "dk-ext" | "no-ext" | "se-ext" | "fi-ext" | "ch-ext" | "mobile-il-ext" | "pa" | "pk" | "tw" | "qa") | Yes | Regional database for analysis (e.g., 'us', 'gb'). See Semrush docs for all databases. |
| `display_date` | string | No | Snapshot date for data retrieval in 'YYYYMM15' format (e.g., '20231015'); defaults to latest period if omitted. |
| `display_sort` | string ("np_asc" | "np_desc" | "cr_asc" | "cr_desc") | No | Sort column and order. Defaults to common keywords, descending. |
| `display_limit` | integer | No | Maximum results to return. Use with `display_offset` for >100,000 results. |
| `export_decode` | integer ("0" | "1") | No | Set to 0 for URL-encoded response, 1 for no URL-encoding. |
| `export_escape` | integer ("0" | "1") | No | Set to 1 to wrap output values in double quotes, 0 to disable. |
| `display_offset` | integer | No | Number of initial results to skip; for pagination with `display_limit`. |
| `export_columns` | array | No | Data columns to include; defaults to all. See `CompetitorsInOrganicSearchExportColumns` for codes. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get competitors in paid search

**Slug:** `SEMRUSH_COMPETITORS_IN_PAID_SEARCH`

Retrieves a list of a domain's competitors in paid search results from a specified regional database.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `domain` | string | Yes | Domain name to investigate (e.g., 'example.com'). |
| `database` | string ("us" | "uk" | "ca" | "ru" | "de" | "fr" | "es" | "it" | "br" | "au" | "ar" | "be" | "ch" | "dk" | "fi" | "hk" | "ie" | "il" | "mx" | "nl" | "no" | "pl" | "se" | "sg" | "tr" | "jp" | "in" | "hu" | "af" | "al" | "dz" | "ao" | "am" | "at" | "az" | "bh" | "bd" | "by" | "bz" | "bo" | "ba" | "bw" | "bn" | "bg" | "cv" | "kh" | "cm" | "cl" | "co" | "cr" | "hr" | "cy" | "cz" | "cd" | "do" | "ec" | "eg" | "sv" | "ee" | "et" | "ge" | "gh" | "gr" | "gt" | "gy" | "ht" | "hn" | "is" | "id" | "jm" | "jo" | "kz" | "kw" | "lv" | "lb" | "lt" | "lu" | "mg" | "my" | "mt" | "mu" | "md" | "mn" | "me" | "ma" | "mz" | "na" | "np" | "nz" | "ni" | "ng" | "om" | "py" | "pe" | "ph" | "pt" | "ro" | "sa" | "sn" | "rs" | "sk" | "si" | "za" | "kr" | "lk" | "th" | "bs" | "tt" | "tn" | "ua" | "ae" | "uy" | "ve" | "vn" | "zm" | "zw" | "ly" | "mobile-us" | "mobile-uk" | "mobile-ca" | "mobile-de" | "mobile-fr" | "mobile-es" | "mobile-it" | "mobile-br" | "mobile-au" | "mobile-dk" | "mobile-mx" | "mobile-nl" | "mobile-se" | "mobile-tr" | "mobile-in" | "mobile-id" | "mobile-il" | "il-ext" | "tr-ext" | "dk-ext" | "no-ext" | "se-ext" | "fi-ext" | "ch-ext" | "mobile-il-ext" | "pa" | "pk" | "tw" | "qa") | Yes | Regional database to query. For available databases, see Semrush API documentation. |
| `display_date` | string | No | Date for data retrieval (YYYYMM15 for monthly). If unspecified, API uses latest daily ranking data. |
| `display_sort` | string ("np_asc" | "np_desc" | "cr_asc" | "cr_desc") | No | Sort column and order. Default: 'np_desc' (Common Paid Keywords, descending). Options: 'np_asc', 'np_desc', 'cr_asc', 'cr_desc'. |
| `display_limit` | integer | No | Maximum number of results. The API typically returns up to 100,000 per request; use with `display_offset` to retrieve more. |
| `export_decode` | integer ("0" | "1") | No | Set to 1 for a decoded response; 0 for a URL-encoded string. |
| `export_escape` | integer ("0" | "1") | No | Set to 1 to wrap columns in double quotes ("); 0 to disable. |
| `display_offset` | integer | No | Number of results to skip. The sum of `display_limit` and `display_offset` must not exceed 4,000,000. |
| `export_columns` | array | No | Columns for the report. Defaults to all. Options: Dn (Domain Name), Cr (Competition Level), Np (Common Paid Keywords), Ad (Paid Keywords), At (Paid Search Traffic), Ac (Paid Search Traffic Cost), Or (Common Organic Keywords). |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get domain ad history

**Slug:** `SEMRUSH_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.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `domain` | string | Yes | Website name (e.g., 'example.com') to investigate. |
| `database` | string ("us" | "uk" | "ca" | "ru" | "de" | "fr" | "es" | "it" | "br" | "au" | "ar" | "be" | "ch" | "dk" | "fi" | "hk" | "ie" | "il" | "mx" | "nl" | "no" | "pl" | "se" | "sg" | "tr" | "jp" | "in" | "hu" | "af" | "al" | "dz" | "ao" | "am" | "at" | "az" | "bh" | "bd" | "by" | "bz" | "bo" | "ba" | "bw" | "bn" | "bg" | "cv" | "kh" | "cm" | "cl" | "co" | "cr" | "hr" | "cy" | "cz" | "cd" | "do" | "ec" | "eg" | "sv" | "ee" | "et" | "ge" | "gh" | "gr" | "gt" | "gy" | "ht" | "hn" | "is" | "id" | "jm" | "jo" | "kz" | "kw" | "lv" | "lb" | "lt" | "lu" | "mg" | "my" | "mt" | "mu" | "md" | "mn" | "me" | "ma" | "mz" | "na" | "np" | "nz" | "ni" | "ng" | "om" | "py" | "pe" | "ph" | "pt" | "ro" | "sa" | "sn" | "rs" | "sk" | "si" | "za" | "kr" | "lk" | "th" | "bs" | "tt" | "tn" | "ua" | "ae" | "uy" | "ve" | "vn" | "zm" | "zw" | "ly" | "mobile-us" | "mobile-uk" | "mobile-ca" | "mobile-de" | "mobile-fr" | "mobile-es" | "mobile-it" | "mobile-br" | "mobile-au" | "mobile-dk" | "mobile-mx" | "mobile-nl" | "mobile-se" | "mobile-tr" | "mobile-in" | "mobile-id" | "mobile-il" | "il-ext" | "tr-ext" | "dk-ext" | "no-ext" | "se-ext" | "fi-ext" | "ch-ext" | "mobile-il-ext" | "pa" | "pk" | "tw" | "qa") | Yes | Regional database to use (e.g., 'us'). Link: https://developer.semrush.com/api/v3/analytics/basic-docs/#databases |
| `display_sort` | string ("cv_asc" | "cv_desc") | No | Sort order for results: `cv_asc` (Costs % ascending), `cv_desc` (Costs % descending). |
| `display_limit` | integer | No | Number of results for the current request (typically up to 100k). For larger datasets, use with `display_offset`. Cumulative `display_limit` with offset should not exceed 4,000,000. |
| `export_escape` | integer ("0" | "1") | No | If 1, wraps report columns in double quotation marks ("); if 0, no escaping. |
| `display_filter` | array | No | Filters using column identifiers (e.g., `Ph`). Semrush's API may expect `+Column\|Operator\|Value` format (e.g., `+Ph\|Ct\|semrush`); consult Semrush documentation. Simplified filterable columns available: Ph (Keyword), Nq (Num. keywords), Cp (CPC), Tr (Traffic %). |
| `display_offset` | integer | No | Number of initial results to skip for pagination. When fetching beyond 100k, `display_limit` might need to reflect `current_offset + desired_rows_for_this_page` per Semrush guidance. |
| `export_columns` | array | No | Data columns to include (e.g., `Ph`, `Dt`). If unspecified, all columns are returned. An empty list may error. Available: Ph (Keyword), Dt (Date), Po (Position), Cp (CPC), Nq (Num. keywords), Tr (Traffic %), Ur (URL), Tt (Ad Title), Ds (Ad Description), Vu (Volume), Cv (Costs %). |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get domain organic pages

**Slug:** `SEMRUSH_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. Response is semicolon-separated CSV text in a single `data` field requiring explicit parsing. The literal response `ERROR 50 :: NOTHING FOUND` means zero results for that domain/database combination, not a system error. Traffic metrics (e.g., `Tr`) are modeled estimates incompatible with first-party analytics data.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `domain` | string | Yes | Domain name to analyze (e.g., 'example.com'). |
| `database` | string ("us" | "uk" | "ca" | "ru" | "de" | "fr" | "es" | "it" | "br" | "au" | "ar" | "be" | "ch" | "dk" | "fi" | "hk" | "ie" | "il" | "mx" | "nl" | "no" | "pl" | "se" | "sg" | "tr" | "jp" | "in" | "hu" | "af" | "al" | "dz" | "ao" | "am" | "at" | "az" | "bh" | "bd" | "by" | "bz" | "bo" | "ba" | "bw" | "bn" | "bg" | "cv" | "kh" | "cm" | "cl" | "co" | "cr" | "hr" | "cy" | "cz" | "cd" | "do" | "ec" | "eg" | "sv" | "ee" | "et" | "ge" | "gh" | "gr" | "gt" | "gy" | "ht" | "hn" | "is" | "id" | "jm" | "jo" | "kz" | "kw" | "lv" | "lb" | "lt" | "lu" | "mg" | "my" | "mt" | "mu" | "md" | "mn" | "me" | "ma" | "mz" | "na" | "np" | "nz" | "ni" | "ng" | "om" | "py" | "pe" | "ph" | "pt" | "ro" | "sa" | "sn" | "rs" | "sk" | "si" | "za" | "kr" | "lk" | "th" | "bs" | "tt" | "tn" | "ua" | "ae" | "uy" | "ve" | "vn" | "zm" | "zw" | "ly" | "mobile-us" | "mobile-uk" | "mobile-ca" | "mobile-de" | "mobile-fr" | "mobile-es" | "mobile-it" | "mobile-br" | "mobile-au" | "mobile-dk" | "mobile-mx" | "mobile-nl" | "mobile-se" | "mobile-tr" | "mobile-in" | "mobile-id" | "mobile-il" | "il-ext" | "tr-ext" | "dk-ext" | "no-ext" | "se-ext" | "fi-ext" | "ch-ext" | "mobile-il-ext" | "pa" | "pk" | "tw" | "qa") | Yes | Regional database for analysis (e.g., 'us', 'gb', 'de'). See Semrush API docs for full list. |
| `display_date` | string | No | Date for historical data report in YYYYMM15 format (e.g., '20231015'). If omitted, uses most recent data. Day component MUST be 15; any other day value will not return historical data correctly. |
| `display_sort` | string ("pc_asc" | "pc_desc" | "tg_asc" | "tg_desc" | "tr_asc" | "tr_desc" | "sr_asc" | "sr_desc" | "st_asc" | "st_desc") | No | Column and order for sorting results (e.g., 'pc_desc' for traffic share descending). |
| `display_limit` | integer | No | Maximum number of results to return. For more than 100,000, use with `display_offset`. Large domains may exceed 10,000 rows; results are silently truncated at `display_limit`. Paginate by incrementing `display_offset` until fewer rows than `display_limit` are returned. Avoid unnecessarily large values — each request consumes API units (HTTP 402 if exhausted) and may trigger rate limits (HTTP 429). |
| `export_decode` | integer ("0" | "1") | No | Set to 0 for URL-encoded response, 1 for decoded (non-converted) response. |
| `export_escape` | integer ("0" | "1") | No | Set to 1 to wrap report columns in double quotation marks ("), 0 to disable. |
| `display_filter` | array | No | Columns from `DomainOrganicPagesFilterType` to filter results by. If empty, no column-specific filters are applied. |
| `display_offset` | integer | No | Number of results to skip (for pagination with `display_limit`). |
| `export_columns` | array | No | Columns to include in the report. If omitted, all columns from `DomainOrganicPagesExportColumns` are returned. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get domain organic search keywords

**Slug:** `SEMRUSH_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. Response is semicolon-delimited CSV text (parse with sep=';', cast numeric columns before aggregations). A response of 'ERROR 50 :: NOTHING FOUND' indicates no data for the domain in the selected database — treat as a valid zero-result.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `domain` | string | Yes | The domain name (e.g., example.com) to investigate for organic search keywords. |
| `database` | string ("us" | "uk" | "ca" | "ru" | "de" | "fr" | "es" | "it" | "br" | "au" | "ar" | "be" | "ch" | "dk" | "fi" | "hk" | "ie" | "il" | "mx" | "nl" | "no" | "pl" | "se" | "sg" | "tr" | "jp" | "in" | "hu" | "af" | "al" | "dz" | "ao" | "am" | "at" | "az" | "bh" | "bd" | "by" | "bz" | "bo" | "ba" | "bw" | "bn" | "bg" | "cv" | "kh" | "cm" | "cl" | "co" | "cr" | "hr" | "cy" | "cz" | "cd" | "do" | "ec" | "eg" | "sv" | "ee" | "et" | "ge" | "gh" | "gr" | "gt" | "gy" | "ht" | "hn" | "is" | "id" | "jm" | "jo" | "kz" | "kw" | "lv" | "lb" | "lt" | "lu" | "mg" | "my" | "mt" | "mu" | "md" | "mn" | "me" | "ma" | "mz" | "na" | "np" | "nz" | "ni" | "ng" | "om" | "py" | "pe" | "ph" | "pt" | "ro" | "sa" | "sn" | "rs" | "sk" | "si" | "za" | "kr" | "lk" | "th" | "bs" | "tt" | "tn" | "ua" | "ae" | "uy" | "ve" | "vn" | "zm" | "zw" | "ly" | "mobile-us" | "mobile-uk" | "mobile-ca" | "mobile-de" | "mobile-fr" | "mobile-es" | "mobile-it" | "mobile-br" | "mobile-au" | "mobile-dk" | "mobile-mx" | "mobile-nl" | "mobile-se" | "mobile-tr" | "mobile-in" | "mobile-id" | "mobile-il" | "il-ext" | "tr-ext" | "dk-ext" | "no-ext" | "se-ext" | "fi-ext" | "ch-ext" | "mobile-il-ext" | "pa" | "pk" | "tw" | "qa") | Yes | The regional database to query (e.g., 'us', 'uk', 'de'). |
| `display_date` | string | No | Date for keyword data: 'YYYYMM15' for monthly historical, 'YYYYMMDD' for daily (e.g., '20231015', '20231120'). Shows latest daily ranking changes if unspecified. |
| `display_sort` | string ("po_asc" | "po_desc" | "tg_asc" | "tg_desc" | "tr_asc" | "tr_desc" | "tc_asc" | "tc_desc" | "nq_asc" | "nq_desc" | "co_asc" | "co_desc" | "kd_asc" | "kd_desc" | "cp_asc" | "cp_desc" | "nr_asc" | "nr_desc" | "ts_asc" | "ts_desc") | No | Column and order for sorting results (e.g., 'po_desc' for position descending). |
| `display_daily` | integer | No | Set to 1 for daily updates on position changes (last 31 days), or 0 for monthly results. Requires `display_positions` if set to 1. |
| `display_limit` | integer | No | Number of results. When `display_offset` is used, this specifies the CUMULATIVE count from the start. Semrush may have per-call limits; use pagination for large datasets. |
| `export_escape` | integer ("0" | "1") | No | Set to 1 to wrap report columns in double quotation marks ("); 0 to disable. |
| `display_filter` | array | No | List of column codes from `DomainOrganicSearchKeywordsFilterType` for filtering (e.g., 'Ph', 'Ur'). For complex filter syntax like 'Ph\|Cn\|semrush', refer to Semrush API documentation. |
| `display_offset` | integer | No | Number of initial results to skip for pagination. When used, `display_limit` should be `display_offset` + number of rows for the current page. |
| `export_columns` | array | No | Data columns to include. If omitted, all columns from `DomainOrganicSearchKeywordsExportColumns` are requested. Retain key metrics Tr (traffic), Cp (CPC), Po (position), and Kd (keyword difficulty) to avoid missing critical data. |
| `display_positions` | string ("new" | "lost" | "rise" | "fall") | No | Filter keywords by position changes in Google's top 100: 'new', 'lost', 'rise', or 'fall'. |
| `display_positions_type` | string ("organic" | "all" | "serp_features") | No | Type of ranking positions: 'organic' (standard), 'all' (includes SERP features), or 'serp_features' (domain ranks in SERP features). |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get domain organic subdomains

**Slug:** `SEMRUSH_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.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `domain` | string | Yes | Domain name to analyze (e.g., 'example.com'). |
| `database` | string ("us" | "uk" | "ca" | "ru" | "de" | "fr" | "es" | "it" | "br" | "au" | "ar" | "be" | "ch" | "dk" | "fi" | "hk" | "ie" | "il" | "mx" | "nl" | "no" | "pl" | "se" | "sg" | "tr" | "jp" | "in" | "hu" | "af" | "al" | "dz" | "ao" | "am" | "at" | "az" | "bh" | "bd" | "by" | "bz" | "bo" | "ba" | "bw" | "bn" | "bg" | "cv" | "kh" | "cm" | "cl" | "co" | "cr" | "hr" | "cy" | "cz" | "cd" | "do" | "ec" | "eg" | "sv" | "ee" | "et" | "ge" | "gh" | "gr" | "gt" | "gy" | "ht" | "hn" | "is" | "id" | "jm" | "jo" | "kz" | "kw" | "lv" | "lb" | "lt" | "lu" | "mg" | "my" | "mt" | "mu" | "md" | "mn" | "me" | "ma" | "mz" | "na" | "np" | "nz" | "ni" | "ng" | "om" | "py" | "pe" | "ph" | "pt" | "ro" | "sa" | "sn" | "rs" | "sk" | "si" | "za" | "kr" | "lk" | "th" | "bs" | "tt" | "tn" | "ua" | "ae" | "uy" | "ve" | "vn" | "zm" | "zw" | "ly" | "mobile-us" | "mobile-uk" | "mobile-ca" | "mobile-de" | "mobile-fr" | "mobile-es" | "mobile-it" | "mobile-br" | "mobile-au" | "mobile-dk" | "mobile-mx" | "mobile-nl" | "mobile-se" | "mobile-tr" | "mobile-in" | "mobile-id" | "mobile-il" | "il-ext" | "tr-ext" | "dk-ext" | "no-ext" | "se-ext" | "fi-ext" | "ch-ext" | "mobile-il-ext" | "pa" | "pk" | "tw" | "qa") | Yes | Regional database to query (e.g., 'us', 'gb'). Refer to Semrush API documentation for a complete list. |
| `display_date` | string | No | Date for report generation in YYYYMM15 format (e.g., '20231015'). If not provided, latest available data is used. |
| `display_sort` | string ("pc_asc" | "pc_desc" | "tg_asc" | "tg_desc" | "tr_asc" | "tr_desc" | "sr_asc" | "sr_desc" | "st_asc" | "st_desc") | No | Column and order for sorting results (e.g., 'pc_desc' sorts by keyword count descending). |
| `display_limit` | integer | No | Number of results to return. For fetching over 100,000 results, `display_offset` should be used and `display_limit` may need appropriate adjustment. |
| `export_decode` | integer ("0" | "1") | No | Specifies if response data is URL-decoded (`1` for decoded, `0` for URL-encoded string). |
| `export_escape` | integer ("0" | "1") | No | Specifies if CSV columns are wrapped in double quotes (`1` to enable, `0` to disable). |
| `display_offset` | integer | No | Number of initial results to skip for pagination. When using `display_offset`, `display_limit` might need to be increased by the `display_offset` value. |
| `export_columns` | array | No | Specific columns for the report (e.g., Ur, Pc, Tr). If omitted, a default set is returned. Consult Semrush API documentation for column definitions. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get domain paid search keywords

**Slug:** `SEMRUSH_DOMAIN_PAID_SEARCH_KEYWORDS`

Fetches keywords driving paid search traffic to a specified, existing domain using a supported Semrush regional database.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `domain` | string | Yes | Domain name to investigate. |
| `database` | string ("us" | "uk" | "ca" | "ru" | "de" | "fr" | "es" | "it" | "br" | "au" | "ar" | "be" | "ch" | "dk" | "fi" | "hk" | "ie" | "il" | "mx" | "nl" | "no" | "pl" | "se" | "sg" | "tr" | "jp" | "in" | "hu" | "af" | "al" | "dz" | "ao" | "am" | "at" | "az" | "bh" | "bd" | "by" | "bz" | "bo" | "ba" | "bw" | "bn" | "bg" | "cv" | "kh" | "cm" | "cl" | "co" | "cr" | "hr" | "cy" | "cz" | "cd" | "do" | "ec" | "eg" | "sv" | "ee" | "et" | "ge" | "gh" | "gr" | "gt" | "gy" | "ht" | "hn" | "is" | "id" | "jm" | "jo" | "kz" | "kw" | "lv" | "lb" | "lt" | "lu" | "mg" | "my" | "mt" | "mu" | "md" | "mn" | "me" | "ma" | "mz" | "na" | "np" | "nz" | "ni" | "ng" | "om" | "py" | "pe" | "ph" | "pt" | "ro" | "sa" | "sn" | "rs" | "sk" | "si" | "za" | "kr" | "lk" | "th" | "bs" | "tt" | "tn" | "ua" | "ae" | "uy" | "ve" | "vn" | "zm" | "zw" | "ly" | "mobile-us" | "mobile-uk" | "mobile-ca" | "mobile-de" | "mobile-fr" | "mobile-es" | "mobile-it" | "mobile-br" | "mobile-au" | "mobile-dk" | "mobile-mx" | "mobile-nl" | "mobile-se" | "mobile-tr" | "mobile-in" | "mobile-id" | "mobile-il" | "il-ext" | "tr-ext" | "dk-ext" | "no-ext" | "se-ext" | "fi-ext" | "ch-ext" | "mobile-il-ext" | "pa" | "pk" | "tw" | "qa") | Yes | Regional database to query. |
| `display_date` | string | No | Date for data retrieval (YYYYMM15 for monthly, YYYYMMDD for daily). Latest data if unspecified. |
| `display_sort` | string ("po_asc" | "po_desc" | "tg_asc" | "tg_desc" | "tr_asc" | "tr_desc" | "tc_asc" | "tc_desc" | "nq_asc" | "nq_desc") | No | Column and order for sorting results. |
| `display_limit` | integer | No | Maximum number of keywords to return. Use with `display_offset` for pagination. |
| `export_decode` | integer ("0" | "1") | No | Set to 0 for URL-encoded response; 1 for non-URL-encoded response. |
| `export_escape` | integer ("0" | "1") | No | Set to 1 to wrap report columns in double quotation marks ("); 0 to disable. |
| `display_filter` | array | No | Filters to apply using a specific format string: '[+/-]\|[column_code]\|[operator]\|[value]'. Refer to Semrush API documentation for detailed filter syntax and available fields. |
| `display_offset` | integer | No | Number of results to skip for pagination. If used, `display_limit` should be increased by this value; total `display_limit` (inclusive of offset) must not exceed 4,000,000. |
| `export_columns` | array | No | Columns to include in the report. All columns returned if unspecified. See `DomainPaidSearchKeywordsExportColumns` for options. |
| `display_positions` | string ("new" | "lost" | "rise" | "fall") | No | Filter keywords by ranking status ('new', 'lost', 'rise', 'fall') in Google's top 100 paid search results. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get PLA search keywords for a domain

**Slug:** `SEMRUSH_DOMAIN_PLA_SEARCH_KEYWORDS`

Retrieves Product Listing Ad (PLA) search keywords for a specified domain from a Semrush regional database.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `domain` | string | Yes | Domain name (e.g., 'example.com') to investigate for PLA search keywords. |
| `database` | string ("us" | "uk" | "ca" | "ru" | "de" | "fr" | "es" | "it" | "br" | "au" | "ar" | "be" | "ch" | "dk" | "fi" | "hk" | "ie" | "il" | "mx" | "nl" | "no" | "pl" | "se" | "sg" | "tr" | "jp" | "in" | "hu" | "af" | "al" | "dz" | "ao" | "am" | "at" | "az" | "bh" | "bd" | "by" | "bz" | "bo" | "ba" | "bw" | "bn" | "bg" | "cv" | "kh" | "cm" | "cl" | "co" | "cr" | "hr" | "cy" | "cz" | "cd" | "do" | "ec" | "eg" | "sv" | "ee" | "et" | "ge" | "gh" | "gr" | "gt" | "gy" | "ht" | "hn" | "is" | "id" | "jm" | "jo" | "kz" | "kw" | "lv" | "lb" | "lt" | "lu" | "mg" | "my" | "mt" | "mu" | "md" | "mn" | "me" | "ma" | "mz" | "na" | "np" | "nz" | "ni" | "ng" | "om" | "py" | "pe" | "ph" | "pt" | "ro" | "sa" | "sn" | "rs" | "sk" | "si" | "za" | "kr" | "lk" | "th" | "bs" | "tt" | "tn" | "ua" | "ae" | "uy" | "ve" | "vn" | "zm" | "zw" | "ly" | "mobile-us" | "mobile-uk" | "mobile-ca" | "mobile-de" | "mobile-fr" | "mobile-es" | "mobile-it" | "mobile-br" | "mobile-au" | "mobile-dk" | "mobile-mx" | "mobile-nl" | "mobile-se" | "mobile-tr" | "mobile-in" | "mobile-id" | "mobile-il" | "il-ext" | "tr-ext" | "dk-ext" | "no-ext" | "se-ext" | "fi-ext" | "ch-ext" | "mobile-il-ext" | "pa" | "pk" | "tw" | "qa") | Yes | Semrush regional database to query (e.g., 'us', 'gb', 'ca'). |
| `display_sort` | string ("po_asc" | "po_desc" | "nq_asc" | "nq_desc" | "pr_asc" | "pr_desc") | No | Column and order for sorting results (e.g., 'po_desc' for position descending). |
| `display_limit` | integer | No | Maximum number of results to return. For pagination with `display_offset`, `display_limit` might need to be `desired_count + display_offset`. Semrush may return up to 100,000 lines per call if `display_offset` is not used. |
| `export_decode` | integer ("0" | "1") | No | If 1, decodes URL-encoded response data; if 0, returns data as a raw URL-encoded string. |
| `export_escape` | integer ("0" | "1") | No | If 1, wraps report column values in double quotes (e.g., "value"); 0 disables wrapping. |
| `display_filter` | array | No | Column names (e.g., 'Ph', 'Tt') for filtering results. Filtering logic is Semrush API-specific; refer to their documentation for details. |
| `display_offset` | integer | No | Number of results to skip from the beginning of the report, for pagination. |
| `export_columns` | array | No | Specific data columns to include in the report (e.g., 'Ph' for Keyword, 'Ur' for Landing Page URL, 'Tt' for Ad Title). If not specified, all available columns are requested. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Compare domains

**Slug:** `SEMRUSH_DOMAIN_VS_DOMAIN`

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.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `domains` | string | Yes | A URL-encoded string specifying the domains to compare and the comparison logic, separated by the '\|' symbol. Each domain entry follows the format: <sign>\|<type>\|<domain>. Up to five domains can be compared.  <sign>: Operation type (+, -, *, /). <type>: Keyword type ('or' for organic, 'ad' for paid). <domain>: The domain name. Examples of combinations: • Shared keywords: *\|or\|<your_domain>\|*\|or\|<domain2>\|*\|or\|<domain3> • All keywords: *\|or\|<your_domain>\|+\|or\|<domain2>\|+\|or\|<domain3> • Unique keywords for your domain: *\|or\|<your_domain>\|-\|or\|<domain2>\|-\|or\|<domain3> • Untapped keywords (keywords in others, not yours): *\|or\|<domain2>\|+\|or\|<domain3>\|-\|or\|<your_domain> • Missing keywords (keywords in common among others, not yours): *\|or\|<domain2>\|*\|or\|<domain3>\|-\|or\|<your_domain> • Keywords exclusive to one domain: *\|or\|<your_domain>\|/\|or\|<domain2>\|/\|or\|<domain3> (API only). |
| `database` | string ("us" | "uk" | "ca" | "ru" | "de" | "fr" | "es" | "it" | "br" | "au" | "ar" | "be" | "ch" | "dk" | "fi" | "hk" | "ie" | "il" | "mx" | "nl" | "no" | "pl" | "se" | "sg" | "tr" | "jp" | "in" | "hu" | "af" | "al" | "dz" | "ao" | "am" | "at" | "az" | "bh" | "bd" | "by" | "bz" | "bo" | "ba" | "bw" | "bn" | "bg" | "cv" | "kh" | "cm" | "cl" | "co" | "cr" | "hr" | "cy" | "cz" | "cd" | "do" | "ec" | "eg" | "sv" | "ee" | "et" | "ge" | "gh" | "gr" | "gt" | "gy" | "ht" | "hn" | "is" | "id" | "jm" | "jo" | "kz" | "kw" | "lv" | "lb" | "lt" | "lu" | "mg" | "my" | "mt" | "mu" | "md" | "mn" | "me" | "ma" | "mz" | "na" | "np" | "nz" | "ni" | "ng" | "om" | "py" | "pe" | "ph" | "pt" | "ro" | "sa" | "sn" | "rs" | "sk" | "si" | "za" | "kr" | "lk" | "th" | "bs" | "tt" | "tn" | "ua" | "ae" | "uy" | "ve" | "vn" | "zm" | "zw" | "ly" | "mobile-us" | "mobile-uk" | "mobile-ca" | "mobile-de" | "mobile-fr" | "mobile-es" | "mobile-it" | "mobile-br" | "mobile-au" | "mobile-dk" | "mobile-mx" | "mobile-nl" | "mobile-se" | "mobile-tr" | "mobile-in" | "mobile-id" | "mobile-il" | "il-ext" | "tr-ext" | "dk-ext" | "no-ext" | "se-ext" | "fi-ext" | "ch-ext" | "mobile-il-ext" | "pa" | "pk" | "tw" | "qa") | Yes | Regional database for the query. Refer to `DatabaseEnum` or SEMrush documentation for a complete list. |
| `display_date` | string | No | Report date in YYYYMM15 format (e.g., '20231015') for historical/current data. Latest data used if omitted. |
| `display_sort` | string ("p0_asc" | "p0_desc" | "p1_asc" | "p1_desc" | "p2_asc" | "p2_desc" | "p3_asc" | "p3_desc" | "p4_asc" | "p4_desc" | "nq_asc" | "nq_desc" | "co_asc" | "co_desc" | "cp_asc" | "cp_desc" | "nr_asc" | "nr_desc") | No | Sorting criteria: 'columnName_direction' (e.g., 'p0_desc'). See `DomainVsDomainSortOrder` for options. |
| `display_limit` | integer | No | Maximum number of keywords to return. Use with `display_offset` for pagination of large datasets (up to 100,000 results per call is typical). |
| `export_decode` | integer ("0" | "1") | No | Controls if the response is URL-decoded. 1: decode response; 0: return URL-encoded string. |
| `export_escape` | integer ("0" | "1") | No | Controls if special characters in output are escaped. 1: escape (columns wrapped in \"\"); 0: no escaping. |
| `display_filter` | array | No | List of column codes from `DomainVsDomainFilterType` to filter results. Behavior is API-specific. |
| `display_offset` | integer | No | Number of initial results to skip for pagination with `display_limit`. For instance, `display_offset=10000` and `display_limit=10000` retrieves results 10,001-20,000. |
| `export_columns` | array | No | Columns to include in the report. All default columns are returned if empty. See `DomainVsDomainExportColumns` for codes. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get historical data

**Slug:** `SEMRUSH_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.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `target` | string | Yes | The root domain URL (e.g., 'example.com') for which to retrieve historical backlink data. |
| `target_type` | string | Yes | The type of target. Must be 'root_domain' for this action. |
| `display_limit` | integer | No | Maximum number of historical data records (lines) to return. If 0 (default), the API backend uses 10,000. Max: 1,000,000. |
| `display_offset` | integer | No | Number of initial records to skip in the results. |
| `export_columns` | array | No | Specifies data columns for the report. Defaults to all: `date`, `backlinks_num`, `domains_num`, `score`. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get indexed pages

**Slug:** `SEMRUSH_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`. Returns CSV-like text output requiring parsing before structured analysis.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `target` | string | Yes | Target URL, domain, or root domain for which to retrieve indexed pages data. |
| `target_type` | string ("root_domain" | "domain" | "url") | Yes | Type of the target. |
| `display_sort` | string ("backlinks_num_asc" | "backlinks_num_desc" | "domains_num_asc" | "domains_num_desc" | "last_seen_asc" | "last_seen_desc") | No | Sorting criteria for the results. |
| `display_limit` | integer | No | Maximum number of results to return. |
| `display_offset` | integer | No | Number of initial results to skip. Note: When using `display_offset`, the `display_limit` should be the desired number of results plus the `display_offset` (e.g., for 100 results after skipping 50, set `display_offset=50`, `display_limit=150`). |
| `export_columns` | array | No | Specific columns for the report; defaults to all available columns if omitted. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get keyword difficulty

**Slug:** `SEMRUSH_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. Returns CSV-formatted text; parse before programmatic use.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `phrase` | string | Yes | The keyword or keyword phrase to analyze for difficulty. Minor wording variations produce different KD scores; normalize phrases before comparing results. |
| `database` | string ("us" | "uk" | "ca" | "ru" | "de" | "fr" | "es" | "it" | "br" | "au" | "ar" | "be" | "ch" | "dk" | "fi" | "hk" | "ie" | "il" | "mx" | "nl" | "no" | "pl" | "se" | "sg" | "tr" | "jp" | "in" | "hu" | "af" | "al" | "dz" | "ao" | "am" | "at" | "az" | "bh" | "bd" | "by" | "bz" | "bo" | "ba" | "bw" | "bn" | "bg" | "cv" | "kh" | "cm" | "cl" | "co" | "cr" | "hr" | "cy" | "cz" | "cd" | "do" | "ec" | "eg" | "sv" | "ee" | "et" | "ge" | "gh" | "gr" | "gt" | "gy" | "ht" | "hn" | "is" | "id" | "jm" | "jo" | "kz" | "kw" | "lv" | "lb" | "lt" | "lu" | "mg" | "my" | "mt" | "mu" | "md" | "mn" | "me" | "ma" | "mz" | "na" | "np" | "nz" | "ni" | "ng" | "om" | "py" | "pe" | "ph" | "pt" | "ro" | "sa" | "sn" | "rs" | "sk" | "si" | "za" | "kr" | "lk" | "th" | "bs" | "tt" | "tn" | "ua" | "ae" | "uy" | "ve" | "vn" | "zm" | "zw" | "ly" | "mobile-us" | "mobile-uk" | "mobile-ca" | "mobile-de" | "mobile-fr" | "mobile-es" | "mobile-it" | "mobile-br" | "mobile-au" | "mobile-dk" | "mobile-mx" | "mobile-nl" | "mobile-se" | "mobile-tr" | "mobile-in" | "mobile-id" | "mobile-il" | "il-ext" | "tr-ext" | "dk-ext" | "no-ext" | "se-ext" | "fi-ext" | "ch-ext" | "mobile-il-ext" | "pa" | "pk" | "tw" | "qa") | Yes | The Semrush regional database to use for the analysis (e.g., 'us', 'gb', 'ca'). Refer to the Semrush API documentation for a complete list of valid database codes: https://developer.semrush.com/api/v3/analytics/basic-docs/#databases. |
| `export_escape` | integer ("0" | "1") | No | Set to 1 to wrap output columns in double quotes ("), or 0 to disable. |
| `export_columns` | array | No | Specifies columns to include in the output (e.g., 'Ph' for Phrase, 'Kd' for Keyword Difficulty). Uses all available columns if omitted. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Keyword overview all databases

**Slug:** `SEMRUSH_KEYWORD_OVERVIEW_ALL_DATABASES`

Fetches a keyword overview from Semrush for a specified phrase, including metrics like search volume, CPC, and competition. Response is returned as a CSV-like string; parse headers and rows into a structured table before extracting values like Nq, Cp, or Kd.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `phrase` | string | Yes | Keyword or keyword phrase to investigate. |
| `database` | string ("us" | "uk" | "ca" | "ru" | "de" | "fr" | "es" | "it" | "br" | "au" | "ar" | "be" | "ch" | "dk" | "fi" | "hk" | "ie" | "il" | "mx" | "nl" | "no" | "pl" | "se" | "sg" | "tr" | "jp" | "in" | "hu" | "af" | "al" | "dz" | "ao" | "am" | "at" | "az" | "bh" | "bd" | "by" | "bz" | "bo" | "ba" | "bw" | "bn" | "bg" | "cv" | "kh" | "cm" | "cl" | "co" | "cr" | "hr" | "cy" | "cz" | "cd" | "do" | "ec" | "eg" | "sv" | "ee" | "et" | "ge" | "gh" | "gr" | "gt" | "gy" | "ht" | "hn" | "is" | "id" | "jm" | "jo" | "kz" | "kw" | "lv" | "lb" | "lt" | "lu" | "mg" | "my" | "mt" | "mu" | "md" | "mn" | "me" | "ma" | "mz" | "na" | "np" | "nz" | "ni" | "ng" | "om" | "py" | "pe" | "ph" | "pt" | "ro" | "sa" | "sn" | "rs" | "sk" | "si" | "za" | "kr" | "lk" | "th" | "bs" | "tt" | "tn" | "ua" | "ae" | "uy" | "ve" | "vn" | "zm" | "zw" | "ly" | "mobile-us" | "mobile-uk" | "mobile-ca" | "mobile-de" | "mobile-fr" | "mobile-es" | "mobile-it" | "mobile-br" | "mobile-au" | "mobile-dk" | "mobile-mx" | "mobile-nl" | "mobile-se" | "mobile-tr" | "mobile-in" | "mobile-id" | "mobile-il" | "il-ext" | "tr-ext" | "dk-ext" | "no-ext" | "se-ext" | "fi-ext" | "ch-ext" | "mobile-il-ext" | "pa" | "pk" | "tw" | "qa") | No | Regional database to query (e.g., 'us', 'gb'); if omitted, data is retrieved from all regional databases. |
| `export_decode` | integer | No | Set to 1 for a URL-decoded response, 0 for URL-encoded. |
| `export_escape` | integer ("0" | "1") | No | Set to 1 to wrap output columns in double quotes, 0 to disable. |
| `export_columns` | array | No | Specific columns for the report (e.g., 'Ph', 'Nq', 'Cp'). Defaults to all columns, including Date (Dt), Database (Db), Phrase (Ph), Search Volume (Nq), CPC (Cp), Competition (Co), Number of Results (Nr), Intent (In), and Keyword Difficulty (Kd). |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get keyword overview for one database

**Slug:** `SEMRUSH_KEYWORD_OVERVIEW_ONE_DATABASE`

Fetches a keyword summary for a specified phrase from a chosen regional database. Returns CSV-like text (not JSON) with column headers matching `export_columns` codes (e.g., 'Ph', 'Nq', 'Kd'); parse headers and rows into structured data before use. A plain-text 'ERROR 50 :: NOTHING FOUND' response indicates zero results, not a transport error.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `phrase` | string | Yes | The keyword or keyword phrase to investigate. |
| `database` | string ("us" | "uk" | "ca" | "ru" | "de" | "fr" | "es" | "it" | "br" | "au" | "ar" | "be" | "ch" | "dk" | "fi" | "hk" | "ie" | "il" | "mx" | "nl" | "no" | "pl" | "se" | "sg" | "tr" | "jp" | "in" | "hu" | "af" | "al" | "dz" | "ao" | "am" | "at" | "az" | "bh" | "bd" | "by" | "bz" | "bo" | "ba" | "bw" | "bn" | "bg" | "cv" | "kh" | "cm" | "cl" | "co" | "cr" | "hr" | "cy" | "cz" | "cd" | "do" | "ec" | "eg" | "sv" | "ee" | "et" | "ge" | "gh" | "gr" | "gt" | "gy" | "ht" | "hn" | "is" | "id" | "jm" | "jo" | "kz" | "kw" | "lv" | "lb" | "lt" | "lu" | "mg" | "my" | "mt" | "mu" | "md" | "mn" | "me" | "ma" | "mz" | "na" | "np" | "nz" | "ni" | "ng" | "om" | "py" | "pe" | "ph" | "pt" | "ro" | "sa" | "sn" | "rs" | "sk" | "si" | "za" | "kr" | "lk" | "th" | "bs" | "tt" | "tn" | "ua" | "ae" | "uy" | "ve" | "vn" | "zm" | "zw" | "ly" | "mobile-us" | "mobile-uk" | "mobile-ca" | "mobile-de" | "mobile-fr" | "mobile-es" | "mobile-it" | "mobile-br" | "mobile-au" | "mobile-dk" | "mobile-mx" | "mobile-nl" | "mobile-se" | "mobile-tr" | "mobile-in" | "mobile-id" | "mobile-il" | "il-ext" | "tr-ext" | "dk-ext" | "no-ext" | "se-ext" | "fi-ext" | "ch-ext" | "mobile-il-ext" | "pa" | "pk" | "tw" | "qa") | Yes | A regional database code (e.g., 'us' for United States, 'gb' for United Kingdom). Refer to Semrush documentation for a comprehensive list of available databases (https://developer.semrush.com/api/v3/analytics/basic-docs/#databases). |
| `display_date` | string | No | Optional. Date in "YYYYMM15" format (e.g., "20231215" for December 2023) to retrieve data for a specific past month. If omitted or empty, the most recent data is returned. |
| `export_decode` | integer ("0" | "1") | No | If set to 0, the response will be a URL-encoded string. If set to 1 (default), the response will not be URL-encoded. |
| `export_escape` | integer ("0" | "1") | No | If set to 1 (default), the report’s columns will be wrapped in double quotation marks ("). Set to 0 to disable. |
| `export_columns` | array | No | A list of specific columns to include in the report. If omitted, all available columns are returned by default. Available columns: Ph (Keyword phrase), Nq (Monthly search volume), Cp (Cost Per Click in USD), Co (Competition level of advertisers, 0 to 1), Nr (Number of URLs in organic search results), Td (Search trend over the last 12 months), In (Searcher intent types like informational, navigational, commercial, transactional), Kd (Keyword difficulty score, 0 to 100). |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get keywords ads history

**Slug:** `SEMRUSH_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.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `phrase` | string | Yes | Keyword or phrase for historical advertising data analysis. |
| `database` | string ("us" | "uk" | "ca" | "ru" | "de" | "fr" | "es" | "it" | "br" | "au" | "ar" | "be" | "ch" | "dk" | "fi" | "hk" | "ie" | "il" | "mx" | "nl" | "no" | "pl" | "se" | "sg" | "tr" | "jp" | "in" | "hu" | "af" | "al" | "dz" | "ao" | "am" | "at" | "az" | "bh" | "bd" | "by" | "bz" | "bo" | "ba" | "bw" | "bn" | "bg" | "cv" | "kh" | "cm" | "cl" | "co" | "cr" | "hr" | "cy" | "cz" | "cd" | "do" | "ec" | "eg" | "sv" | "ee" | "et" | "ge" | "gh" | "gr" | "gt" | "gy" | "ht" | "hn" | "is" | "id" | "jm" | "jo" | "kz" | "kw" | "lv" | "lb" | "lt" | "lu" | "mg" | "my" | "mt" | "mu" | "md" | "mn" | "me" | "ma" | "mz" | "na" | "np" | "nz" | "ni" | "ng" | "om" | "py" | "pe" | "ph" | "pt" | "ro" | "sa" | "sn" | "rs" | "sk" | "si" | "za" | "kr" | "lk" | "th" | "bs" | "tt" | "tn" | "ua" | "ae" | "uy" | "ve" | "vn" | "zm" | "zw" | "ly" | "mobile-us" | "mobile-uk" | "mobile-ca" | "mobile-de" | "mobile-fr" | "mobile-es" | "mobile-it" | "mobile-br" | "mobile-au" | "mobile-dk" | "mobile-mx" | "mobile-nl" | "mobile-se" | "mobile-tr" | "mobile-in" | "mobile-id" | "mobile-il" | "il-ext" | "tr-ext" | "dk-ext" | "no-ext" | "se-ext" | "fi-ext" | "ch-ext" | "mobile-il-ext" | "pa" | "pk" | "tw" | "qa") | Yes | Regional database to query. |
| `display_date` | string | No | Specifies a past month for data retrieval, formatted as 'YYYYMM15'. If omitted, returns most recent period's data. |
| `display_limit` | integer | No | Maximum number of results (lines) to return. |
| `export_decode` | integer ("0" | "1") | No | Set to 1 for a non-URL-encoded response, 0 for URL-encoded. |
| `export_escape` | integer ("0" | "1") | No | Set to 1 to wrap output columns in double quotes, 0 to disable. |
| `display_offset` | integer | No | Number of results to skip for pagination. |
| `export_columns` | array | No | Specific columns to include. If omitted or empty, all columns are returned. See `KeywordsAdsHistoryExportColumns`. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get organic results

**Slug:** `SEMRUSH_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.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `phrase` | string | Yes | Keyword or phrase to get Google's top 100 organic search results for. |
| `database` | string ("us" | "uk" | "ca" | "ru" | "de" | "fr" | "es" | "it" | "br" | "au" | "ar" | "be" | "ch" | "dk" | "fi" | "hk" | "ie" | "il" | "mx" | "nl" | "no" | "pl" | "se" | "sg" | "tr" | "jp" | "in" | "hu" | "af" | "al" | "dz" | "ao" | "am" | "at" | "az" | "bh" | "bd" | "by" | "bz" | "bo" | "ba" | "bw" | "bn" | "bg" | "cv" | "kh" | "cm" | "cl" | "co" | "cr" | "hr" | "cy" | "cz" | "cd" | "do" | "ec" | "eg" | "sv" | "ee" | "et" | "ge" | "gh" | "gr" | "gt" | "gy" | "ht" | "hn" | "is" | "id" | "jm" | "jo" | "kz" | "kw" | "lv" | "lb" | "lt" | "lu" | "mg" | "my" | "mt" | "mu" | "md" | "mn" | "me" | "ma" | "mz" | "na" | "np" | "nz" | "ni" | "ng" | "om" | "py" | "pe" | "ph" | "pt" | "ro" | "sa" | "sn" | "rs" | "sk" | "si" | "za" | "kr" | "lk" | "th" | "bs" | "tt" | "tn" | "ua" | "ae" | "uy" | "ve" | "vn" | "zm" | "zw" | "ly" | "mobile-us" | "mobile-uk" | "mobile-ca" | "mobile-de" | "mobile-fr" | "mobile-es" | "mobile-it" | "mobile-br" | "mobile-au" | "mobile-dk" | "mobile-mx" | "mobile-nl" | "mobile-se" | "mobile-tr" | "mobile-in" | "mobile-id" | "mobile-il" | "il-ext" | "tr-ext" | "dk-ext" | "no-ext" | "se-ext" | "fi-ext" | "ch-ext" | "mobile-il-ext" | "pa" | "pk" | "tw" | "qa") | Yes | Regional database to query (e.g., 'us' for United States). |
| `display_date` | string | No | Date in 'YYYYMM15' format (e.g., '20231215') for historical data of a past month; day must be '15'. Omit for most recent data. |
| `display_limit` | integer | No | Maximum number of results. API defaults to 10,000 if set to 0 or omitted by client. Max is 100,000. |
| `export_decode` | integer ("0" | "1") | No | Set to 1 for a plain URL-decoded response string, 0 for URL-encoded. |
| `export_escape` | integer ("0" | "1") | No | Set to 1 to wrap output columns in double quotation marks ("), 0 to not wrap. |
| `display_offset` | integer | No | Number of initial results to skip for pagination. Use with `display_limit` for results beyond the initial fetch. |
| `export_columns` | array | No | List of column codes to include. See `ExportColumnsEnum` for codes. Defaults to all columns if omitted. |
| `positions_type` | string ("organic" | "all") | No | Type of search results: 'organic' for traditional results, or 'all' to include SERP Features. If 'all', 'Pt' column indicates SERP feature code or '-1' for organic. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get paid search results

**Slug:** `SEMRUSH_PAID_RESULTS`

Fetches domains ranking in Google's paid search results (AdWords) for a specified keyword and regional database.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `phrase` | string | Yes | Keyword or phrase to analyze for paid search results. |
| `database` | string ("us" | "uk" | "ca" | "ru" | "de" | "fr" | "es" | "it" | "br" | "au" | "ar" | "be" | "ch" | "dk" | "fi" | "hk" | "ie" | "il" | "mx" | "nl" | "no" | "pl" | "se" | "sg" | "tr" | "jp" | "in" | "hu" | "af" | "al" | "dz" | "ao" | "am" | "at" | "az" | "bh" | "bd" | "by" | "bz" | "bo" | "ba" | "bw" | "bn" | "bg" | "cv" | "kh" | "cm" | "cl" | "co" | "cr" | "hr" | "cy" | "cz" | "cd" | "do" | "ec" | "eg" | "sv" | "ee" | "et" | "ge" | "gh" | "gr" | "gt" | "gy" | "ht" | "hn" | "is" | "id" | "jm" | "jo" | "kz" | "kw" | "lv" | "lb" | "lt" | "lu" | "mg" | "my" | "mt" | "mu" | "md" | "mn" | "me" | "ma" | "mz" | "na" | "np" | "nz" | "ni" | "ng" | "om" | "py" | "pe" | "ph" | "pt" | "ro" | "sa" | "sn" | "rs" | "sk" | "si" | "za" | "kr" | "lk" | "th" | "bs" | "tt" | "tn" | "ua" | "ae" | "uy" | "ve" | "vn" | "zm" | "zw" | "ly" | "mobile-us" | "mobile-uk" | "mobile-ca" | "mobile-de" | "mobile-fr" | "mobile-es" | "mobile-it" | "mobile-br" | "mobile-au" | "mobile-dk" | "mobile-mx" | "mobile-nl" | "mobile-se" | "mobile-tr" | "mobile-in" | "mobile-id" | "mobile-il" | "il-ext" | "tr-ext" | "dk-ext" | "no-ext" | "se-ext" | "fi-ext" | "ch-ext" | "mobile-il-ext" | "pa" | "pk" | "tw" | "qa") | Yes | Semrush regional database code (e.g., 'us' for United States, 'gb' for United Kingdom). |
| `display_date` | string | No | Date in YYYYMM15 format (e.g., '20231215') for historical data of a specific month; if omitted, returns most recent data. |
| `display_limit` | integer | No | Maximum number of results to return. |
| `export_decode` | integer ("0" | "1") | No | Set to 0 for URL-encoded response data, or 1 to preserve special characters (non-URL-encoded). |
| `export_escape` | integer ("0" | "1") | No | Set to 1 to wrap report columns in double quotes, or 0 to disable. |
| `display_offset` | integer | No | Number of results to skip from the beginning, for pagination. |
| `export_columns` | array | No | List of column codes to include (e.g., `Dn` for Domain, `Ur` for URL, `Vu` for a context-specific value). Defaults to all (`Dn`, `Ur`, `Vu`) if omitted. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Phrase questions

**Slug:** `SEMRUSH_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.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `phrase` | string | Yes | Keyword or phrase to investigate for related questions. |
| `database` | string ("us" | "uk" | "ca" | "ru" | "de" | "fr" | "es" | "it" | "br" | "au" | "ar" | "be" | "ch" | "dk" | "fi" | "hk" | "ie" | "il" | "mx" | "nl" | "no" | "pl" | "se" | "sg" | "tr" | "jp" | "in" | "hu" | "af" | "al" | "dz" | "ao" | "am" | "at" | "az" | "bh" | "bd" | "by" | "bz" | "bo" | "ba" | "bw" | "bn" | "bg" | "cv" | "kh" | "cm" | "cl" | "co" | "cr" | "hr" | "cy" | "cz" | "cd" | "do" | "ec" | "eg" | "sv" | "ee" | "et" | "ge" | "gh" | "gr" | "gt" | "gy" | "ht" | "hn" | "is" | "id" | "jm" | "jo" | "kz" | "kw" | "lv" | "lb" | "lt" | "lu" | "mg" | "my" | "mt" | "mu" | "md" | "mn" | "me" | "ma" | "mz" | "na" | "np" | "nz" | "ni" | "ng" | "om" | "py" | "pe" | "ph" | "pt" | "ro" | "sa" | "sn" | "rs" | "sk" | "si" | "za" | "kr" | "lk" | "th" | "bs" | "tt" | "tn" | "ua" | "ae" | "uy" | "ve" | "vn" | "zm" | "zw" | "ly" | "mobile-us" | "mobile-uk" | "mobile-ca" | "mobile-de" | "mobile-fr" | "mobile-es" | "mobile-it" | "mobile-br" | "mobile-au" | "mobile-dk" | "mobile-mx" | "mobile-nl" | "mobile-se" | "mobile-tr" | "mobile-in" | "mobile-id" | "mobile-il" | "il-ext" | "tr-ext" | "dk-ext" | "no-ext" | "se-ext" | "fi-ext" | "ch-ext" | "mobile-il-ext" | "pa" | "pk" | "tw" | "qa") | Yes | Semrush regional database (e.g., 'us', 'gb'). See Semrush documentation for the full list. |
| `display_sort` | string ("nq_asc" | "nq_desc" | "cp_asc" | "cp_desc" | "co_asc" | "co_desc" | "nr_asc" | "nr_desc" | "kd_asc" | "kd_desc") | No | Column and order for sorting results (e.g., 'nq_desc' for descending by Nq). |
| `display_limit` | integer | No | Maximum number of results to return. |
| `export_decode` | integer ("0" | "1") | No | Set to 0 for URL-encoded response data; 1 for unconverted data. |
| `export_escape` | integer ("0" | "1") | No | Set to 1 to wrap report columns in double quotation marks ("); 0 to disable. |
| `display_filter` | array | No | Column identifiers (from `PhraseQuestionsFilterType`) for filtering; refer to Semrush API documentation for behavior. |
| `display_offset` | integer | No | Number of results to skip for pagination. |
| `export_columns` | array | No | Columns from `PhraseQuestionsExportColumns` to include in the report. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get PLA competitors

**Slug:** `SEMRUSH_PLA_COMPETITORS`

Retrieves domains competing with a specified domain in Google's Product Listing Ads (PLA) from a given Semrush regional database.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `domain` | string | Yes | The domain name of the website to investigate (e.g., 'example.com'). |
| `database` | string ("us" | "uk" | "ca" | "ru" | "de" | "fr" | "es" | "it" | "br" | "au" | "ar" | "be" | "ch" | "dk" | "fi" | "hk" | "ie" | "il" | "mx" | "nl" | "no" | "pl" | "se" | "sg" | "tr" | "jp" | "in" | "hu" | "af" | "al" | "dz" | "ao" | "am" | "at" | "az" | "bh" | "bd" | "by" | "bz" | "bo" | "ba" | "bw" | "bn" | "bg" | "cv" | "kh" | "cm" | "cl" | "co" | "cr" | "hr" | "cy" | "cz" | "cd" | "do" | "ec" | "eg" | "sv" | "ee" | "et" | "ge" | "gh" | "gr" | "gt" | "gy" | "ht" | "hn" | "is" | "id" | "jm" | "jo" | "kz" | "kw" | "lv" | "lb" | "lt" | "lu" | "mg" | "my" | "mt" | "mu" | "md" | "mn" | "me" | "ma" | "mz" | "na" | "np" | "nz" | "ni" | "ng" | "om" | "py" | "pe" | "ph" | "pt" | "ro" | "sa" | "sn" | "rs" | "sk" | "si" | "za" | "kr" | "lk" | "th" | "bs" | "tt" | "tn" | "ua" | "ae" | "uy" | "ve" | "vn" | "zm" | "zw" | "ly" | "mobile-us" | "mobile-uk" | "mobile-ca" | "mobile-de" | "mobile-fr" | "mobile-es" | "mobile-it" | "mobile-br" | "mobile-au" | "mobile-dk" | "mobile-mx" | "mobile-nl" | "mobile-se" | "mobile-tr" | "mobile-in" | "mobile-id" | "mobile-il" | "il-ext" | "tr-ext" | "dk-ext" | "no-ext" | "se-ext" | "fi-ext" | "ch-ext" | "mobile-il-ext" | "pa" | "pk" | "tw" | "qa") | Yes | The Semrush regional database to query (e.g., 'us', 'uk', 'ca'). |
| `display_sort` | string ("np_asc" | "np_desc" | "cr_asc" | "cr_desc") | No | Specifies the sorting criteria for the results. Options include sorting by 'Np' (Number of PLA Keywords) or 'Cr' (Common Keywords count), in 'asc' (ascending) or 'desc' (descending) order. |
| `display_limit` | integer | No | The maximum number of results to return in the response. Use with `display_offset` for comprehensive data retrieval. |
| `export_decode` | integer ("0" | "1") | No | Determines if the response string is URL-encoded. Set to 0 for URL-encoded output, 1 for a non-converted (raw) string. |
| `export_escape` | integer ("0" | "1") | No | Controls whether report columns are wrapped in double quotation marks. Set to 1 to enable wrapping, 0 to disable. |
| `display_offset` | integer | No | The starting position of the results to fetch, effectively skipping this number of initial results. Used for pagination when `display_limit` is less than the total number of available results. |
| `export_columns` | array | No | Specifies which data columns to include in the report. Available column codes: 'Dn' (Domain Name), 'Cr' (Common Keywords), 'Np' (Number of PLA Keywords), 'Sh' (PLA Keywords), 'Ad' (Number of PLA Ads), 'At' (PLA Ad Titles), 'Ac' (PLA Ad Copies), 'Or' (Organic Keywords). |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get PLA copies

**Slug:** `SEMRUSH_PLA_COPIES`

Fetches Product Listing Ad (PLA) copies that Semrush observed for a domain in Google's paid search results.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `domain` | string | Yes | Domain to investigate for PLA copies. |
| `database` | string ("us" | "uk" | "ca" | "ru" | "de" | "fr" | "es" | "it" | "br" | "au" | "ar" | "be" | "ch" | "dk" | "fi" | "hk" | "ie" | "il" | "mx" | "nl" | "no" | "pl" | "se" | "sg" | "tr" | "jp" | "in" | "hu" | "af" | "al" | "dz" | "ao" | "am" | "at" | "az" | "bh" | "bd" | "by" | "bz" | "bo" | "ba" | "bw" | "bn" | "bg" | "cv" | "kh" | "cm" | "cl" | "co" | "cr" | "hr" | "cy" | "cz" | "cd" | "do" | "ec" | "eg" | "sv" | "ee" | "et" | "ge" | "gh" | "gr" | "gt" | "gy" | "ht" | "hn" | "is" | "id" | "jm" | "jo" | "kz" | "kw" | "lv" | "lb" | "lt" | "lu" | "mg" | "my" | "mt" | "mu" | "md" | "mn" | "me" | "ma" | "mz" | "na" | "np" | "nz" | "ni" | "ng" | "om" | "py" | "pe" | "ph" | "pt" | "ro" | "sa" | "sn" | "rs" | "sk" | "si" | "za" | "kr" | "lk" | "th" | "bs" | "tt" | "tn" | "ua" | "ae" | "uy" | "ve" | "vn" | "zm" | "zw" | "ly" | "mobile-us" | "mobile-uk" | "mobile-ca" | "mobile-de" | "mobile-fr" | "mobile-es" | "mobile-it" | "mobile-br" | "mobile-au" | "mobile-dk" | "mobile-mx" | "mobile-nl" | "mobile-se" | "mobile-tr" | "mobile-in" | "mobile-id" | "mobile-il" | "il-ext" | "tr-ext" | "dk-ext" | "no-ext" | "se-ext" | "fi-ext" | "ch-ext" | "mobile-il-ext" | "pa" | "pk" | "tw" | "qa") | Yes | Regional database to query (e.g., 'us', 'gb', 'de'). |
| `display_sort` | string ("pr_asc" | "pr_desc" | "pc_asc" | "pc_desc") | No | Sort order for results. 'pr' is Price, 'pc' is Position Change. |
| `display_limit` | integer | No | Number of results to return. Up to 100,000 results can be retrieved in a single call without offset. For more, use with `display_offset`. |
| `export_decode` | integer ("0" | "1") | No | If 0, response is URL-encoded; 1 for decoded response. |
| `export_escape` | integer ("0" | "1") | No | If 1, wraps report columns in double quotes ("); 0 disables. |
| `display_filter` | array | No | Columns to filter on ('Tt': Title, 'Pr': Price). Filter conditions depend on API implementation. |
| `display_offset` | integer | No | Results to skip. When used, `display_limit` should be `display_offset` + (number of results per page, up to 100k), not exceeding 4,000,000 total for `display_limit`. |
| `export_columns` | array | No | Specific columns for the report. If empty or omitted, all columns are returned. Available: 'Tt' (Title), 'Pr' (Price), 'Ur' (URL), 'Pc' (Position Change), 'Un' (Number of Keywords), 'Ts' (Timestamp). |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get referring domains

**Slug:** `SEMRUSH_REFERRING_DOMAINS`

Retrieves a semicolon-delimited text report listing domains that link to a target, with options to filter by type (not value). Parse with sep=';' and cast numeric columns (e.g., backlinks_num, domain_ascore) before aggregating.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `target` | string | Yes | The target URL, domain, or root domain to analyze for referring domains. |
| `target_type` | string ("root_domain" | "domain" | "url") | Yes | Type of the `target`. |
| `display_sort` | string ("domain_ascore_asc" | "domain_ascore_desc" | "backlinks_num_asc" | "backlinks_num_desc" | "last_seen_asc" | "last_seen_desc" | "first_seen_asc" | "first_seen_desc") | No | Column and order for sorting results. |
| `display_limit` | integer | No | Maximum number of referring domains to return. A value of 0 is also treated as 10,000. |
| `display_filter` | array | No | Filter types to apply (e.g., 'newdomain', 'country'). This specifies the *types* of filters, not the filter values themselves (e.g., a specific country code). |
| `display_offset` | integer | No | Number of initial results to skip. Consider adjusting `display_limit` if using an offset. Use with display_limit to paginate through large result sets (default limit is 10,000 rows). |
| `export_columns` | array | No | Columns to include in the report. All available columns are returned if empty. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get referring domains by country

**Slug:** `SEMRUSH_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.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `target` | string | Yes | Domain, subdomain, or URL to analyze for its referring domains by country. |
| `target_type` | string ("root_domain" | "domain" | "url") | Yes | Specifies the type of the provided target. |
| `display_sort` | string ("domains_num_asc" | "domains_num_desc" | "backlinks_num_asc" | "backlinks_num_desc") | No | Sorting order for the results. |
| `display_limit` | integer | No | Maximum number of results to return. |
| `display_offset` | integer | No | Number of initial results to skip. |
| `export_columns` | array | No | Columns to include in the report. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Referring i ps

**Slug:** `SEMRUSH_REFERRING_I_PS`

Fetches IP addresses that are sources of backlinks for a specified target domain, root domain, or URL.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `target` | string | Yes | The target URL, domain, or root domain for which to retrieve referring IPs data. |
| `target_type` | string ("root_domain" | "domain" | "url") | Yes | The type of target to analyze. Choose 'root_domain' for the main domain, 'domain' for a specific subdomain, or 'url' for a particular URL. |
| `display_sort` | string ("domains_num_asc" | "domains_num_desc" | "backlinks_num_asc" | "backlinks_num_desc" | "first_seen_asc" | "first_seen_desc" | "last_seen_asc" | "last_seen_desc") | No | The column and order by which to sort the results. For example, 'backlinks_num_desc' sorts by the number of backlinks in descending order. |
| `display_limit` | integer | No | The maximum number of referring IPs to return in the response. If set to 0 or not specified, the default is 10,000. When using `display_offset`, this limit applies to the number of results *after* the offset. |
| `display_offset` | integer | No | The number of results to skip from the beginning of the list. If this parameter is used, the `display_limit` value might need to be adjusted to retrieve the desired number of results after the offset. For instance, to get results 101-200, set `display_offset` to 100 and `display_limit` to 100. |
| `export_columns` | array | No | A list of columns to include in the report. If not specified, all default columns will be returned. Available columns: 'ip', 'country', 'domains_num', 'backlinks_num', 'first_seen', 'last_seen'. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Find related keywords

**Slug:** `SEMRUSH_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. Response is CSV-like delimited text (not JSON); parse by splitting on newlines and delimiters to extract structured rows.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `phrase` | string | Yes | Keyword or phrase to find related terms for. |
| `database` | string ("us" | "uk" | "ca" | "ru" | "de" | "fr" | "es" | "it" | "br" | "au" | "ar" | "be" | "ch" | "dk" | "fi" | "hk" | "ie" | "il" | "mx" | "nl" | "no" | "pl" | "se" | "sg" | "tr" | "jp" | "in" | "hu" | "af" | "al" | "dz" | "ao" | "am" | "at" | "az" | "bh" | "bd" | "by" | "bz" | "bo" | "ba" | "bw" | "bn" | "bg" | "cv" | "kh" | "cm" | "cl" | "co" | "cr" | "hr" | "cy" | "cz" | "cd" | "do" | "ec" | "eg" | "sv" | "ee" | "et" | "ge" | "gh" | "gr" | "gt" | "gy" | "ht" | "hn" | "is" | "id" | "jm" | "jo" | "kz" | "kw" | "lv" | "lb" | "lt" | "lu" | "mg" | "my" | "mt" | "mu" | "md" | "mn" | "me" | "ma" | "mz" | "na" | "np" | "nz" | "ni" | "ng" | "om" | "py" | "pe" | "ph" | "pt" | "ro" | "sa" | "sn" | "rs" | "sk" | "si" | "za" | "kr" | "lk" | "th" | "bs" | "tt" | "tn" | "ua" | "ae" | "uy" | "ve" | "vn" | "zm" | "zw" | "ly" | "mobile-us" | "mobile-uk" | "mobile-ca" | "mobile-de" | "mobile-fr" | "mobile-es" | "mobile-it" | "mobile-br" | "mobile-au" | "mobile-dk" | "mobile-mx" | "mobile-nl" | "mobile-se" | "mobile-tr" | "mobile-in" | "mobile-id" | "mobile-il" | "il-ext" | "tr-ext" | "dk-ext" | "no-ext" | "se-ext" | "fi-ext" | "ch-ext" | "mobile-il-ext" | "pa" | "pk" | "tw" | "qa") | Yes | Regional database code (e.g., 'us', 'gb') for targeting data. See Semrush docs for full list. |
| `display_date` | string | No | Date ('YYYYMM15') for historical data from a specific past month. Omit for most recent. |
| `display_sort` | string ("nq_asc" | "nq_desc" | "cp_asc" | "cp_desc" | "co_asc" | "co_desc" | "nr_asc" | "nr_desc" | "td_asc" | "td_desc" | "in_asc" | "in_desc" | "kd_asc" | "kd_desc") | No | Sort order for results (e.g., `nq_desc` for search volume descending). See `RelatedKeywordsSortOrder`. |
| `display_limit` | integer | No | Maximum number of related keywords to return. |
| `export_decode` | integer ("0" | "1") | No | If 0, returns URL-encoded string; if 1, returns plain text (typically CSV). |
| `export_escape` | integer ("0" | "1") | No | If 1, wraps CSV columns in double quotes; 0 disables. |
| `display_filter` | array | No | Filters results by column types (e.g., Ph, Nq, Wc). See `RelatedKeywordsFilterType`. For complex filters, direct API use may be needed. |
| `display_offset` | integer | No | Number of initial entries to skip, for pagination. |
| `export_columns` | array | No | Specifies data columns to include. Available (from `ExportColumnsEnum`): Ph (Keyword text), Nq (Search Volume), Cp (Competitive Density 0-1), Co (CPC in USD), Nr (Number of Results), Td (Trend 12mo), Rr (Relatedness score), Fk (SERP Features), In (Search Intent 0-Nav,1-Com,2-Info,3-Trans), Kd (Keyword Difficulty 0-100). |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get TLD distribution

**Slug:** `SEMRUSH_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.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `target` | string | Yes | The target for which to retrieve TLD distribution data. This can be a root domain (e.g., 'example.com'), a subdomain (e.g., 'blog.example.com'), or a specific URL (e.g., 'https://example.com/path'). |
| `target_type` | string ("root_domain" | "domain" | "url") | Yes | Type of the target being analyzed. |
| `display_sort` | string ("domains_num_asc" | "domains_num_desc" | "backlinks_num_asc" | "backlinks_num_desc") | No | Sorting criteria for the TLD distribution results. |
| `display_limit` | integer | No | Maximum number of results to return. If 0 is provided, the default limit of 10,000 will be applied. |
| `display_offset` | integer | No | Number of results to skip from the start. For Semrush API compatibility when using offset, `display_limit` may need to be `desired_limit + offset`. |
| `export_columns` | array | No | Columns to include in the report. If omitted or empty, all columns (`zone`, `domains_num`, `backlinks_num`) are returned. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |
