Menu
Alexa Web Information Service
Developer Guide

Description

The TrafficHistory action returns the daily Alexa Traffic Rank, Reach per Million Users, and Unique Page Views per Million Users for each day going back 4 years. Sites with a rank in excess of 1,000,000 are not included.

Request Parameters

The TrafficHistory Action takes the following parameters. Required parameters must be provided for the request to succeed.

Name Description Required
Action

TrafficHistory

Yes
Url

Any valid URL.

Yes
ResponseGroup

History is the only available response group.

Yes
Range

Number of days to return. Note that the response document may contain fewer results than this maximum if data is not available. Default value is '31'. Maximum value is '31'.

No
Start

Start date for results. A date within the last 4 years in format YYYYMMDD.

No

Example

The following example shows a query-style request and response

Request

https://awis.amazonaws.com/api?
        Action=TrafficHistory
        &Url=[Valid URL]
        &ResponseGroup=History
        &Range=[maximum number of results]
        &Start=[start date for results]
    

Headers

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

Response

The response contains an aws:Data element for each day in the date range specified.

<aws:TrafficHistoryResponse xmlns:aws="http://alexa.amazonaws.com/doc/2005-10-05/">
<aws:Response xmlns:aws="http://awis.amazonaws.com/doc/2005-07-11">
<aws:OperationRequest><aws:RequestId>c3b86545-6036-14ce-ca6c-58b75881cbdb</aws:RequestId>
</aws:OperationRequest>
<aws:TrafficHistoryResult>
<aws:Alexa>
<aws:TrafficHistory>
<aws:Range>31</aws:Range>
<aws:Site>amazon.com</aws:Site>
<aws:Start>2015-01-01</aws:Start>
<aws:HistoricalData>
  <aws:Data>
    <aws:Date>2015-01-01</aws:Date>
    <aws:PageViews>
      <aws:PerMillion>14220</aws:PerMillion>
      <aws:PerUser>11.60</aws:PerUser>
    </aws:PageViews>
    <aws:Rank>6</aws:Rank>
    <aws:Reach>
      <aws:PerMillion>102100</aws:PerMillion>
    </aws:Reach>
  </aws:Data>
</aws:HistoricalData>
</aws:TrafficHistory>
</aws:Alexa>
</aws:TrafficHistoryResult>
<aws:ResponseStatus xmlns:aws="http://alexa.amazonaws.com/doc/2005-10-05/">
<aws:StatusCode>Success</aws:StatusCode>
</aws:ResponseStatus></aws:Response>
</aws:TrafficHistoryResponse>