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

Welcome to .Trends API

.Trends divider Last updated: July 12, 2024

Overview

The .Trends API offers a robust array of data related to website traffic and market trends. With access to the .Trends API, you can easily pull raw Semrush .Trends data straight into your in-house reports or systems.

You can integrate the .Trends API with:

  • Dashboards: Enterprise portals, CRMs, ERPs
  • Reporting software: Tableau, Power BI, and more
  • Spreadsheets: Google Sheets and Microsoft Excel
  • Other custom in-house analytics systems

Key benefits

  • Consolidate all your data sources into one location for easier analysis and quicker market and competitive insights.
  • Access your data from a variety of platforms for convenient visualization and streamlined decision-making.
  • Automate and customize your data reporting to quickly reveal the unique insights your business needs to take the lead.
  • Make detailed, customizable data queries to extract precisely the information you need, enhancing your analysis capabilities.
  • Accelerate the development and deployment of data-driven applications by integrating robust sets of API data directly into your software.
The .Trends API not only provides essential data for understanding the market and competitors, but it also lets you analyze potential partners and identify sales leads and future investment opportunities.

How the .Trends API works

Save your time and increase efficiency with .Trends API

Accessing and analyzing data from the .Trends API helps you quickly generate key insights to enhance your strategy and grow your business.

Here are some types of analysis you can do with the .Trends API data:

  • Market evaluation: Assess new markets, analyze the competitive landscape, and spot emerging trends.
  • Competitor analysis: Understand competitor strategies, identify their best practices, counteract their moves, and exploit their weaknesses.
  • Understanding audience: Access valuable audience demographics to strategize effectively without trial and error.
  • Geographic data analysis: Discover regional trends to make quick, targeted, and informed decisions.
  • Lead qualification: Qualify new leads by analyzing key metrics and developing strategies tailored to your target's needs.

Subscription plans

Semrush offers two .Trends API subscription plans for different customers and needs:

  • .Trends Basic API: Ideal for marketers focused on analyzing competitor web traffic, benchmarking traffic statistics, and understanding user behavior on competitor domains.
  • .Trends Premium API: Perfect for marketers or marketing teams aiming to study broad market trends, analyze the competitive landscape, research market audiences, and track competitor marketing activity.

.Trends Basic API

Offers access to broad traffic summaries that include website traffic metrics and user behavior data:

  • Traffic Data (up to 200 domains)
  • Monthly Visits
  • Unique Visits
  • Pages Per Visit
  • Average Visit Duration
  • Mobile vs. Desktop
  • Bounce Rates

.Trends Premium API

Offers everything included in the .Trends Basic API, along with 16 additional data types that let you dig deeper into market dynamics, competitor strategies, and web traffic flows:

  • Daily Traffic
  • Weekly Traffic
  • Purchase Conversion
  • Industry Categories
  • Traffic Sources
  • Traffic Destinations
  • Subdomain Traffic
  • Subfolder Traffic
  • Geographic Distribution
  • Top Pages
  • Traffic Rank
  • Audience Insights
  • Age and Sex Distribution
  • Household Size, Income, Education, and Occupation distributions
  • Audience Interests
  • Social Media Preferences

Getting started

Get your API key

To start, you'll need to your API key. This is a unique code that informs the system that it's you who is requesting the data.

To learn how to find your API key, refer to Get API key.

Build your .Trends API request

Once you have your API Key, you can create an API request—a set of directions you send our system that communicates the types of data you want to receive.

For each API request, you'll create a separate URL. This URL has several parts that tell our system what data you want and from which domains.

.Trends API request example

https://api.semrush.com/analytics/ta/api/v3/summary?key=YOUR_API_KEY&targets=openai.com&export_columns=target,visits,users&display_date=2024-06-01&country=US

This API request lets you get the Traffic Summary report. Let's break it down:

  • https://api.semrush.com/analytics/ta/api/v3/: Endpoint—a URL that lets you connect to the server to use the .Trends API.
    • summary: The type of report you want to get. Put ? after it to add the request parameters. Separate parameters by &.
      • key=YOUR_API_KEY: Your API Key, which identifies you to the server.
      • targets=openai.com: The domain, subdomain, or folder you want to analyze.
      • export_columns=target,visits,users: The specific types of data you need.
      • display_date=2024-06-01: The date range for the data you need.
      • country=US: The country you want the data from.

To learn more about building API requests, refer to Break down your API calls in a text editor.

You can find all the available reports and check more request examples in the .Trends API reference.

Ready to start working with the .Trends API data?

You're just 10 minutes away from your first data report!

To get started, head to the .Trends API reference. You'll find everything you need there to get the ball rolling.

We're here to help if you need a hand

Running into roadblocks? Click the Need help button at the top right corner of any page or check out the FAQ section to find answers to common questions from the API users.

Need access to the .Trends API?

To gain access to the .Trends API, send a request to the Semrush Sales team.

FAQ

  • I've never used an API before. Do I need technical expertise to get data?

Not at all! Building an API request and sending it to the system is simple. Everything you need to know is in the .Trends API reference page.

  • How far back can I pull API data?

The traffic data goes back as far as 2017. Age and Sex audience data goes back to April 2020, while Socioeconomic data goes back to April 2022.

  • How can I see if there's new data available? Will I be notified?

We don't send notifications when new data is available. To check it, go to the Semrush .Trends interface. The data available in the .Trends interface is also available through the .Trends API.

  • Where can I find a list of API error codes?

Refer to the .Trends API error codes and messages.

  • Can API data be purchased without a Semrush subscription?

To access the .Trends API, you'll need to purchase a Semrush subscription. You can find Semrush subscription options on the Plans & Pricing page.

To purchase more .Trends API units, go to the Subscription info page.

If you don't have access to the .Trends API, contact the Sales team using the Sales Inquiry form, and the team will provide you with a quote that fits your needs.

  • How often can I pull .Trends API data?

You can request API data whenever you want as long as you have .Trends API units. Your limits renew automatically each month, but you can buy more at any time on the Subscription info page.

  • What is the data methodology for Semrush .Trends API?

Semrush .Trends processes raw clickstream data through the proprietary machine learning algorithm to generate traffic estimates. To learn more about the process, refer to How Semrush Turns Traffic Data Into Traffic Intelligence.

  • When is .Trends API data available?

You can access .Trends API data as soon as it's available in the Semrush .Trends interface. Each week, Semrush provides data for the previous week. The complete dataset for the prior month becomes available by the 10th day of the current month.

  • Can I increase my per-hour limit?

No, the technical limit is set to 10,000 requests per hour. You can make up to 10 requests per second.

  • Does Semrush offer a free API trial?

Semrush doesn't offer a free .Trends API trial. If you have questions about using the .Trends API or would like learn more about it, check out the How the .Trends API works video or contact the Sales team using the Sales Inquiry form.

  • I noticed some .Trends API data is different after your recent algorithm update. Can I access the old data from before the update?

Semrush stores data for three months after any significant algorithm update. We can provide this data by request. Contact our customer support if you have questions.