Backlink API: An Exceptionally Easy Guide

As we are launching our Backlink API, it's probably a good idea to accompany it with a quick reminder of what APIs are, how do you use them, and why would you even want to. Without further ado, here is our simple-yet-comprehensive guide on everything you need to know about Backlink APIs.

What is an API?

Application Programming Interface (API) is a way to pull raw data directly from where it is stored without having to go through a software interface.

Take our own backlink index as an example. We are using our own engine to crawl the web and look for backlinks and, up to date, we have found a little over 2.7 trillion of them. We store those backlinks in our backlink index and we use the index to power one of our apps — SEO SpyGlass.

So, normally, if you want to see the data from our backlink index, you'd have to install and use our software, and you would get something similar to the image above. But, with the Backlink API, you can access the index directly and download the data as a JSON or an XML file.

Why use an API?

First and foremost, API is crazy fast. When you access data using a software interface, it takes a little extra time to arrange that data for viewing. And the more data you want to see, the more time it takes. But when you use an API, the data is dumped as a single file — no formatting, no nothing. So the exchange goes much faster. Seconds instead of minutes, minutes instead of hours.

Second, API is crazy flexible. With raw data, you are not bound by the restrictions of any given interface and can use the data any way you like. You can power your own dashboards, merge our data with the data from other indexes, build custom reports, or even re-sell our data to the users of your own software.

Who would need an API?

With raw data, there is really no limit on the ways it can be applied. But we suspect that most likely users of our Backlink API would be one of the following:

Digital agencies

Aiming for the least possible data oversight, digital agencies would probably want to add our backlink data to the data from other sources and process it using their dashboards of choice.

Software developers

Our backlink index could be used to power any number of third-party software solutions, from basic backlink checkers to comprehensive SEO tools.

Data scientists

One of the largest backlink indexes on the market might be of interest to anyone looking to support their research, be it for commercial or academic purposes.

How does an API work?

API works like your basic call and response. When you want to request data from the index, you form a command, specify the kind of data you would like, add your unique access key (API key), paste the command into an internet browser, and get your data right there in the browser window.

Here is a sample data request command:

https://api.seopowersuite.com/backlinks/v1.0/get-metrics?apikey=XXX&target=https://www.example.com&mode=domain&output=json

Here is what each part of the command stands for:

https://api.seopowersuite.com/backlinks/v1.0/ — backlink index location
get-metrics — command type
apikey=XXX — your unique API key that grants access to the index
target=https://www.example.com — web address to be analyzed
mode=domain — specifying whether the address should be treated as a domain (analysis of all URLs and subdomains), host (analysis of all URLs), or URL (analysis of one page)
output=json — output format

Here is what a response to that command would look like:

{
"metrics":[
{
"target": "example.com",
"backlinks": 2,
"refdomains": 1,
"nofollow_backlinks": 0,
"dofollow_backlinks": 2,
"edu_backlinks": 0,
"gov_backlinks": 0
}
]
}

All in all, we've got ten command types and a few dozen data parameters, which means that you can tailor your requests to receive highly specific datasets. Make sure to visit Backlink API documentation to learn more about available command types and the ways you can shape the data.

What do you do with the data?

Normally, you would write or borrow a script that helps you request, download, and process the data automatically. But the automation is not always necessary — if you are looking to pull just a few sets of data, then you can manage the data manually. When downloaded, the data can be easily converted to a spreadsheet or uploaded to another software. From then on — the sky's the limit.

How to integrate Backlink API with Google Sheets?

Integrating Backlink API with Google Sheets is one of the easiest ways to process your data. You can use functions like IMPORTXML or IMPORTDATA to make an API call from within the spreadsheet and have your data poured directly into the table.

Example 1: Request backlink metrics for a site/page

Use IMPORTXML function to get a quick overview of any domain, sub-domain or URL:

Step 1. Create a new spreadsheet.
Step 2. Type your domain name into cell A1
Step 3. Enter your data request.

Copy the following line into any cell of your spreadsheet, and change YOUR_API_KEY to your actual API key:

=TRANSPOSE(IMPORTXML(CONCAT("https://api.seopowersuite.com/backlinks/v1.0/get-metrics?apikey=YOUR_API_KEY&mode=domain&output=xml&target=",A1), "//metrics"))

The sheet will populate with data:

Example 2: Request a list of backlinks for a site/page

Use IMPORTXML function to get a list of backlinks for a domain, sub-domain or URL:

Step 1. Create a new spreadsheet. (see Example 1)
Step 2. Type your domain name into cell A1 (see Example 1)
Step 3. Enter your data request.

Copy the following line into any cell of your spreadsheet, and change YOUR_API_KEY to your actual API key:

=IMPORTXML(CONCAT("https://api.seopowersuite.com/backlinks/v1.0/get-backlinks?apikey=YOUR_API_KEY&mode=domain&limit=10&order_by=inlink_rank&output=xml&target=",A1), "//backlinks")

The sheet will populate with data:

Example 3: Request historical backlink data for a site/page

Use IMPORTXML function to see how the number of backlinks was changing over time:

Step 1. Create a new spreadsheet. (see Example 1)
Step 2. Type your domain name into cell A1 (see Example 1)
Step 3. Enter your data request.

Copy the following line into any cell of your spreadsheet, and change YOUR_API_KEY to your actual API key:

=IMPORTXML(CONCAT("https://api.seopowersuite.com/backlinks/v1.0/get-new-lost-backlinks-count?apikey=YOUR_API_KEY&date_from=2020-01-01&date_to=2020-01-31&&output=xml&target=",A1, "//new_lost_backlinks_count")

The sheet will populate with data:

There are many other ways you can get data from our Backlink API directly into Google Sheets, Excel, Tableau or any other spreadsheet — please refer to the corresponding documentation for your favorite spreadsheet tool.

How to access our Backlink API?

Depending on your needs, you can use one of the three ways to access our Backlink API:

Get an Enterprise subscription to SEO SpyGlass

Enterprise-level users of SEO SpyGlass get free access to 200K units of API data per month. If you are an Enterprise-level user, please contact our support team to get your access key.

Purchase a Backlink API subscription

We offer subscription plans with access to 5, 20, and 100 million units of API data per month.

Contact us for a custom plan

If you need more data or have a unique use case, then contact our support team and we will work out a custom solution to accommodate your needs.

What are the data units?

Roughly speaking, one unit equals one line of data. For example, a request to fetch backlinks to a page would return a list, where each backlink comes with additional information, like anchor text, page title, page authority, and so on.

That backlink, along with all of its additional information, is one line of data and you will be charged one unit per that line. If the request returns ten backlinks, you will be charged ten units. Don't worry, you can always set the limit for those requests that have the potential to return thousands of lines of data.

If you have experience with other backlink API providers, you might know that sometimes they use tricky multipliers and would charge a different number of units depending on how complex your request is. We don't do that — we always charge one unit per one line, no matter how much data we had to process to put this line together.

Article stats:
Linking websites N/A
Backlinks N/A
InLink Rank N/A
Data from Seo SpyGlass: check my backlinks free.
Got questions or comments?
Join our community on Facebook!