The TrafficHistory action returns the daily Alexa Traffic Rank, Reach per Million Users, and Unique Page Views per Million Users for each day since June 2007. This same data is used to produce the traffic graphs found on alexa.com.
The TrafficHistory Action takes the following parameters. Required parameters must be provided for the request to succeed.
| Name | Description | Required |
|---|---|---|
Action
|
Set the | Yes |
Url
|
Any valid URL. The URL parameter specifies the URL, host or domain about which you would like to receive information. | Yes |
ResponseGroup
|
| 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. The first start available date is 20070601 (June 1, 2007) | No |
Version
| Pass in the current version number, 2005-07-11, to ensure that requests succeed even if the API changes in future versions. | No |
The following example shows a Query-style request and response
http://awis.amazonaws.com? Action=TrafficHistory &AWSAccessKeyId=[Your AWS Access Key ID]&Signature=[signature]&Timestamp=[timestamp used in signature]&Url=[Valid URL]&ResponseGroup=History &Range=[maximum number of results]&Start=[start date for results]
The response contains an aws:Data element for each day in the date range specified. Note that no data will be returned for days when the daily Alexa traffic rank was greater than 100,000.
<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>39ab4736-ec1a-492d-924b-d0d768d2692d</aws:RequestId>
</aws:OperationRequest>
<aws:TrafficHistoryResult>
<aws:Alexa>
<aws:TrafficHistory>
<aws:Range>31</aws:Range>
<aws:Site>amazon.com</aws:Site>
<aws:Start>2005-01-01</aws:Start>
<aws:HistoricalData>
<aws:Data>
<aws:Date>2005-01-01</aws:Date>
<aws:PageViews>
<aws:PerMillion>2801</aws:PerMillion>
<aws:PerUser>5.0</aws:PerUser>
</aws:PageViews>
<aws:Rank>18</aws:Rank>
<aws:Reach>
<aws:PerMillion>26041</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>