The Base URL
Every Query request to Alexa Top Sites web service begins with the following:
Base URL
http://ats.amazonaws.com
Request Parameters
The base URL is followed by a series of parameters that define the request. Parameters are separated from the base URL by a question mark ( ? ) and each other by an ampersand ( & ) character. Each parameter consists of a key and a value, separated from each other by an equals sign ( = ). Note that parameters and their values are case-sensitive; for example, Action=TopSites works correctly, but Action=topsites produces an error. Also note that all HTTP parameters must be UrlEncoded.
The following example shows a simple Query request that returns a topsites for a given Country.
Sample Request
http://ats.amazonaws.com?
AWSAccessKeyId=
[your AWSAccessKeyId]
&Timestamp=
[timestamp now, format as described in http://www.w3.org/TR/xmlschema-2/#dateTime]
&Signature=
[signature calculated from request]
&ResponseGroup=
[desired response group, such as Country]
&Action=TopSites
&CountryCode=
[Country to get topsites for, such as CN]
Parameter Details
The parameters in the example are described in the following table:
| Parameter | Required | Description |
|---|---|---|
| AWSAccessKeyId | yes |
This is your Amazon Web Services Access Key ID. This parameter
is used to identify the sender of the request.
Note: To obtain an AWS Access Key ID, you must sign up for an Amazon Web Services Account. To sign up, please use the sign in page. |
| Action | yes | This parameter tells the service what action it should perform. See the Actions section for the list of all supported actions for TopSites. |
| Signature | yes | This parameter holds the computed signature for this request. Request signatures are used to authenticate requests, and assure that the request contents were not altered between the sender and AWS. For more information about request signatures, please see the Request Authentication section. |
| ResponseGroup | yes | This parameter specifies the response group to allow the user more control over what data is returned. By specifying one or more response groups when making the request, users can retrieve only the information they are interested in. |