Login

Using the Yahoo Site Explorer Inbound Links API

The Yahoo Site Explorer API offers useful data for anyone who is trying to do well in the search engines. The trick is getting that data into a form you can use. Keep reading to learn how to build an application that will organize the information so you can analyze it.

If you belong to the search engine marketing industry, one of the most important decision making problems can be found in search engine optimization (SEO). You will need to do analysis of both your competitor’s and your own web sites. In SEO aimed at Google, one of the most important factors to examine is "back links". Google’s search engine algorithm, as well as other related algorithms of other search engines, particularly Yahoo/MSN, relies on the evaluation of back links to determine or measure the authority, relevance and reputation of a certain website.

Thus, gathering and analyzing back link information comprises an important part of search engine optimization analysis processes. By analyzing back link information, a link profile can then be made for a certain website as to whether:

The client website lacks relevant links while their competitor has enough related links. If this is the case, maybe they should expose their high quality content to targeted readers (with related websites) which in turn will link to their site.

In terms of link popularity, the client website’s total amount of links coming from other domains is low when compared with competitor websites.

Most of the inbound links are coming from spammy domains which do not give substantial reputation points to the client’s website. If this is the case, improving the link profile by getting links from related websites may be an effective strategy.

You can discover whether you’re dealing with any of the above problems after performing a thorough back link analysis.

One of the most effective web site APIs (application programming interface) for gathering back link data is Yahoo Site Explorer. The Site Explorer API can be interfaced with a server-side scripting language (such as PHP) to request data from Yahoo, and then, using an authentication method, Yahoo will output results which will be considered raw data to be used in your back link analysis (using a PHP script).

In this two-part tutorial series, we will show you how to use the Yahoo Site Explorer links API with the PHP server-side scripting language to develop web applications that are important to search engine optimization.

{mospagebreak title=The Inbound Links API Concept}

Think of the Site Explorer API as a "database" with which a server-side scripting language (PHP) will communicate, making requests for data. A similarity can be illustrated between PHP-MySQL and PHP-Yahoo Site Explorer Link API web applications. Observe the flow charts below:

When you are using a web application API such as Yahoo, you need an "Application ID" to authenticate your application before Yahoo provides you the data. The good thing about the inbound links API is that it is FREE; you will not need to pay to gather useful data from Yahoo.

However, there are limits. According to Yahoo Site Explorer, the "API is limited to 5,000 queries per IP address per day and to noncommercial use." Other details of its limitations are also available.

It is also important that your use of the Yahoo Site Explorer API will not violate the usage policy.

For every unique web application, you need an "Application ID" you will use in your PHP program to authenticate the Yahoo Inbound Links API. You cannot secure an Application ID if you do not have a Yahoo account. So the first step is to secure a Yahoo account if you do not have one.

Once you have a Yahoo account, follow the steps below to secure an application ID:

1. Go to http://www.yahoo.com and sign in using your Yahoo account. You can sign in to your Yahoo Mail. This will automatically log you in to all Yahoo-related services.

2. Once you are logged in, copy and paste this URL in the browser address bar: http://developer.yahoo.com/wsregapp/

3. You need to fill out the required information as accurately as possible. You may leave other fields blank. A sample screenshot below gives you some guide to filling out the API application form:

4. After inputting all the required information, click "continue."

5. Yahoo will then provide you the Application ID on the next page after inputting all details. It is a ~64 character code, consisting of both alphanumeric and dashes as characters.

6. Bear in mind that this is a secret API key; it should not be shared with other developers, because this is issued just to you and your web application.

7. You can keep a safe copy of your application ID; you can either print it to a PDF or save it to your desktop.

{mospagebreak title=Making a Request to Yahoo API Using PHP}

Now that you have an Application ID, you are ready to create your web application. It will do the following tasks:

Send a request to Yahoo to get inbound links data (which will contain all of the request parameters to be discussed below, including your Application ID).

Receive the response from the Yahoo Site Explorer API.

Convert the response to a compatible data format that can be easily manipulated in PHP.

Extract relevant data for analysis from the compatible data structure.

All of these six important tasks will be covered in this tutorial series. It will help you develop easy, useful and even advanced inbound link-related analysis using the Yahoo Site Explorer Link API.

To make a request to the Yahoo API is like sending a GET request. This type of request is done by appending parameters in the URL. These parameters are variables which can be changed depending on the intent of the application. Based on official Yahoo documentation on making a request, the official request URL is this:

http://search.yahooapis.com/SiteExplorerService/V1/inlinkData

The above URL is a standard and should NOT be altered. It is the official request URL for the Yahoo Inbound Links API. Now, since this is a form of GET request, to append your application ID (which will be needed for authentication), add a "?" string to the official request URL:

Your Application ID is just one of the request parameter/variables you can append. The official list of parameters can be found at the link under "Request Parameters."

Based on the request parameters, "appID" (application ID) and "query" are required; all others are optional, except when your application needs them.

Example: If you would like the Yahoo Inbound Link API to send you the data for the domain http://www.php-developer.org , and you need five results as well as having the output be compatible with PHP, the following is the final request URL (with parameters and value):

After receiving the request, the API will give a response back to your web server. The format of the response could be XML (default), JSON or PHP. You can instruct the Yahoo Site Explorer API to give your the desired response format by incorporating this parameter into your request (see example above):

Output=[yourresponseformat eg. PHP, JSON or XML]

A PHP response will be used in this tutorial. Below are the most important response variables and their significance to SEO:

TotalResultsAvailable. This is the total number of back links pointing to the domain or a certain URL in your domain; it depends on what you are requesting. If you have this data, it highly correlates with the website’s link popularity.

Title. This is the title of the linking page. By using this data properly, you can measure the relevance of the linking page with respect to your domain. The relevance of the page is one of the most important elements of back links.

URL. This is the URL of the back link page. By using this response, you can use this data to further check the back linking domain, such as the age of the domain, registration, number of indexed pages, Page Rank, etc., which can be used to measure the authority and trust of the back linking domain.

This concludes the first part. In the second part, you will learn how to formulate your PHP script to make requests and receive the response from the Site Explorer API.