UrlTrends API Documentation
Last Revised: Tuesday, August 30, 2005 17:46 PSTThe UrlTrends API is designed for, and used by, developers to access the data that UrlTrends has gathered for any url in our database.
By using our API you will be able to access a urls current search engine data, previous search engine data, and the current search terms that you can find the url by. You will be able to add urls into our systems and we will monitor these urls at a regular interval too.
To use the API you must be registered for a My UrlTrends account that has API capabilities. For testing and implelementation purposes, you can register for our Basic Plan (Our Free Plan) and request an API key. Once you have completed testing, you must upgrade your account to our API Basic Plan, API Advanced Plan or the API Premium Plan prior to making your application public (internal or externally). Each of these plans have costs and specific features and limits associated with them. This information is outlined before you signup for the plans.
If you expect that you will need more than 10,000 queries per day than you can contact us for partnership opportunities or to arrange for a custom plan to be created.
The UrlTrends API is a RESTful API:
You can make either HTTP GET or HTTP POST calls to our API server to access the information. Our API responds back with a simple XML response.An example GET request would look like the following:
http://api.urltrends.com/api.php?command=GetInfo&url=http%3A%2F%2Fwww.domainname.com&update=1&wait=1&sendifavail=1&apikey=API_KEY_HERE
This example API call would return something similiar to the following:
<?xml version="1.0" encoding="utf-8"?> <Result> <UrlInfo> <URL>http://www.domainname.com</URL> <URLID>1234</URLID> <Updated>2005-08-04</Updated> <Rankings> <Rank_PR>7</Rank_PR> <Rank_Alexa>908</Rank_Alexa> <Link_Out>13</Link_Out> <Link_Google>209</Link_Google> <Link_Yahoo>990000</Link_Yahoo> <Link_MSN>82805</Link_MSN> <Link_Alexa>143013</Link_Alexa> <Link_AllTheWeb>543000</Link_AllTheWeb> <Link_AltaVista>927000</Link_AltaVista> <Link_Teoma>1110</Link_Teoma> <Blog_IceRocket>0</Blog_IceRocket> <BM_Delicious>3</BM_Delicious> <BM_Furl>0</BM_Furl></Rankings> <DMOZ> <Cat path="Computers/Internet/Searching/Directories/Open_Directory_Project/Sites_Using_ODP_Data">Top/.../Open Directory Project/Sites Using ODP Data</Cat> </DMOZ> <Cache> <Cache_Archive url="http://web.archive.org/web/*/http://www.domainname.com">0</Cache_Archive> <Cache_Google url="http://www.google.com/search?q=cache:http://www.domainname.com">1</Cache_Google> <Cache_UrlTrends url="http://www.urltrends.com/cache.php?id=XXXX&view=all">4</Cache_UrlTrends> </Cache> </UrlInfo> <API> <ResponseCode>200</ResponseCode> <RemainingQueries>9966</RemainingQueries> <ExecTime>0.013</ExecTime> </API> <PassThru></PassThru> </Result>
The specific options for each of the calls that are available can be viewed by clicking on one of the API calls from the left menu.
Common required variables for all requests:
There are a few common variables that are required for every API request made. They are case sensitive.For an example of the required keys view the url below. Every item in red is required.
The required API variables are:
- Command: The command variable tells us what you want to do. Without it we are lost and will return an error.
- API Key: The API Key is used to tell us who is requesting the information and to validate that that user is allowed to access or provide the information.
Example:
http://api.urltrends.com/api.php?command=GetInfo&url=http%3A%2F%2Fwww.domainname.com&update=1&wait=1&sendifavail=1&apikey=API_KEY_HERE
Passthru Variables:
The UrlTrends API supports passthru variables. Any variable passed to the API that is not used by our systems is considered a passthru variable and is given back to you in the Passthru section of the XML result.If you want to use passthrue variables they should not be named any of the following.
- command
- url
- apikey
- getinfo
- wait
- sendifavail
- update
An example passthru would look like the following:
http://api.urltrends.com/api.php?command=GetInfo&url=http%3A%2F%2Fwww.domainname.com&update=1&wait=1&sendifavail=1&apikey=API_KEY_HERE&myvar1=asdsmnk&thisvar=ddsfdfds&anotherone=jfnkjg
This example API call would return something similiar to the following:
<?xml version="1.0" encoding="utf-8"?> <Result> <UrlInfo> <URL>http://www.domainname.com</URL> <URLID>1234</URLID> <Updated>2005-08-26</Updated> <Rankings> <Rank_PR>6</Rank_PR> <Rank_Alexa>94996</Rank_Alexa> <Link_Out>3</Link_Out> <Link_Google>72</Link_Google> <Link_Yahoo>10800</Link_Yahoo> <Link_MSN>2526</Link_MSN> <Link_Alexa>2969</Link_Alexa> <Link_AllTheWeb>10300</Link_AllTheWeb> <Link_AltaVista>10700</Link_AltaVista> <Link_Teoma>2820</Link_Teoma> <Blog_IceRocket>26</Blog_IceRocket> <BM_Delicious>0</BM_Delicious> <BM_Furl>0</BM_Furl></Rankings> <Cache> <Cache_Archive url="http://web.archive.org/web/*/http://www.domainname.com">0</Cache_Archive> <Cache_Google url="http://www.google.com/search?q=cache:http://www.domainname.com">1</Cache_Google> <Cache_UrlTrends url="http://www.urltrends.com/cache.php?id=XXXX&view=all">4</Cache_UrlTrends> </Cache> </UrlInfo> <API> <ResponseCode>200</ResponseCode> <RemainingQueries>9964</RemainingQueries> <ExecTime>0.029</ExecTime> </API> <PassThru> <myvar1>asdsmnk</myvar1> <thisvar>ddsfdfds</thisvar> <anotherone>jfnkjg</anotherone> </PassThru> </Result>
Copyright © 2005, UrlTrends, LLC.
Documentation only applicable to API Version 1.0
Last updated by Joel Strellner