Menu
Alexa Web Information Service
Developer Guide

A batch request is similar to a regular query request, except that it allows multiple service calls, or sub-requests, to be sent in one request. Batch requests save on network latency time.

[Note] Note

Batch requests save time, not money -- they are billed as though each sub-request was made separately.

All parameters except the core AWS parameters ( Action, AWSAccessKeyId, Signature, SignatureMethod, SignatureVersion, and Timestamp ) are batched according to the following rules:

  • If a query request contains at least one parameter of the format [ActionName].[integer].[ParameterName], it is a batched request (example: UrlInfo.1.Url).

  • The numbers for the request params must be contiguous (i.e. if UrlInfo.3.Url is present, UrlInfo.1.Url and UrlInfo.2.Url are required as well).

  • A batch request can have shared parameters (parameters that have the same value for all service calls). Shared parameters have the form [ActionName].Shared.[ParameterName] (example: TrafficHistory.Shared.Start). A short-hand form of Shared.[ParameterName] is supported as well.

  • Up to 5 service calls can be batched in a single request. If more service calls are needed, they must be divided into multiple batch requests.

  • All service calls within a single batch request must be of the same Action type. You cannot mix different actions in a single batch request.

Sample Batch Request #1

The following example shows a batch query request that returns the rank for three URLs.

https://awis.amazonaws.com/api?
                Action=UrlInfo
                &UrlInfo.Shared.ResponseGroup=Rank
                &UrlInfo.1.Url=[website #1]
                &UrlInfo.2.Url=[website #2]
                &UrlInfo.3.Url=[website #3]
            

Sample Batch Request #2

The following example shows a batch query request that returns five sites linking in for three URLs.

https://awis.amazonaws.com/api?
                Action=SitesLinkingIn
                &SitesLinkingIn.1.Url=[website #1]
                &SitesLinkingIn.2.Url=[website #2]
                &SitesLinkingIn.3.Url=[website #3]
                &SitesLinkingIn.Shared.Count=5
                &SitesLinkingIn.Shared.ResponseGroup=SitesLinkingIn
                &Timestamp=[time now, format described in Common Request Parameters]