跳至主要內容

亞馬遜商品詳情 API (V1) ​

GET
API 端點健康狀態
健康 可用 少量可用 基本不可用 暫無資料
正在載入健康狀態…

通過ASIN獲取指定國家市場中亞馬遜商品的詳情。用於查找已知列表以進行目錄審查、商品比較或下游商業分析。

請求參數 ​

參數名 位置 類型 必填 預設值 說明
token query string 是 - 此API服務的鑑權令牌。
asin query string 是 - 10 位字母數字的亞馬遜標準識別號 (ASIN)。
country query string 否 US 亞馬遜產品的國家代碼。


可用值:

- US: 美國

- AU: 澳大利亞

- BR: 巴西

- CA: 加拿大

- CN: 中國

- FR: 法國

- DE: 德國

- IN: 印度

- IT: 意大利

- MX: 墨西哥

- NL: 荷蘭

- SG: 新加坡

- ES: 西班牙

- TR: 土耳其

- AE: 阿拉伯聯合酋長國

- GB: 英國

- JP: 日本

- SA: 沙特阿拉伯

- PL: 波蘭

- SE: 瑞典

- BE: 比利時

- EG: 埃及

- ZA: 南非

- IE: 愛爾蘭

程式碼範例 ​

bash
curl --max-time 120 -X GET 'https://api.justoneapi.com/api/amazon/get-product-detail/v1?token=YOUR_API_KEY&asin=VALUE'
text
我想使用 JustOneAPI 提供的“商品詳情 (V1)”接口。
接入地址: https://api.justoneapi.com。
接口路徑: /api/amazon/get-product-detail/v1?token=YOUR_API_KEY&asin=VALUE
接口地址: BASE_URL + /api/amazon/get-product-detail/v1?token=YOUR_API_KEY&asin=VALUE
HTTP 方法: GET
身份驗證: 在 URL 中傳入 token 查詢參數。
OpenAPI 定義: https://docs.justoneapi.com/openapi/amazon/product-details-v1-zh-hant.json

請求參數說明:
- token (query): 此API服務的鑑權令牌。 (必填)
- asin (query): 10 位字母數字的亞馬遜標準識別號 (ASIN)。 (必填)
- country (query): 亞馬遜產品的國家代碼。

可用值:
- `US`: 美國
- `AU`: 澳大利亞
- `BR`: 巴西
- `CA`: 加拿大
- `CN`: 中國
- `FR`: 法國
- `DE`: 德國
- `IN`: 印度
- `IT`: 意大利
- `MX`: 墨西哥
- `NL`: 荷蘭
- `SG`: 新加坡
- `ES`: 西班牙
- `TR`: 土耳其
- `AE`: 阿拉伯聯合酋長國
- `GB`: 英國
- `JP`: 日本
- `SA`: 沙特阿拉伯
- `PL`: 波蘭
- `SE`: 瑞典
- `BE`: 比利時
- `EG`: 埃及
- `ZA`: 南非
- `IE`: 愛爾蘭

返回格式: 請根據實際 Content-Type 安全處理 JSON 或文本回應。

回應處理與錯誤代碼:
1. 需通過返回體中的 "code" 欄位判斷業務結果(code 為 0 表示成功)。
2. 逾時建議:建議將請求逾時時間設置為 120 秒;如果 120 秒偏長,請至少設置為 60 秒,但可能會有少量請求因逾時而未接收到結果。
3. 業務碼說明:
   - 0: 成功
   - 100: Token 無效或已失效
   - 301: 採集失敗,請重試
   - 302: 超出速率限制
   - 303: 超出每日配額
   - 400: 參數錯誤
   - 500: 內部伺服器錯誤
   - 600: 權限不足
   - 601: 帳戶餘額不足
   - 602: TOKEN 限額超限
4. code 601 表示帳戶共享餘額不足。code 602 表示當前 API TOKEN 自身的累計消費上限已達到。TOKEN 限額不是資金劃撥,多個 TOKEN 仍共享同一個帳戶餘額。

請幫我用我擅長的編程語言寫一個腳本來呼叫這個接口,並處理返回結果。
python
import requests

