UrlTrends API Documentation

Last Revised: Thursday, September 15, 2005 13:53 PST


API Error Codes

Whenever an error has been generated your XML response will include an Error section. This section includes two entries called "errorcode" and "errormsg".

Your application should check for the presence of the Error section to ensure that you are receiving the correct data.

If you encounter an error, it will resemble the following result:
<?xml version="1.0" encoding="utf-8"?>
<result>
	<error>
		<errorcode>401</errorcode>
		<errormsg>Invalid API Key</errormsg>
	</error>
	<api>
		<remainingqueries>0</remainingqueries>

	</api>
	<passthru></passthru>
</result>
	
The following table outlines the possible error codes and the associated errormsg. Most error codes can return different errormsg's to help you better understand why it is returning that error code. When an errormsg below contains more then one line it signifies additional errormsg's that mey be returned.

Additonal Note: If you encounter an error, our system will not deduct a query from your remaining queries.

errorcode errormsg
204 Url Not Specified.
Url is invalid.
Url was not accessable
400 No Command Type Specified.
Invalid Command Type Specified.
401 Invalid API Key
Url is not in database and can not be added.
Query Limit Exceeded
503 System is Unavailable - Database Error
System is Unavailable - Error Creating Thread


API Response Codes

In every XML response to a request we include an API section that includes a ResponseCode, unless an error has been generated. If an error has been generated it will resemble the example above. If there is not an error you can use the ResponseCode section to determine exactly what we did with your request.

A successful request will resemble the following results API section:
<?xml version="1.0" encoding="utf-8"?>
<Result>
	<UrlInfo>
		<URL>http://www.urltrends.com</URL>
		<URLID>7</URLID>
		<Title>UrlTrends :: Website Analytics & Trends, Online Competitive Intelligence Research and Search Engine Position Tracking Tools</Title>
		<Description>Monitoring 62,666 Url's Search Engine Ranking Trends Tracking 417,770 Keywords on 10,271,799 URLs Username: Password: Click Here to Register Forget your September 13th, 2005 - Trend Reports now display the date a website was first......</Description>
		<OnlineSince>Unknown</OnlineSince>
		<FirstMon>2004-12-28</FirstMon>
		<Adult>No</Adult>
		<Updated>2005-09-15</Updated>
		<Rankings>
			<Rank_PR>4</Rank_PR>
			<Rank_Alexa>16701</Rank_Alexa>
			<Link_Out>26</Link_Out>
			<Link_Google>237</Link_Google>
			<Link_Yahoo>5200</Link_Yahoo>
			<Link_MSN>4884</Link_MSN>
			<Link_Alexa>0</Link_Alexa>
			<Link_AllTheWeb>2660</Link_AllTheWeb>
			<Link_AltaVista>4400</Link_AltaVista>
			<Link_Teoma>52</Link_Teoma>
			<Blog_IceRocket>38</Blog_IceRocket>
			<BM_Delicious>227</BM_Delicious>
			<BM_Furl>25</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.urltrends.com">0</Cache_Archive>
			<Cache_Google url="http://www.google.com/search?q=cache:http://www.urltrends.com">1</Cache_Google>
			<Cache_UrlTrends url="http://www.urltrends.com/cache.php?id=7&view=all">11</Cache_UrlTrends>
		</Cache>
	</UrlInfo>
	<API>
		<ResponseCode>200</ResponseCode>
		<RemainingQueries>9994101</RemainingQueries>
		<ExecTime>0.020</ExecTime>
	</API>
	<PassThru></PassThru>
</Result>
	
The following table provides to every possible response code.
ResponseCode Meaning of response code
200 Your request was successful and all information has been returned as it should.
202 The url was accepted and added to our queue to be added our monitoring systems.

This ResponseCode should only be sent back to your if you are performing a GetInfo query and have wait set to 0.





Copyright © 2005, UrlTrends, LLC.
Documentation only applicable to API Version 1.0
Last updated by Joel Strellner