# Seller Products: Request

> Request parameters, credit cost and a cURL example for the SELLER_PRODUCTS operation of the Easyparser Real-Time API.

Source: https://docs.easyparser.com/real-time-integration/seller-products/request

Send a GET request with `operation=SELLER_PRODUCTS` to the Real-Time API. You identify the seller with exactly one of `seller_id` or the storefront `url`.

## Endpoint

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

## Required parameters

All parameters go in the query string. See [Common Request Fields](/real-time-integration/common-required-request-fields) for details on the shared parameters.

| Parameter | Type | Required | Description |
|---|---|---|---|
| `api_key` | string | Yes | Your API key, sent as a query parameter. Find it at [Account > Plan](https://app.easyparser.com/account/plan). |
| `platform` | string | Yes | Target platform. Allowed: `AMZ` (Amazon). |
| `operation` | string | Yes | Operation code in upper case. Allowed: `SELLER_PRODUCTS`. |
| `domain` | string | Yes | Amazon marketplace, written with a leading dot, for example `.com`. When you send `url` or `address_id`, use the domain of that URL or address. See [Supported Marketplaces](/essentials/supported-marketplaces). |
| `seller_id` | string | Conditional | Amazon seller ID: starts with `A`, 11 to 15 characters, for example `A1MCYUGJD2ILFU`. Required when `url` is not sent. Send `seller_id` or `url`, not both. |
| `url` | string | Conditional | Full URL of the seller's Amazon storefront, URL-encoded, for example `https://www.amazon.com/s?me=A1MCYUGJD2ILFU`. Required when `seller_id` is not sent. Send `seller_id` or `url`, not both. |

Send exactly one of `seller_id` or `url`. Sending both, or neither, returns a validation error. You find the seller ID in the `seller=` or `me=` parameter of an Amazon seller or storefront URL.

## Optional parameters

| Parameter | Type | Required | Description |
|---|---|---|---|
| `min_page` | integer | No | First page to fetch. Default: `1`. Allowed: `1` to `400`. |
| `max_page` | integer | No | Last page to fetch. Must be greater than or equal to `min_page`, and one request covers at most 5 pages. Default: `1`. Allowed: `1` to `400`. |
| `page` | integer | No | One results page to fetch, as an alternative to `min_page` and `max_page`. Costs 1 credit. Send either `page` or `min_page` and `max_page`, not both. Default: `1`. |
| `sort_by` | string | No | Sort order of the storefront listing. Default: `featured-rank`. Allowed: `featured-rank`, `exact-aware-popularity-rank`, `price-asc-rank`, `price-desc-rank`, `date-desc-rank`. |
| `refinements` | string | No | Comma-separated Amazon refinement filters in the form `n:<category_id>,p_<group>:<id>`, for example `n:1055398`. Take the IDs from `result.refinements` in a previous response. |
| `exclude_refinements` | boolean | No | When `true`, Amazon's default refinements are not applied. Default: `false`. |
| `address_id` | integer | No | ID of an Active saved address for the same `domain`, from the [Addresses page](https://app.easyparser.com/addresses). Default: marketplace default address. |
| `zip_code` | string | No | Inline delivery address: zip or postal code. Join two-part codes with a comma, for example `N0E,1Y0`. |
| `city` | string | No | Inline delivery address: city. Required with `zip_code` on `.com.au` and with `district` on `.ae`; send it alone on `.sa` and `.eg`. |
| `district` | string | No | Inline delivery address: area within `city`. Only on `.ae`, together with `city`. |
| `country_code` | string | No | Inline delivery address: ISO 3166 alpha-2 country code, for example `CA`. |
| `language` | string | No | Language of the returned content, as a locale code valid for the `domain`, for example `en_US`. Default: marketplace default. |
| `currency` | string | No | Currency of returned prices, as a lower-case ISO 4217 code valid for the `domain`, for example `usd`. Default: marketplace default. |
| `associate_id` | string | No | Amazon Associates tag added to product links in the response, for example `mytag-20`. |
| `parameters` | string | No | Extra Amazon URL query parameters, URL-encoded as one value, for example `tag%3Dmytag-20%26ref%3Dcustom` for `tag=mytag-20&ref=custom`. Separate pairs with an encoded `&` (`%26`); semicolons do not work. |
| `cookie` | string | No | Cookies forwarded to Amazon in the HTTP `Cookie` header: `key=value` pairs separated by `;`, URL-encoded as one value. |

Valid `language` and `currency` values per marketplace are listed in [Supported Marketplaces](/essentials/supported-marketplaces).

## Credit cost

| Condition | Credits |
|---|---|
| Each page fetched (`max_page - min_page + 1`) | 1 per page |
| Maximum per request (5 pages) | 5 |

Failed requests are not charged. See [Credit Consumption](/essentials/credit-consumption).

## Example request

**cURL**

```bash
curl --get "https://realtime.easyparser.com/v1/request" \
  --data-urlencode "api_key=YOUR_API_KEY" \
  --data-urlencode "platform=AMZ" \
  --data-urlencode "operation=SELLER_PRODUCTS" \
  --data-urlencode "domain=.com" \
  --data-urlencode "seller_id=A1MCYUGJD2ILFU" \
  --data-urlencode "sort_by=featured-rank" \
  --data-urlencode "min_page=1" \
  --data-urlencode "max_page=1"
```

**Python**

```python
import requests

params = {
    "api_key": "YOUR_API_KEY",
    "platform": "AMZ",
    "operation": "SELLER_PRODUCTS",
    "domain": ".com",
    "seller_id": "A1MCYUGJD2ILFU",
    "sort_by": "featured-rank",
    "min_page": "1",
    "max_page": "1",
}

response = requests.get("https://realtime.easyparser.com/v1/request", params=params)
print(response.json())
```

**Node.js**

```javascript
const params = new URLSearchParams({
  api_key: "YOUR_API_KEY",
  platform: "AMZ",
  operation: "SELLER_PRODUCTS",
  domain: ".com",
  seller_id: "A1MCYUGJD2ILFU",
  sort_by: "featured-rank",
  min_page: "1",
  max_page: "1",
});

const response = await fetch(`https://realtime.easyparser.com/v1/request?${params}`);
const data = await response.json();
console.log(data);
```

**HTTP**

```http
GET /v1/request?api_key=YOUR_API_KEY&platform=AMZ&operation=SELLER_PRODUCTS&domain=.com&seller_id=A1MCYUGJD2ILFU&sort_by=featured-rank&min_page=1&max_page=1 HTTP/1.1
Host: realtime.easyparser.com
```

**PHP**

```php
<?php
$params = [
    'api_key' => 'YOUR_API_KEY',
    'platform' => 'AMZ',
    'operation' => 'SELLER_PRODUCTS',
    'domain' => '.com',
    'seller_id' => 'A1MCYUGJD2ILFU',
    'sort_by' => 'featured-rank',
    'min_page' => '1',
    'max_page' => '1',
];

$url = 'https://realtime.easyparser.com/v1/request?' . http_build_query($params);
$response = file_get_contents($url);
$data = json_decode($response, true);
print_r($data);
```

**Go**

```go
package main

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

func main() {
	params := url.Values{}
	params.Add("api_key", "YOUR_API_KEY")
	params.Add("platform", "AMZ")
	params.Add("operation", "SELLER_PRODUCTS")
	params.Add("domain", ".com")
	params.Add("seller_id", "A1MCYUGJD2ILFU")
	params.Add("sort_by", "featured-rank")
	params.Add("min_page", "1")
	params.Add("max_page", "1")

	resp, err := http.Get("https://realtime.easyparser.com/v1/request?" + params.Encode())
	if err != nil {
		panic(err)
	}
	defer resp.Body.Close()

	body, _ := io.ReadAll(resp.Body)
	fmt.Println(string(body))
}
```

**C#**

```csharp
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Http;

var parameters = new Dictionary<string, string>
{
    ["api_key"] = "YOUR_API_KEY",
    ["platform"] = "AMZ",
    ["operation"] = "SELLER_PRODUCTS",
    ["domain"] = ".com",
    ["seller_id"] = "A1MCYUGJD2ILFU",
    ["sort_by"] = "featured-rank",
    ["min_page"] = "1",
    ["max_page"] = "1",
};

var query = string.Join("&", parameters.Select(p =>
    $"{Uri.EscapeDataString(p.Key)}={Uri.EscapeDataString(p.Value)}"));

using var client = new HttpClient();
var response = await client.GetStringAsync($"https://realtime.easyparser.com/v1/request?{query}");
Console.WriteLine(response);
```

**Java**

```java
import java.net.URI;
import java.net.URLEncoder;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.nio.charset.StandardCharsets;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.stream.Collectors;

public class EasyparserRequest {
    public static void main(String[] args) throws Exception {
        Map<String, String> params = new LinkedHashMap<>();
        params.put("api_key", "YOUR_API_KEY");
        params.put("platform", "AMZ");
        params.put("operation", "SELLER_PRODUCTS");
        params.put("domain", ".com");
        params.put("seller_id", "A1MCYUGJD2ILFU");
        params.put("sort_by", "featured-rank");
        params.put("min_page", "1");
        params.put("max_page", "1");

        String query = params.entrySet().stream()
            .map(e -> URLEncoder.encode(e.getKey(), StandardCharsets.UTF_8) + "="
                + URLEncoder.encode(e.getValue(), StandardCharsets.UTF_8))
            .collect(Collectors.joining("&"));

        HttpRequest request = HttpRequest.newBuilder()
            .uri(URI.create("https://realtime.easyparser.com/v1/request?" + query))
            .GET()
            .build();

        HttpResponse<String> response = HttpClient.newHttpClient()
            .send(request, HttpResponse.BodyHandlers.ofString());
        System.out.println(response.body());
    }
}
```

## Notes

- The page window does not have to start at page 1. For example, `min_page=6&max_page=10` fetches pages 6 to 10 and costs 5 credits. If `max_page` is lower than `min_page`, the API returns `MSG1010` ("Maximum page count must be more than minimum page count").
- `exclude_sponsored` is not available for this operation.
- Seller Products supports addresses through `address_id` or the inline fields (`zip_code`, `city`, `district`, `country_code`). Inline fields take precedence over `address_id` and raise the server timeout from 15 to 45 seconds. See [Address Management](/essentials/address-management).
- To fetch products for many sellers in one job, use the [Bulk API](/bulk-integration/bulk-service-request) with the `seller_ids` or `urls` payload key. Bulk uses a single `page` value instead of `min_page` and `max_page`.