BASE_URL = "https://api.justoneapi.com"  # 由 OpenAPI servers 提供

url = BASE_URL + "/api/amazon/get-product-detail/v1?token=YOUR_API_KEY&asin=VALUE"
response = requests.get(url, timeout=120)
print(response.status_code)
if response.content:
    content_type = response.headers.get("content-type", "").lower()
    if "json" in content_type:
        try:
            print(response.json())
        except ValueError:
            print(response.text)
    elif content_type.startswith("text/") or "xml" in content_type or content_type.split(";", 1)[0].strip() in {"application/javascript", "application/x-www-form-urlencoded", "application/graphql"}:
        print(response.text)
    else:
        with open("response.bin", "wb") as output:
            output.write(response.content)
        print(f"Saved {len(response.content)} bytes to response.bin")
js
const BASE_URL = "https://api.justoneapi.com"; // 由 OpenAPI servers 提供
const url = BASE_URL + "/api/amazon/get-product-detail/v1?token=YOUR_API_KEY&asin=VALUE";

const response = await fetch(url, {
  method: "GET",
  signal: AbortSignal.timeout(120000)
});
console.log(response.status);
const responseBytes = await response.arrayBuffer();
if (responseBytes.byteLength) {
  const contentType = (response.headers.get("content-type") || "").toLowerCase();
  const mediaType = contentType.split(";", 1)[0].trim();
  const textual = contentType.startsWith("text/") || contentType.includes("json") || contentType.includes("xml") || ["application/javascript", "application/x-www-form-urlencoded", "application/graphql"].includes(mediaType);
  if (textual) {
    const responseText = new TextDecoder().decode(responseBytes);
    let data = responseText;
    if (contentType.includes("json")) {
      try { data = JSON.parse(responseText); } catch { /* Keep the raw body. */ }
    }
    console.log(data);
  } else {
    console.log(`Received ${responseBytes.byteLength} binary bytes`);
  }
}
java
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.time.Duration;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Path;

public class Main {
    public static void main(String[] args) throws Exception {
        final String BASE_URL = "https://api.justoneapi.com"; // 由 OpenAPI servers 提供
        final String url = BASE_URL + "/api/amazon/get-product-detail/v1?token=YOUR_API_KEY&asin=VALUE";

        HttpClient client = HttpClient.newBuilder().connectTimeout(Duration.ofSeconds(120)).build();
        HttpRequest.Builder builder = HttpRequest.newBuilder()
            .uri(URI.create(url))
            .timeout(Duration.ofSeconds(120))
            .method("GET", HttpRequest.BodyPublishers.noBody());

        HttpRequest request = builder.build();

        HttpResponse<byte[]> response = client.send(request, HttpResponse.BodyHandlers.ofByteArray());
        System.out.println(response.statusCode());
        String contentType = response.headers().firstValue("content-type").orElse("").toLowerCase();
        String mediaType = contentType.split(";", 2)[0].trim();
        if (contentType.startsWith("text/") || contentType.contains("json") || contentType.contains("xml") || mediaType.equals("application/javascript") || mediaType.equals("application/x-www-form-urlencoded") || mediaType.equals("application/graphql")) {
            System.out.println(new String(response.body(), StandardCharsets.UTF_8));
        } else {
            Files.write(Path.of("response.bin"), response.body());
            System.out.println("Saved " + response.body().length + " bytes to response.bin");
        }
    }
}
go
package main

import (
	"fmt"
	"io"
	"os"
	"strings"
	"net/http"
	"time"
)

const BASE_URL = "https://api.justoneapi.com" // 由 OpenAPI servers 提供

