Start an offline search query that will return up to 10,000,000 results in a downloadable text file.
| Name | Description | Required |
|---|---|---|
Action | Set the | Yes |
|
Version | Pass in the version number to ensure that requests succeed even if the API changes in future versions. | Yes |
Query | A set of search terms. Phrases should be enclosed in double quotes. Must be URL encoded. See the Query Syntax chapter for more details. The maximum size of the Query string is 120 KB. Some tips:
| Yes |
MaxNumberOfDocuments |
Maximum number of lines in the output file. The value must be between 200 and 10000000 (inclusive).
| Yes |
CachedDocumentsOnly |
Set to true to limit the results to documents that are stored in Alexa's cache. You should set this to true if you want to post-process the results using regular expressions with the StartGrep action. The default value is false, in which case all matching documents are returned. As of July 2007 the full search index contains about 10 billion documents. The most popular half billion documents are cached and available for post-processing. | No |
MaxTime | The maximum runtime in seconds, after which any available results are returned. The default value is 86400 (24 hours). The value must be between 1 and 86400 (inclusive). A simple query returning one million results usually completes within 30 minutes. Complex queries may take longer. | No |
SiteThrottle | Used to reduce the number of results returned per site. The value must be between 0 and 4 inclusive. The default value is 0, which is no throttling.
Set | No |
| Name | Description |
|---|---|
ActionRequestId | The id associated with this request. Pass this Id into the GetStatus Action to find out if your search has completed. |
The following example shows a Query-style request and response
http://msearch.amazonaws.com/?
Action=StartSearch
&Version=2007-03-15
&AWSAccessKeyId=[Your AWS Access Key ID]
&Timestamp=[Current timestamp]
&Signature=[Calculated request signature]
&Query=[Search terms]
&MaxNumberOfDocuments=[Max results to return]
<StartSearchResponse xmlns:aws="http://msearch.amazonaws.com/doc/2007-03-15/">
<StartSearchResult>
<ActionRequestId>2167c9cb-cf4c-4ebd-82e5-832a7754c0d8</ActionRequestId>
</StartSearchResult>
<ResponseMetadata>
<RequestId>2167c9cb-cf4c-4ebd-82e5-832a7754c0d8</RequestId>
</ResponseMetadata>
</StartSearchResponse>
Use the GetStatus Action to get the status of your search query, and the download URL where you can pickup your results.