Print this pageEmail this pageGo to the ForumsView the PDFShare this page on TwitterShare this page on FacebookBookmark this page on DeliciousSubmit this page to RedditSubmit this page to Digg

TopSites

Description

The TopSites action provides lists of web sites ordered by Alexa Traffic Rank. A global list is available, as well as lists for individual countries.

Request Parameters

In addition to the common request parameters, the TopSites action takes the following parameters. Required parameters must be provided for the request to succeed.

NameDescriptionTypeValue
CountryCode

Valid country code (a list of country codes is available from ListCountries ResponseGroup). A global list of top sites is returned by default.

Optional 
Start

Number of result at which to start. Used for paging through results. Default value is '1'.

OptionalNumber to start at
Count

Number of results (maximum) per page to return. Default value is '100'. Maximum is '100'.

OptionalNumber from 1 to 100
ResponseGroup

Any valid response group. See the Response Group section for valid options.

Required

Comma-separated list of response groups.

Response Groups

Response groups allow the user more control over what data is returned. By specifying one or more response groups when making the request, you can retrieve only the information you are interested in.

Response GroupData Returned
Country

Top sites for a given country

ListCountries

Countries that have top sites

Sample Request

The following example shows a query-style request and response.

Request

http://ats.amazonaws.com/?
    AWSAccessKeyId=1234567890ABCDEFGHIJ
    &Action=TopSites
    &Count=1
    &CountryCode=CN
    &ResponseGroup=Country
    &Signature=1234567890abcdefghijABCDEFGH
    &SignatureMethod=[HmacSHA256 or HmacSHA1]
    &SignatureVersion=2
    &Timestamp=2006-01-01T00:00:00.000Z
            
For more information on signing requests, see Calculating Signatures.

Response

For a description of rank, reach, and page views, see http://www.alexa.com/help/traffic-learn-more.

<?xml version="1.0"?>
<aws:TopSitesResponse xmlns:aws="http://alexa.amazonaws.com/doc/2005-10-05/"> 
  <aws:Response>
    <aws:OperationRequest>
      <aws:RequestId>9ffc5e13-175e-4c7e-b33b-0efe3501d1f3</aws:RequestId>
    </aws:OperationRequest>
    <aws:TopSitesResult>
      <aws:Alexa>
        <aws:TopSites>
          <aws:List>
           <aws:CountryName>China</aws:CountryName>
           <aws:CountryCode>CN</aws:CountryCode>
           <aws:TotalSites>671496</aws:TotalSites>
           <aws:Sites>
             <aws:Site>
               <aws:DataUrl>baidu.com</aws:DataUrl>
               <aws:Country>
                 <aws:Rank>1</aws:Rank>
                 <aws:Reach>
                   <aws:PerMillion>358000</aws:PerMillion>
                 </aws:Reach>
                 <aws:PageViews>
                   <aws:PerMillion>77410</aws:PerMillion>
                   <aws:PerUser>11.5</aws:PerUser>
                 </aws:PageViews>
               </aws:Country>
               <aws:Global>
                 <aws:Rank>4</aws:Rank>
               </aws:Global>
             </aws:Site>
           </aws:Sites>
          </aws:List>
        </aws:TopSites>
      </aws:Alexa>
    </aws:TopSitesResult>
    <aws:ResponseStatus>
      <aws:StatusCode>Success</aws:StatusCode>
    </aws:ResponseStatus>
  </aws:Response>
</aws:TopSitesResponse>