Find website traffic information with SimilarWeb

Hey community,

Running analysis on a competitor’s website outreach or enrich your leads with website traffic information is easy with dashdash and SimilarWeb.

Let’s build and app that automatically tracks the Monthly Visits, Pages per Visit and Monthly Page Visits for any website.

1. Get your SimilarWeb API key

First, you will need to create a SimilarWeb account. After that is done, travel to the API Management section and Generate an API Key:

2. Add the API key, website domain and timeframe for the analysis

Let’s start building our app by adding the API key, the website domain and the start and end month of the analysis.

B1: “YOUR_API_KEY”
A4: “2019-04-01”
B4: “2019-05-01”
A8: “cnn.com

3. Add GET() requests to get the website traffic and pages per visit

We will use SimilarWeb’s API to get the monthly website traffic and the number of pages for each website domain. For that, we will use two different GET requests, one for each data point, and PARSE them to get the data for the most recent month.

B8: =GET("https://api.similarweb.com/v1/website/"&A8&"/total-traffic-and-engagement/visits?api_key="&$B$1&"&start_date="&$A$4&"&end_date="&$B$4&"&main_domain_only=false&granularity=monthly")

C8: =PARSE(B8,"['visits'][1].['date']")

D8: =PARSE(B8,"['visits'][1].['visits']")/1000000 (to get the number of visits, in Millions)

E8: =GET("https://api.similarweb.com/v1/website/"&A8&"/total-traffic-and-engagement/pages-per-visit?api_key="&$B$1&"&start_date="&$A$4&"&end_date="&$B$4&"&main_domain_only=false&granularity=monthly")

F8: =PARSE(E8,"['pages_per_visit'][1].['pages_per_visit']")

4. Calculate the total number of page visits and add more website domains to the tracker

To calculate the total number of page visits multiple the number of visits with the number of pages per visit:

G8: =F8*D8

To run the analysis for other domains, add the new domain (e.g “wsj.com”) to A9, and copy-paste the cells B8-G8 to the next row. Voilà, that should do the trick :muscle:

Once your analysis is done, you can explore the SimilarWebAPI and try their additional endpoints to know traffic rank of websites, bounce rates, similar websites, traffic sources and a lot more.

Happy building,
Henrique

1 Like