func main() {
	client := &http.Client{Timeout: 120 * time.Second}
	url := BASE_URL + "/api/amazon/get-product-detail/v1?token=YOUR_API_KEY&asin=VALUE"
	req, _ := http.NewRequest("GET", url, nil)
	resp, _ := client.Do(req)
	defer resp.Body.Close()
	fmt.Println(resp.StatusCode)
	bodyBytes, _ := io.ReadAll(resp.Body)
	contentType := strings.ToLower(resp.Header.Get("Content-Type"))
	mediaType := strings.TrimSpace(strings.SplitN(contentType, ";", 2)[0])
	if strings.HasPrefix(contentType, "text/") || strings.Contains(contentType, "json") || strings.Contains(contentType, "xml") || mediaType == "application/javascript" || mediaType == "application/x-www-form-urlencoded" || mediaType == "application/graphql" {
		fmt.Println(string(bodyBytes))
	} else {
		os.WriteFile("response.bin", bodyBytes, 0600)
		fmt.Printf("Saved %d bytes to response.bin\n", len(bodyBytes))
	}
}
php
<?php
$BASE_URL = 'https://api.justoneapi.com'; // 由 OpenAPI servers 提供
$url = $BASE_URL . '/api/amazon/get-product-detail/v1?token=YOUR_API_KEY&asin=VALUE';

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_TIMEOUT, 120);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
$contentType = strtolower((string) curl_getinfo($ch, CURLINFO_CONTENT_TYPE));
curl_close($ch);
echo $status . PHP_EOL;
$mediaType = trim(explode(';', $contentType, 2)[0]);
if (str_starts_with($contentType, 'text/') || str_contains($contentType, 'json') || str_contains($contentType, 'xml') || in_array($mediaType, ['application/javascript', 'application/x-www-form-urlencoded', 'application/graphql'], true)) {
    echo $response;
} else {
    file_put_contents('response.bin', $response);
    echo 'Saved ' . strlen($response) . ' bytes to response.bin' . PHP_EOL;
}

返回欄位 ​

業務成功時(code = 0)的主要返回欄位。

商品與站點15 個欄位

data

欄位 類型 說明
asin string 返回商品的 ASIN。
landing_asin string 商品落地頁的 ASIN。
parent_asin string 接口返回的商品系列父級 ASIN。
country string 此查詢使用的亞馬遜站點國家代碼。
domain string 亞馬遜站點域名。
marketplace_id string 接口返回的亞馬遜站點標識。
product_title string 商品頁展示的標題。
product_url string 商品頁地址。
product_photo string 商品主圖地址。
product_byline string | null 商品署名欄展示的文字,可顯示品牌或創作者。
product_byline_link string | null 商品署名欄關聯的連結,存在時返回。
product_byline_links array | null 商品署名欄關聯的連結列表,存在時返回。
product_byline_links[] string 商品署名欄中的一個連結。
product_slug string | null 商品頁地址中的標題短名,存在時返回。
is_redirected boolean 此次查詢是否發生商品頁跳轉。
價格與優惠16 個欄位

data

欄位 類型 說明
product_price string 所選站點展示的當前價格文本,可能帶貨幣符號。
product_price_value number 存在時返回的當前價格數值,幣種見 currency。
product_original_price string | null 商品頁顯示的原價或參考價文本。
product_original_price_value number 存在時返回的原價或參考價數值。
currency string 此次站點價格使用的幣種代碼。
product_minimum_offer_price string | null 商品顯示的最低報價文本。
product_minimum_offer_price_value number | null 接口返回的最低報價數值。
product_minimum_offer_condition string | null 接口返回的最低報價所對應的商品成色標籤。
product_num_offers integer 接口返回的商品報價數量。
product_offers_link string | null 商品報價列表的連結。
deal_badge string 商品頁展示的促銷標記文本。
coupon_discount_percentage integer 商品頁顯示的優惠券折扣百分比。
unit_count integer | null 存在時返回的報價所含計價單位數量。
unit_price string | null 存在時返回的單位價格文本。
unit_price_value number | null 存在時返回的單位價格數值。
unit_price_unit string | null 單位價格所對應的計價單位。
購買與配送24 個欄位

data

