API Queries - Referrers
The referrers function lists the top 10 referrers for a domain in descending order and includes the hits for the time period selected.
Additional Parameters
- domain - The domain you wish to retrieve referrers for. (Required)
- view_period - The time period to retrieve statistics for. Default is "last7days". Accepted values are "last7days", "last3months" and "last6months". (Optional)
- start - The starting offset for results. Default is 0 (Optional)
- num - The number of results to show from the report. Default is 100, maximum is 1,000 (Optional)
Example query:
https://www.above.com/api.php?username=user&password=pass&api_key=key&mode=referrers&domain=example.com&view_period=last6months&start=0&num=0
Response:
<results>
<resulthits="140336"referrer="www.google.com.br"/>
<resulthits="102851"referrer="www.google.com"/>
<resulthits="79134"referrer="www.google.co.in"/>
<resulthits="28365"referrer="www.tp-link.com"/>
<resulthits="26351"referrer="thuthuat.taimienphi.vn"/>
<resulthits="18737"referrer="www.google.pl"/>
<resulthits="17743"referrer="www.google.iq"/>
<resulthits="15831"referrer="www.google.com.ua"/>
<resulthits="15473"referrer="www.google.com.pk"/>
<resulthits="15110"referrer="www.google.ru"/>
</results>
Error Responses:
Possible error responses for this function are:
- 400 - Invalid mode parameter
- 410 - Domain is missing or invalid
- 412 - Period, from_date and to_date combination or value is invalid
- General errors, such as 200 - Internal Error or 300 - Username or password invalid.
For a complete list of error responses, see the Error Codes manual page.