# Offer: Request

> Parameters, credit cost and a cURL example for the Easyparser Offer (OFFER) Real-Time API request.

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

Send a GET request with `operation=OFFER` to the Real-Time API. Identify the product with its `asin`; the Offer operation does not accept product URLs.

## 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 ones.

| 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: `OFFER`. |
| `domain` | string | Yes | Amazon marketplace, written with a leading dot, for example `.com`. When you send `address_id`, use the domain of that address. See [Supported Marketplaces](/essentials/supported-marketplaces). |
| `asin` | string | Yes | Amazon product ID: 10 upper-case letters or digits, for example `B0CJB6V2L5`. Product URLs are not accepted. |

## 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`. |
| `prime` | boolean | No | If `true`, returns only Prime-eligible offers. Default: `false`. |
| `free_shipping` | boolean | No | If `true`, returns only offers with free shipping. Default: `false`. |
| `condition_new` | boolean | No | If `true`, includes offers in New condition. Default: `false`. |
| `condition_used_like_new` | boolean | No | If `true`, includes offers in Used - Like New condition. Default: `false`. |
| `condition_used_very_good` | boolean | No | If `true`, includes offers in Used - Very Good condition. Default: `false`. |
| `condition_used_good` | boolean | No | If `true`, includes offers in Used - Good condition. Default: `false`. |
| `condition_used_acceptable` | boolean | No | If `true`, includes offers in Used - Acceptable condition. Default: `false`. |
| `condition_renewed` | boolean | No | If `true`, includes offers in Renewed condition. Default: `false`. |
| `min_quantity` | integer | No | Returns only offers with at least this quantity available. `0` applies no filter. Default: `0`. |
| `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. |
| `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`. |
| `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. |

You can combine several filter flags (`prime`, `free_shipping` and the `condition_*` flags) and `min_quantity` in one request. Send a flag only when you enable it (`=true`); leave out parameters you do not use.

Language and currency values per marketplace are listed in [Supported Marketplaces](/essentials/supported-marketplaces). For the address options, see [Address Management](/essentials/address-management).

## Credit cost

| Condition | Credits |
|---|---|
| Default request (`min_page=1`, `max_page=1`) | 1 |
| Page window from `min_page` to `max_page` | 1 per page (`max_page - min_page + 1`), max 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=OFFER" \
  --data-urlencode "domain=.com" \
  --data-urlencode "asin=B0CJB6V2L5" \
  --data-urlencode "condition_new=true" \
  --data-urlencode "min_page=1" \
  --data-urlencode "max_page=1"
```

**Python**

```python
import requests

params = {
    "api_key": "YOUR_API_KEY",
    "platform": "AMZ",
    "operation": "OFFER",
    "domain": ".com",
    "asin": "B0CJB6V2L5",
    "condition_new": "true",
    "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: "OFFER",
  domain: ".com",
  asin: "B0CJB6V2L5",
  condition_new: "true",
  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=OFFER&domain=.com&asin=B0CJB6V2L5&condition_new=true&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' => 'OFFER',
    'domain' => '.com',
    'asin' => 'B0CJB6V2L5',
    'condition_new' => 'true',
    '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", "OFFER")
	params.Add("domain", ".com")
	params.Add("asin", "B0CJB6V2L5")
	params.Add("condition_new", "true")
	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"] = "OFFER",
    ["domain"] = ".com",
    ["asin"] = "B0CJB6V2L5",
    ["condition_new"] = "true",
    ["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", "OFFER");
        params.put("domain", ".com");
        params.put("asin", "B0CJB6V2L5");
        params.put("condition_new", "true");
        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

> **INFO:** One request covers at most 5 pages. To read further, request a later window, for example `min_page=6&max_page=10`. Each page holds roughly 10 offers.

- `max_page` lower than `min_page` returns `MSG1010` ("Maximum page count must be more than minimum page count").
- A `language` that the domain does not offer returns `MSG1015` ("Invalid language for domain").
- Inline address fields (`zip_code`, `city`, `district`, `country_code`) override `address_id` without an error, and they raise the request timeout from 15 to 45 seconds.
- In the Bulk API, the Offer operation takes an `asins` array in `payload` instead of `asin`, and it does not use `min_page` and `max_page`. See [Bulk Service Request](/bulk-integration/bulk-service-request).