欄位 類型 說明
is_prime boolean 商品頁是否標明適用 Prime。
product_condition string 商品或當前報價展示的成色文本。
product_availability string 所選站點商品頁展示的供貨狀態文本。
maximum_order_quantity integer | null 存在時返回的商品頁所示最大購買數量。
main_buy_box object 商品頁購買區展示的主要報價。
main_buy_box.title string 購買區展示的報價標籤。
main_buy_box.price string 購買區報價的展示文本。
main_buy_box.unit_price string 該報價展示的單位價格。
main_buy_box.seller string 該報價展示的公開賣家名稱。
main_buy_box.seller_id string 該報價公開賣家的標識。
main_buy_box.seller_link string 該報價所列公開賣家頁連結。
main_buy_box.ships_from string 該報價展示的發貨方。
main_buy_box.return_policy string 該報價展示的退貨政策文本。
main_buy_box.is_fba boolean | null 該報價是否標明由亞馬遜配送。
buy_boxes array 隨商品返回的其他購買區報價。
buy_boxes[] object -
buy_boxes[].title string 購買區展示的報價標籤。
buy_boxes[].price string 購買區報價的展示文本。
buy_boxes[].unit_price string 該報價展示的單位價格。
buy_boxes[].is_fba boolean | null 該報價是否標明由亞馬遜配送。
delivery string 商品頁展示的配送說明。
delivery_price string 頁面展示的配送費用文本。
delivery_time string 商品頁展示的配送日期或時間文本。
primary_delivery_time string 商品頁展示的主要預計送達時間。
規格與變體16 個欄位

data

欄位 類型 說明
product_information object 商品規格名稱與展示值,鍵名隨商品和站點語言變化。
product_information.{key} string 對應鍵名所指商品規格的展示值。
product_details object 商品頁列出的詳情名稱與展示值,鍵名隨商品和站點語言變化。
product_details.{key} string 對應鍵名所指商品詳情的展示值。
product_variations object | array 按變體維度索引的選項。部分商品返回空數組。
product_variations.{key} array 對應鍵名所指變體維度的選項。
product_variations.{key}[] object -
product_variations.{key}[].asin string 此選項關聯的 ASIN。
product_variations.{key}[].value string 此選項的展示值。
product_variations.{key}[].photo string 此選項關聯的圖片地址,存在時返回。
product_variations.{key}[].is_available boolean 此選項的可用狀態標記。
product_variations_dimensions array 接口返回的商品變體維度名稱。
product_variations_dimensions[] string 一個返回的變體維度名稱。
all_product_variations object 按變體 ASIN 索引的各維度展示值。
all_product_variations.{key} object 對應鍵名所指變體 ASIN 的維度值集合。
all_product_variations.{key}.{key} string 內層鍵名所指維度的展示值。
描述、圖片與視頻27 個欄位

data

欄位 類型 說明
product_item_highlight string | null 商品頁面展示的簡短亮點。
product_description string | null 商品頁展示的描述。
about_product array 商品要點列表。
about_product[] string 一條商品要點。
product_photos array 商品頁列出的圖片地址。
product_photos[] string 一張商品圖片的地址。
product_photos_labeled array 帶圖片分類標籤的商品圖片。
product_photos_labeled[] object -
product_photos_labeled[].url string 圖片連結。
product_photos_labeled[].variant string 接口返回的此圖片分類標籤。
has_video boolean 商品是否標明含視頻。
product_videos array 商品頁列出的視頻。
product_videos[] object -
product_videos[].id string 商品視頻標識。
product_videos[].title string 商品視頻標題。
product_videos[].video_url string 商品視頻地址。
product_videos[].thumbnail_url string 商品視頻封面地址。
product_videos[].video_width string 文本形式的返回視頻寬度。
product_videos[].video_height string 文本形式的返回視頻高度。
product_videos[].product_asin string 該視頻關聯的商品 ASIN。
product_videos[].parent_asin string 該視頻關聯的父級 ASIN。
video_thumbnail string 商品頁視頻封面地址。
has_aplus boolean 商品頁是否標明含 A+ 內容。
aplus_text string | null 商品頁 A+ 內容的文本。
aplus_images array 商品 A+ 內容中的圖片地址。
aplus_images[] string 一張商品 A+ 內容圖片的地址。
has_brandstory boolean 商品頁是否標明含品牌故事。
分類與排名17 個欄位

data

