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.
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!).
To get your data, you need to see and know which projects you have. Here is the R code to do that:
Once done, your output of the first few columns should look like this:
In Botify’s API language, an audit is an “analysis.” Next up is code to list your analysis:
Looking at the dimensions of the output:
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:
You’re now in a position to get all of your audit data from your analysis. Here’s how:
Lines 1-30 (of 264) from the bql_fields.csv file
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:
As you can see from the first 6 rows, there are 209 columns starting with “byte_size.”
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:
Simply copy the code above and, libraries permitting, you’re good to go.
Now you’re ready to do some SEO data science!