Menu
Alexa Top Sites
Developer Guide

Alexa Top Sites -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.

Name Description Type Value
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'.

Optional Number to start at
Count

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

Optional Number 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 Group Data 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

https://ats.amazonaws.com/api?
            Action=TopSites
            &Count=1
            &CountryCode=CN
            &ResponseGroup=Country
                  
For more information on signing requests, see Calculating Signatures.

Headers

            Authorization: AWS4-HMAC-SHA256 Credential=IAM_ACCESS_KEY/20171114/us-west-1/AlexaTopSites/aws4_request, SignedHeaders=host;x-amz-date, Signature=GENERATED_AUTH_V4_SIGNATURE
            Content-Type: application/xml
            X-Amz-Date: 20171114T190104Z
            Accept: application/xml
              

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>