欄位 類型 說明
category object 商品關聯的主分類。
category.id string 主分類標識。
category.name string 主分類展示名稱。
category_path array 商品頁展示的分類麪包屑。
category_path[] object -
category_path[].id string 麪包屑中此分類的標識。
category_path[].name string 此分類的展示名稱。
category_path[].link string 此分類的連結。
is_best_seller boolean 商品頁是否顯示亞馬遜暢銷商品標記。
is_amazon_choice boolean 商品頁是否顯示 Amazon’s Choice 標記。
climate_pledge_friendly boolean 商品頁是否顯示 Climate Pledge Friendly 標記。
sales_volume string | null 商品頁展示的銷量文本,可能使用縮寫。
best_sellers_rank array 接口返回的各分類暢銷排名。
best_sellers_rank[] object -
best_sellers_rank[].rank integer 接口返回的此分類暢銷名次。
best_sellers_rank[].category string 此排名關聯的分類名稱。
best_sellers_rank[].link string 此排名關聯的分類連結。
圖書版本與作者14 個欄位

data

欄位 類型 說明
book_author_name string 圖書作者介紹區展示的作者姓名。
book_author_about string 圖書作者介紹區展示的簡介。
book_author_profile_url string 圖書作者介紹區的公開資料連結。
book_authors array 圖書展示的作者連結與標籤。
book_authors[] object -
book_authors[].text string 此圖書作者條目的展示文本。
book_authors[].href string 此圖書作者條目的連結。
book_publication_date string 圖書展示的出版日期文本。
book_formats array 圖書列出的版本形式。
book_formats[] object -
book_formats[].asin string 該版本形式關聯的 ASIN。
book_formats[].format string 該版本形式的展示名稱。
book_formats[].price string 該版本形式顯示的價格文本。
book_formats[].current boolean 該版本形式是否標為當前選中的版本。
評分與評價摘要20 個欄位

data

欄位 類型 說明
product_star_rating string 文本形式的商品總體星級。
product_num_ratings integer 接口返回的商品評分數量。
rating_distribution object 按星級索引的評分佔比,值為百分比。
rating_distribution.{key} integer 對應鍵名所指星級的評分百分比。
customers_say string 商品頁展示的顧客評價摘要。
review_aspects object 按展示標籤索引的評價主題文本。
review_aspects.{key} string 對應鍵名所指評價主題的文本。
review_aspects_details array 帶情感標籤和提及數量的評價主題列表。
review_aspects_details[] object -
review_aspects_details[].aspect string 評價主題展示名稱。
review_aspects_details[].sentiment string 接口返回的此主題情感標籤。
review_aspects_details[].mentions integer 接口返回的此主題提及數量。
review_aspects_details[].positive_mentions integer 接口返回的此主題正向提及數量。
review_aspects_details[].negative_mentions integer 接口返回的此主題負向提及數量。
customer_review_media array | null 存在時返回的顧客評價區媒體列表。
customer_review_media[] object -
customer_review_media[].media_type string 接口返回的此條目媒體類型。
customer_review_media[].review_id string 該媒體關聯的評價標識。
customer_review_media[].thumbnail_url string 媒體縮略圖地址。
customer_review_media[].url string 評價區展示的媒體地址。
精選評價44 個欄位

data

