# Request

To retrieve a product's sales rank and categorical performance metrics, send a GET request to the Real-Time API with the `BEST_SELLERS_RANK` operation. This request captures the live ranking snapshot of a specific ASIN across the specified Amazon marketplace.

### Endpoint

```
GET https://realtime.easyparser.com/v1/request
```

### Required Parameters

The following parameters must be included in your request to ensure successful processing and authentication. For a broader understanding of global fields, please refer to the [Common Required Request Fields](https://easyparser.gitbook.io/easyparser-documentation/~/revisions/eJUCJEBORCvFNncem13Z/real-time-integration/common-required-request-fields) section.

| Parameter   | Type   | Required | Description                                                       | Example             |
| ----------- | ------ | -------- | ----------------------------------------------------------------- | ------------------- |
| `api_key`   | String | Yes      | Your unique Easyparser API key used for identity verification.    | YOUR\_API\_KEY      |
| `platform`  | String | Yes      | The target e-commerce platform (Always `AMZ` for Amazon).         | AMZ                 |
| `operation` | String | Yes      | The specific operation to execute.                                | BEST\_SELLERS\_RANK |
| `domain`    | String | Yes      | The Amazon marketplace domain extension.                          | .com                |
| `asin`      | String | Yes      | The unique 10-11 character Amazon Standard Identification Number. | B01DZQT0FG          |

### Optional Parameters

There are no operation-specific optional parameters available for the `BEST_SELLERS_RANK` operation.

### Example Request

{% tabs fullWidth="false" %}
{% tab title="cURL" %}
{% code overflow="wrap" %}

```javascript
curl --location 'https://realtime.easyparser.com/v1/request?
  api_key=YOUR_API_KEY&
  platform=AMZ&
  operation=BEST_SELLERS_RANK&
  domain=.com&
  asin=B01DZQT0FG'
```

{% endcode %}
{% endtab %}

{% tab title="Python" %}
{% code overflow="wrap" %}

```python

import requests
import json

# set up the request parameters
params = {
  "api_key": "YOUR_API_KEY",
  "platform": "AMZ",
  "operation": "BEST_SELLERS_RANK",
  "domain": ".com",
  "asin": "B01DZQT0FG",
}

# make the http GET request to Easyparser API
api_result = requests.get("https://realtime.easyparser.com/v1/request", params=params)

# print the JSON response from Easyparser API
print(json.dumps(api_result.json(), indent=2))
```

{% endcode %}
{% endtab %}

{% tab title="Node.js" %}
{% code overflow="wrap" %}

```javascript

const axios = require("axios");

// set up the request parameters
const params = {
  api_key: "YOUR_API_KEY",
  platform: "AMZ",
  operation: "BEST_SELLERS_RANK",
  domain: ".com",
  asin: "B01DZQT0FG",
}

// make the http GET request to Easyparser API
axios.get("https://realtime.easyparser.com/v1/request", { params })
.then(response => {
  // print the JSON response from Easyparser API
  console.log(JSON.stringify(response.data, null, 2));
})
```

{% endcode %}
{% endtab %}

{% tab title="HTTP" %}
{% code overflow="wrap" %}

```http

GET /v1/request?
  api_key=YOUR_API_KEY&
  platform=AMZ&
  operation=BEST_SELLERS_RANK&
  domain=.com&
  asin=B01DZQT0FG HTTP/1.1
Host: realtime.easyparser.com
```

{% endcode %}
{% endtab %}

{% tab title="PHP" %}
{% code overflow="wrap" %}

```php

<?php

# set up the request parameters
$params = [
  "api_key" => "YOUR_API_KEY",
  "platform" => "AMZ",
  "operation" => "BEST_SELLERS_RANK",
  "domain" => ".com",
  "asin" => "B01DZQT0FG",
];

# make the http GET request to Easyparser API
$response = file_get_contents("https://realtime.easyparser.com/v1/request?" . http_build_query($params));

# print the JSON response from Easyparser API
echo $response;
```

{% endcode %}
{% endtab %}

{% tab title="GO" %}
{% code overflow="wrap" %}

```go

package main

import (
  "fmt"
  "net/http"
  "io"
)

func main() {
  // set up the request parameters
  url := "https://realtime.easyparser.com/v1/request?params := url.Values{}
params.Add("api_key", "YOUR_API_KEY")
params.Add("platform", "AMZ")
params.Add("operation", "BEST_SELLERS_RANK")
params.Add("domain", ".com")
params.Add("asin", "B01DZQT0FG")
fullURL := fmt.Sprintf("%s?%s", baseURL, params.Encode())
"
  
  // make the http GET request to Easyparser API
  res, _ := http.Get(url)
  defer res.Body.Close()
  
  // print the JSON response from Easyparser API
  body, _ := io.ReadAll(res.Body)
  fmt.Println(string(body))
}
```

{% endcode %}
{% endtab %}

{% tab title="C#" %}
{% code overflow="wrap" %}

```csharp

using System.Net.Http;

// set up the request parameters
var client = new HttpClient();

// make the http GET request to Easyparser API
var response = await client.GetAsync("https://realtime.easyparser.com/v1/request?var query = HttpUtility.ParseQueryString(string.Empty);
query["api_key"] = "YOUR_API_KEY";
query["platform"] = "AMZ";
query["operation"] = "BEST_SELLERS_RANK";
query["domain"] = ".com";
query["asin"] = "B01DZQT0FG";
var fullUrl = baseUrl + "?" + query.ToString();
");

// print the JSON response from Easyparser API
var result = await response.Content.ReadAsStringAsync();
Console.WriteLine(result);
```

{% endcode %}
{% endtab %}

{% tab title="Java" %}
{% code overflow="wrap" %}

```java

import okhttp3.*;

// set up the request parameters
OkHttpClient client = new OkHttpClient();

// make the http GET request to Easyparser API
Request request = new Request.Builder()
  .url("https://realtime.easyparser.com/v1/request?URIBuilder builder = new URIBuilder(baseUrl);
builder.addParameter("api_key", "YOUR_API_KEY");
builder.addParameter("platform", "AMZ");
builder.addParameter("operation", "BEST_SELLERS_RANK");
builder.addParameter("domain", ".com");
builder.addParameter("asin", "B01DZQT0FG");
String fullUrl = builder.build().toString();
")
  .build();

// print the JSON response from Easyparser API
Response response = client.newCall(request).execute();
System.out.println(response.body().string());
```

{% endcode %}
{% endtab %}
{% endtabs %}
