Integrations Product Features

An SEO’s Guide To The Botify API

Young man with glasses looking at screen from face

An SEO’s Guide to the Botify API

21st November 2019Andreas VoniatisAndreas Voniatis

The purpose of the Botify API is to integrate Botify with third-party applications, thus enabling SEOs and stakeholders to use any data available in the Botify interface or via the Botify Chrome Extension with their unique business solutions. Take a look at how Botify customer Andreas Voniatis learned how to interpret and utilize the Botify API successfully.

This article was contributed by Andreas Voniatis, Marketing Scientist at Artios, growth hacking scientists using AI to boost your profits.

Why I’m sharing our learnings about the Botify API

While the Botify API guide is straight-forward and helpful, my team faced some challenges interpreting it in the right way. As a result, our immediate thought was that some SEOs might not use the API, not because they didn’t want to but because it’s an investment in time (And who has time?).

The API guide quite correctly assumes that its users are tech savvy and use APIs all the time. However, while technically skilled at website audits, some SEOs might find working with APIs rather intimidating. This could be due to stress from managing many responsibilities, being stretched for time, or the growing pains of transitioning to a new software.

To save time, we have put together a companion guide for SEOs to get the best out of the Botify API, including the typical use cases that an enterprise-level SEO or data scientist is likely to encounter.

To note, the code below is written in R (Sorry, Python users! However, R code is quite readable and similar to Python and should be fairly easy to translate). Fear not. If you can’t code, you really only have to edit two lines of code (and then the rest is done!).

Retrieving your projects

To get your data, you need to see and know which projects you have. Here is the R code to do that:

Screen Shot 2019-11-20 at 4.28.55 PM

Once done, your output of the first few columns should look like this:

Botify API-Code-2

Retrieving your audits

In Botify’s API language, an audit is an “analysis.” Next up is code to list your analysis:

Screen Shot 2019-11-20 at 4.26.36 PM

Looking at the dimensions of the output:

Botify API-Code-4

We can see that there are 2,201 individual columns and over 81 audits that have been run. Naturally, we shall not list the columns here! To note, you will only need some of these fields (maybe 100-600), whereas the others will include metadata (like project names, owners, email addresses, etc.) that aren’t directly linked to your SEO business data.

To give you an idea of the output (i.e. the all_analyses object), see below:

Botify-API-Code-5

Extracting your audit data

You’re now in a position to get all of your audit data from your analysis. Here’s how:

Screen Shot 2019-11-20 at 4.25.25 PM

Screen Shot 2019-11-14 at 4.13.27 PM

Lines 1-30 (of 264) from the bql_fields.csv file

Botify-API-Code-7

This may take a few minutes to run depending on the size of your site. A 1 million page site, for example, will take about 5-10 minutes maximum.

Let’s inspect the output:

Botify-API-Code-8

As you can see from the first 6 rows, there are 209 columns starting with “byte_size.”

In summary

You now have the code in R, and with only two lines to edit, you can interact with the Botify API that allows you to:

  • Find which projects you have
  • Find the audits (a.k.a. analyses)
  • Extract all the data you need from each analysis in a tabular format

Simply copy the code above and, libraries permitting, you’re good to go.

Now you’re ready to do some SEO data science!

Sep 9, 2017 - 2 mins

Enterprise Advanced Exports: Unequalled Data For Your Deep Dives

Integrations Product Features
Nov 11, 2017 - 5 mins

Top 10 Botify Features You Didn’t Know About

Integrations Product Features
Dec 12, 2017 - 2 mins

Breaking News! Introducing Custom Reports Monitoring: Get Instant Access To Botify’s Latest Insights

Integrations Product Features