Telephone
United States
+1 (800) 815 - 9959
10:00 AM - 5:00 PM (EST/EDT)
Monday - Friday
Need help?
Telephone
United States
United States
Canada
United Kingdom
Spain
France
Italy
Germany
Australia
+1 (800) 815 - 9959
10:00 AM - 5:00 PM (EST/EDT)
Monday - Friday
Understanding how your online performance stacks up against your top competitors is what drives smarter actions, sharper strategies, and better results.
This tutorial shows you how to use Trends API to analyze your top 5 competitors' online performance: their traffic, behavior, traffic sources, geography, and audience, and compare these metrics to yours. Follow the step-by-step guide to get actionable insights and use your Trends API units efficiently.
Before analyzing performance, it’s important to know who your competitors are. If needed, you can discover your online competitors using Semrush tools. In this tutorial, we’ll use the top 5 domains from the e-commerce industry in the United States as an example to guide you through each step.
You can use API testing tools like Postman to test your requests before full implementation. Note that test requests consume API units.
The first step is to compare your top 5 competitors’ performance to yours at a high level. This helps you quickly identify who leads in traffic volume, user engagement, and overall visibility, so you can prioritize which domains to analyze in more detail.
Relevant API method: Traffic Summary
Request cost: 1 API unit per line. When accessing data for 5 competitors’ domains and your own, you’ll receive 6 lines, which will cost 6 API units.
API request example
https://api.semrush.com/analytics/ta/api/v3/summary?targets=YOUR_DOMAIN,ebay.com,walmart.com,etsy.com,homedepot.com,target.com&export_columns=target,visits,users,time_on_site,pages_per_visit,bounce_rate&key=YOUR_API_KEY
How to use:
YOUR_DOMAIN
with your website) and the competitor domains. For example, targets=YOUR_DOMAIN,ebay.com,walmart.com,etsy.com,homedepot.com,target.com
.YOUR_API_KEY
.display_date
parameter value following the YYYY-MM-01
format. If the display_date
parameter isn't specified, data from the previous month is shown by default.country=us
for the United States.export_columns
parameter to select the columns you want to extract into this report and limit the results. For example, to get competitor website visits, unique visitors (users), average visit duration, bounce rate, and pages per visit, set the following values: export_columns=target,visits,users,time_on_site,pages_per_visit,bounce_rate
.Result: You’ll get a report with your and competitors’ data for traffic rank, visits, unique visitors, pages per visit, average visit duration, and bounce rate.
If you want to go beyond the monthly snapshot and uncover daily patterns, seasonality, or campaign impact, you can use the Daily Traffic method for each domain.
Request cost: 1 API unit per request. To access 5 competitors’ domains and your own, you need to make 6 requests, which will cost 6 API units.
API request example
https://api.semrush.com/analytics/ta/api/v3/summary_by_day?target=ebay.com&key=YOUR_API_KEY
How to use:
target=ebay.com
.YOUR_API_KEY
.Result: You'll get a day-by-day breakdown of traffic—ideal for spotting spikes, dips, and short-term volatility.
After reviewing traffic metrics across all competitors, the next step is to understand traffic sources, assess geographic focus, and profile audience demographics.
The instructions for how to use the API methods and the request cost apply to all the Step 2 methods.
How to use:
target=ebay.com
.YOUR_API_KEY
.Request cost: 1 API unit per request. To access 5 competitors’ domains and your own, you need to make 6 requests, which will cost 6 API units. For the following 3 methods, you’ll spend a total of 18 API units.
Goal: Understand where competitors get their traffic from (for example, direct, referral, search, or social) to uncover their primary growth strategies.
Relevant API method: Traffic Sources
API request example
https://api.semrush.com/analytics/ta/api/v3/traffic_sources?target=ebay.com&key=YOUR_API_KEY
Result: You’ll get a channel-by-channel traffic breakdown, allowing you to spot organic and paid leaders and benchmark acquisition strategies.
Goal: Discover where competitor audiences are located to gain insights into the geographic diversity and distribution of your market audience.
Relevant API method: Geo Distribution
API request example
https://api.semrush.com/analytics/ta/api/v3/geo_distribution?target=ebay.com&key=YOUR_API_KEY
Result: You’ll get a list of countries where traffic to your selected domains comes from.
Goal: Analyze competitor visitor demographics to enhance your segmentation and targeting.
Relevant API method: Age and Sex Distribution
API request example
https://api.semrush.com/analytics/ta/api/v3/age_sex_distribution?target=ebay.com&key=YOUR_API_KE
Result: You’ll get a demographic breakdown by age and gender, making it easier to identify competitors with overlapping audiences and fine-tune your messaging or ad targeting.
The data from this tutorial shows where your competitors outperform and where they fall short. Now’s your chance to:
Turn these findings into action by improving content strategy, ad targeting, and regional focus, based on exactly how your competitors are succeeding.