## AmazonSearch


An `amazon_search` job, which scrapes the results of one search.


Usage

``` python
AmazonSearch()
```


[What a live test shows about the Amazon models](https://github.com/ozanozbeker/oxyscraper/blob/main/docs/research/live-amazon.md) records the run that checked it.


## Attributes


`query: str`  
The search term.

`domain: _AmazonDomain | None`  
The marketplace, `com` by default. `co.za` works, although no docs page lists it, and every `cn` job faulted.

`locale: _AmazonLocale | None`  
The page's language, which the API rejects for free unless the domain lists it. Without it, `ae` returns its Arabic page.

`geo_location: str | None`  
A postal code inside the domain's country, or an ISO 3166-1 alpha-2 code outside it, which the API rejects for free if it does not fit. `ae`, `com.be`, `eg`, `ie`, `pl`, `sa`, `se` and `sg` run no check, so a wrong value may bill. `99999` on `com` faults after 120 seconds.

`start_page: PositiveInt | None`  
A page past the last bills.

`pages: PositiveInt | None`  
The API rejects more than 20 for free.

`user_agent_type: _UserAgentType | None`  
It raises with `render`, because a rendered job ignores it and still bills.

`currency: _AmazonCurrency | None`  
The currency of the prices, which the API rejects for free unless the domain lists it. On `com`, any currency but USD raises without a 2-letter country code in `geo_location`, because the API bills prices in USD then.

`sort_by: (`\
`    Literal[`\
`        `<span class="st">`"most_recent",`\
`        ``"price_low_to_high"``,`\
`        ``"price_high_to_low"``,`\
`        ``"featured"``,`\
`        ``"average_review"``,`\
`        ``"bestsellers"``,`\
`    ]`\
`    | None`\
`)`</span>  
The order of the results.

`refinements: list[str] | None`  
Amazon refinement codes, such as `p_123:256097`.

`min_price: PositiveInt | None`  
The lowest price, in cents, so `5000` means 50.00. It raises for 0, because the API then applies no filter and still bills. The API rejects a `min_price` above `max_price` for free.

`max_price: PositiveInt | None`  
The highest price, in cents.

`category_id: str | None`  
A browse node ID that limits the search, sent as a `context` item rather than as the input key of `target_category`.

`merchant_id: str | None`  
A seller ID that limits the search.