欄位 類型 說明
top_reviews array 在所選站點返回的精選評價。
top_reviews[] object -
top_reviews[].review_id string 公開評價的標識。
top_reviews[].review_title string 評價標題。
top_reviews[].review_comment string 評價正文。
top_reviews[].review_star_rating string 文本形式的評價星級。
top_reviews[].review_link string 公開評價連結。
top_reviews[].review_author string 評價者的公開展示名稱。
top_reviews[].review_images array 公開評價附圖列表。
top_reviews[].review_images[] string 一張評價附圖的地址。
top_reviews[].review_date string 評價日期展示文本。
top_reviews[].review_date_iso string 存在時返回的 ISO 形式評價日期。
top_reviews[].is_verified_purchase boolean 評價是否顯示已驗證購買標記。
top_reviews[].helpful_vote_statement string 存在時返回的「有幫助」投票展示文本。
top_reviews[].helpful_votes integer | null 接口返回的評價「有幫助」投票數量。
top_reviews[].country string 評價關聯的國家欄位。
top_reviews[].review_language string 評價關聯的語言欄位。
top_reviews[].reviewed_product_asin string 評價指向的商品 ASIN。
top_reviews[].reviewed_product_url string 評價指向的商品連結。
top_reviews[].reviewed_product_variant object 評價所示的商品變體名稱和取值。
top_reviews[].reviewed_product_variant.{key} string 對應鍵名所指變體的展示值。
top_reviews[].is_different_asin boolean 該評價對應的商品是否標為不同 ASIN。
top_reviews[].is_vine boolean 該評價是否標為 Amazon Vine 評價。
top_reviews_global array 隨商品返回的全球精選評價。
top_reviews_global[] object -
top_reviews_global[].review_id string 公開評價的標識。
top_reviews_global[].review_title string 評價標題。
top_reviews_global[].review_comment string 評價正文。
top_reviews_global[].review_star_rating string 文本形式的評價星級。
top_reviews_global[].review_link string 公開評價連結。
top_reviews_global[].review_author string 評價者的公開展示名稱。
top_reviews_global[].review_images array 公開評價附圖列表。
top_reviews_global[].review_images[] string 一張評價附圖的地址。
top_reviews_global[].review_date string 評價日期展示文本。
top_reviews_global[].review_date_iso string 存在時返回的 ISO 形式評價日期。
top_reviews_global[].is_verified_purchase boolean 評價是否顯示已驗證購買標記。
top_reviews_global[].country string 評價關聯的國家欄位。
top_reviews_global[].review_language string 評價關聯的語言欄位。
top_reviews_global[].reviewed_product_asin string 評價指向的商品 ASIN。
top_reviews_global[].reviewed_product_url string 評價指向的商品連結。
top_reviews_global[].reviewed_product_variant object 評價所示的商品變體名稱和取值。
top_reviews_global[].reviewed_product_variant.{key} string 對應鍵名所指變體的展示值。
top_reviews_global[].is_different_asin boolean 該評價對應的商品是否標為不同 ASIN。
top_reviews_global[].is_vine boolean 該評價是否標為 Amazon Vine 評價。
關聯與推廣商品31 個欄位

data

欄位 類型 說明
frequently_bought_together array 「經常一起購買」區列出的商品。
frequently_bought_together[] object -
frequently_bought_together[].asin string 一起購買區商品的 ASIN。
frequently_bought_together[].product_title string 一起購買區商品的展示標題。
frequently_bought_together[].product_price string 一起購買區商品的價格文本。
frequently_bought_together[].product_url string 一起購買區商品的連結。
frequently_bought_together[].product_photo string 一起購買區商品的圖片地址。
frequently_bought_together_total_price string | null 一起購買區商品的合計展示價格。
carousel_products array | null 商品頁輪播區返回的商品。
carousel_products[] object -
carousel_products[].asin string 輪播商品的 ASIN。
carousel_products[].product_title string 輪播商品的展示標題。
carousel_products[].product_url string 輪播商品的連結。
carousel_products[].product_photo string 輪播商品的圖片地址。
carousel_products[].product_price string | null 輪播商品的價格文本。
carousel_products[].product_original_price string | null 輪播商品的原價或參考價文本。
carousel_products[].product_star_rating string | null 輪播商品的星級文本。
carousel_products[].product_num_ratings integer | null 接口返回的輪播商品評分數量。
carousel_products[].carousel_title string 該商品所在輪播的展示標題。
carousel_products[].position integer 接口返回的商品輪播位置。
carousel_products[].badges array | null 輪播商品展示的標記標籤。
carousel_products[].badges[] string 輪播商品的一個標記標籤。
sponsored_products array | null 隨商品頁返回的推廣商品。
sponsored_products[] object -
sponsored_products[].asin string 推廣商品的 ASIN。
sponsored_products[].product_title string 推廣商品的展示標題。
sponsored_products[].product_url string 推廣商品的連結。
sponsored_products[].product_photo string 推廣商品的圖片地址。
sponsored_products[].product_price string | null 推廣商品的價格文本。
sponsored_products[].product_star_rating string | null 推廣商品的星級文本。
sponsored_products[].product_num_ratings integer | null 接口返回的推廣商品評分數量。

回應示例 ​

正在載入回應範例…