# Amazon Query Command (/query)

This command allows you to query an Amazon product, using its [Amazon Standard Identification Number (ASIN)](https://gepard.io/ecommerce-strategy/what-is-asin-in-amazon#:~:text=ASIN%20\(Amazon%20Standard%20Identification%20Number,up%20of%20numbers%20and%20letters.). The command provides you with an array of data in regard to the product, its sales, ratings, and more.

## Usage

### Locating the ASIN of an Amazon product

Firstly, find a product you want to query on Amazon.

<figure><img src="/files/qyPOeMVYN8p3ESv7hIb9" alt="Example Amazon product"><figcaption><p>Example Amazon product</p></figcaption></figure>

You will notice in the URL of the page, there is a special identifier, this is the ASIN. They usually have the same format.

<figure><img src="/files/QCwoFXh4kMwkBl2skH7u" alt=""><figcaption><p>Amazon URL containing ASIN</p></figcaption></figure>

In this example, the ASIN is **B07NL27TCK**.

### Running the /query command

Now on the Discord server running the Mercury Dynamics bot, begin typing the command like so:

<figure><img src="/files/GBnmFkuoV6EEMK0ZahTK" alt=""><figcaption><p>Query command populated for the example</p></figcaption></figure>

#### **You may also query an Amazon product using its barcode**

It is also important to note that you can use the query command to locate products based on their barcode. Below is an example of this:

<figure><img src="/files/U4eDfeyZoboygWdsyI2L" alt=""><figcaption><p>Example product query using a barcode</p></figcaption></figure>

There are three parameters for this command:

* Extension - This is the corresponding Amazon country that will be queried for the product (remember ASINs in different regions won't always be the same)
* Identifier - This is the product ASIN or Barcode
* Public - This defines whether your results will be posted for everyone to see, or just for yourself

If ran correctly, you should receive a result like below.

<div align="left"><figure><img src="/files/DgSq037S7AIaiSWwCkfe" alt=""><figcaption><p>Example /query results</p></figcaption></figure></div>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.mercury-dynamics.co.uk/bot-commands/amazon-query-command-query.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
