Sales Analysis and History Request
Send a GET request with operation=SALES_ANALYSIS_HISTORY to the Real-Time API. You identify the product with its asin, and you choose how much weekly history to include with history_range.
Endpoint
GET https://realtime.easyparser.com/v1/requestRequired parameters
All parameters go in the query string. See Common 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. |
platform | string | Yes | Target platform. Allowed: AMZ (Amazon). |
operation | string | Yes | Operation code in upper case. Allowed: SALES_ANALYSIS_HISTORY. |
domain | string | Yes | Amazon marketplace, written with a leading dot, for example .com. See Supported Marketplaces. |
asin | string | Yes | Amazon product ID: 10 upper-case letters or digits, for example B0CJB6V2L5. |
Optional parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
history_range | string | No | Months of history to return, aggregated by week. 0 returns the current snapshot only, with no weekly history. Default: 0. Allowed: 0, 3, 6, 9, 12. |
Credit cost
The base cost is 5 credits. Each month of history adds 1 credit.
| Condition | Credits |
|---|---|
history_range=0 (default, current snapshot) | 5 |
history_range=3 (last 3 months) | 8 |
history_range=6 (last 6 months) | 11 |
history_range=9 (last 9 months) | 14 |
history_range=12 (last 12 months) | 17 |
See Credit Consumption for the rules of every operation.
Example request
This request returns the current snapshot plus 3 months of weekly history. It costs 8 credits when the product has history, otherwise 5.
curl --get "https://realtime.easyparser.com/v1/request" \ --data-urlencode "api_key=YOUR_API_KEY" \ --data-urlencode "platform=AMZ" \ --data-urlencode "operation=SALES_ANALYSIS_HISTORY" \ --data-urlencode "domain=.com" \ --data-urlencode "asin=B0CJB6V2L5" \ --data-urlencode "history_range=3"import requests
params = { "api_key": "YOUR_API_KEY", "platform": "AMZ", "operation": "SALES_ANALYSIS_HISTORY", "domain": ".com", "asin": "B0CJB6V2L5", "history_range": "3",}
response = requests.get("https://realtime.easyparser.com/v1/request", params=params)print(response.json())const params = new URLSearchParams({ api_key: "YOUR_API_KEY", platform: "AMZ", operation: "SALES_ANALYSIS_HISTORY", domain: ".com", asin: "B0CJB6V2L5", history_range: "3",});
const response = await fetch(`https://realtime.easyparser.com/v1/request?${params}`);const data = await response.json();console.log(data);GET /v1/request?api_key=YOUR_API_KEY&platform=AMZ&operation=SALES_ANALYSIS_HISTORY&domain=.com&asin=B0CJB6V2L5&history_range=3 HTTP/1.1Host: realtime.easyparser.com<?php$params = [ 'api_key' => 'YOUR_API_KEY', 'platform' => 'AMZ', 'operation' => 'SALES_ANALYSIS_HISTORY', 'domain' => '.com', 'asin' => 'B0CJB6V2L5', 'history_range' => '3',];
$url = 'https://realtime.easyparser.com/v1/request?' . http_build_query($params);$response = file_get_contents($url);$data = json_decode($response, true);print_r($data);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", "SALES_ANALYSIS_HISTORY") params.Add("domain", ".com") params.Add("asin", "B0CJB6V2L5") params.Add("history_range", "3")
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))}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"] = "SALES_ANALYSIS_HISTORY", ["domain"] = ".com", ["asin"] = "B0CJB6V2L5", ["history_range"] = "3",};
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);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", "SALES_ANALYSIS_HISTORY"); params.put("domain", ".com"); params.put("asin", "B0CJB6V2L5"); params.put("history_range", "3");
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
- You set
history_rangein months, but thehistoryarray in the response has one entry per week. See Response. - This operation does not support address parameters (
address_id,zip_code,city,district,country_code),languageorcurrency. See Address Management for the operations that do. - To analyze many ASINs at once, send this operation with an
asinslist through the Bulk API.