contacts

Telephone

United States

dropdown button

United States

Canada

United Kingdom

Spain

France

Italy

Germany

Australia

+1 (800) 815 - 9959

10:00 AM - 5:00 PM (EST/EDT)

Monday - Friday

mobile-menu

Get started

Analytics divider Last updated: June 6, 2025

Analyze keyword gaps among competitors

The Domain vs. Domain report helps you to compare the keyword profiles of up to five competitors.

This tutorial shows you how to create a report that compares your domain with two competitors to find keywords that they rank for, but you don’t (untapped keywords). This is perfect for finding content gaps and new SEO opportunities.

Before you start

  1. Make sure you have:
    1. Access to Standard API.
    2. Enough API units to make calls. Following the examples from this tutorial, you’ll spend a total of 800 API units (80 API units per line * 10 top keywords).
  2. Get your API key from the Subscription Info tab.
You can use API testing tools like Postman to test your requests before full implementation. Note that test requests consume API units.

Specify keyword type and domains

Imagine you are analyzing mybrand.com against two competitors: competitor1.com and competitor2.com.

To find untapped keywords for mybrand.com, use the following formula:

*|or|competitor1.com|+|or|competitor2.com|-|or|mybrand.com

  • Use the asterisk * to start with all keywords.
  • Use |or|competitor1.com to add competitor organic keyword pools.
  • Use |+|or|competitor2.com to add additional competitor organic keyword pools to the keyword set.
  • Use |-|or|mybrand.com to exclude keywords you already rank for.

This string must be included as the domains parameter to your request in the URL-encoded format.

Encode special characters

Since this parameter contains special characters like *, |, +, and -, you must encode it. The encoded string will look as follows:

The domains parameter example

domains=%2A%7Cor%7Ccompetitor1.com%7C%2B%7Cor%7Ccompetitor2.com%7C%2D%7Cor%7Cmybrand.com

Let’s break it down:

Request part Meaning Encoded
* Sign: Wildcard for all keywords %2A
| Separator between segments %7C
+ Sign: Add to the pool of keywords %2B
- Sign: Exclude from the pool of keywords %2D

Filter results

You can use the display_filter parameter to apply filters to the report. For example, if you want to focus on:

  • Moderate to high search volume keywords that have the potential to drive meaningful traffic, set Search Volume (Nq) to greater than 1,000.
  • Keywords that are moderately or less competitive in organic search, set Keyword Difficulty (Kd) to less than 60.
  • Keywords with low to moderate paid competition in Google Ads, making them potentially easier organic SEO targets, set Competition (Co) to less than 0.6.

The string will look as follows: +|Nq|Gt|1000|+|Kd|Lt|60|+|Co|Lt|0.6

Here:

  • Search volume > 1,000: +|Nq|Gt|1000
    • + → include
    • Nq → search volume
    • Gt → greater than
    • 1000 → value
  • Keyword Difficulty < 60: +|Kd|Lt|60
    • + → include
    • Kd → keyword difficulty
    • Lt → lower than
    • 60 → value
  • Competition < 0.6: +|Co|Lt|0.6
    • + → include
    • Co → competition
    • Lt → lower than
    • 0.6 → value

Encode special characters

Since this parameter contains special characters like + and |, you must encode it. The encoded string will look as follows:

The display_filter parameter example

display_filter=%2B%7CNq%7CGt%7C1000 %7C%2B%7CKd%7CLt%7C60%7C%2B%7CCo%7CLt%7C0.6

Let’s break it down:

Request part Meaning Encoded
+ Sign: Include rows that match the filter condition %2B
| Separator between segments %7C

Sort results

You can sort the results by descending search volume using the display_sort parameter: display_sort=nq_desc.

To check other sorting options, refer to Sortings.

Add other request params

  1. Select report type: type=domain_domains.
  2. Specify your API key: key=YOUR_API_KEY.
  3. Specify the database: database=us for the United States.
  4. (Optional) Specify the columns you want to extract. In this example, it’s export_columns=Ph,P0,P1,P2,Nq,Kd,Co,Cp.
  5. (Optional) Limit the number of lines returned. In this example, it’s top 10 results: display_limit=10.

Construct your request

When you put all the parameters together, the request will look like this:

The Domain vs. Domain request example

https://api.semrush.com/?type=domain_domains&key=YOUR_API_KEY&database=us&domains=%2A%7Cor%7Ccompetitor1.com%7C%2B%7Cor%7Ccompetitor2.com%7C%2D%7Cor%7Cmybrand.com&display_sort=nq_desc&display_filter=%2B%7CNq%7CGt%7C1000%7C%2B%7CKd%7CLt%7C60%7C%2B%7CCo%7CLt%7C0.6&export_columns=Ph,P0,P1,P2,Nq,Kd,Co,Cp&display_limit=10

What's next

In this guide, you learned how to identify high-value, lower-competition organic keywords your competitors rank for, but you do not. This approach supports data-driven content planning by highlighting untapped keywords where competitors have visibility.

From here, you can refine your filters to match your SEO goals, integrate results into your reporting workflows, or build automated tools to streamline ongoing analysis. For a more comprehensive strategy, you may also explore other Semrush API reports.