亚马逊国际获得AMAZON商品详情 API 返回值说明

tinagirlapi 2023-07-31 10:50:25

item_get-获得AMAZON商品详情 查看演示

amazon.item_get

公共参数

请求地址: 申请调用KEY地址

名称类型必须描述
keyString调用key(必须以GET方式拼接在URL中)
secretString调用密钥
api_nameStringAPI接口名称(包括在请求地址中)[item_search,item_get,item_search_shop等]
cacheString[yes,no]默认yes,将调用缓存的数据,速度比较快
result_typeString[json,jsonu,xml,serialize,var_export]返回数据格式,默认为json,jsonu输出的内容中文可以直接阅读
langString[cn,en,ru]翻译语言,默认cn简体中文
versionStringAPI版本

请求参数

请求参数:num_iid=B016LO4UTA

参数说明:num_iid:AMAZON商品ID(非.cn的请在后加 -com)

响应参数

Version: Date:

名称类型必须示例值描述

detail_url

String0https://www.amazon.cn/dp/B014QN8RG0?th=1&psc=1商品链接

crumbs

Mix0{"162371071": "徒步鞋、登山鞋", "2029189051": "鞋靴", "2112046051": "男鞋", "2112064051": "运动户外鞋"}导航列表

num_iid

String0B014QN8RG0商品ID

title

String0Topsky 远行客 户外登山鞋 男鞋耐磨越野跑鞋低帮爬山轻便徒步鞋防滑户外鞋子 休闲透气运动鞋 21907A商品标题

desc_short

String0秋冬新款 热销推荐商品简介

brand

String0 品牌名称

brandId

Bigint0 品牌ID

rootCatId

Bigint02029189051顶级分类ID

cid

Bigint0162371071 

star

Int04 

item_imgs

Mix0[{"url": "https://images-cn-4.ssl-images-amazon.com/images/I/51xKSHKPrqL.jpg"}]商品图片

nick

String0Topsky 远行客卖家昵称

num

Int099 

pic_url

String0//images-cn-4.ssl-images-amazon.com/images/I/61svv4xXUVL._SX466_.jpg商品图片

currency_code

String0CNY当前货币代码

price

Float0269.00价格

orginal_price

Float0269.00原价

type

String0  

seller_cids

String0  

input_pids

String0  

input_str

String0  

item_weight

String0  

valid_thru

String0  

delist_time

String0  

stuff_status

String0  

location

String0 发货地

express_fee

Float0 快递费用

ems_fee

Float0 EMS费用

post_fee

Float0 物流费用

shipping_to

String0 发货至

has_discount

String0  

freight_payer

String0  

has_invoice

String0  

has_warranty

String0  

has_showcase

String0  

increment

String0  

approve_status

String0  

postage_id

String0  

product_id

String0  

auction_point

String0  

item_img

String0  

prop_imgs

Mix0{"prop_img": []}商品属性图片列表

props_img

Mix0{} 

video

Mix0[]商品视频

outer_id

String0  

is_virtual

String0  

sample_id

String0 商品风格标识ID

is_promotion

String0  

props_name

String00:1:尺寸:40;0:0:尺寸:39;1:4:颜色:;1:2:颜色:;1:0:颜色:军绿色;1:3:颜色:;1:1:颜色:深褐色;1:5:颜色:商品属性名

property_alias

String00:1:40;1:4:;0:1:40;1:2:;0:0:39;1:0:军绿色;0:1:40;1:3:;0:1:40;1:1:深褐色;0:1:40;1:0:军绿色;0:0:39;1:5:;0:0:39;1:4:;0:0:39;1:3:;0:1:40;1:5:商品属性别名

seller_id

Bigint0 卖家ID

shop_id

Bigint0 店铺ID

props_list

Mix0{"0:1": "尺寸:40", 1:0": "颜色:军绿色}商品属性列表

seller_info

Mix0{"nick": "Topsky 远行客", "city": "", "bail": "", "level": "", "rate": "", "score": "", "delivery_score": "", "item_score": "", "shop_type": "", "user_num_id": "1", "sid": "1", "title": "Topsky 远行客", "zhuy": "https://www.amazon.cn/", "company_name": "", "menu": []}卖家信息

tmall

Boolean0 是否天猫

error

String0 错误信息

warning

String0 警告信息

url_log

String0  

shopinfo

Mix0{"shop_name": ""}店铺信息

promo_type

String0  

shop_item

Mix0[] 

relate_items

Mix0[] 

sku

Mix0{"sku": [{"price": "269.00", "orginal_price": "269.00", "properties": "0:1;1:4", "properties_name": "0:1:尺寸:40;1:4:颜色:", "quantity": 0, "sku_id": "B014QN8VFM", "sku_url": "https://www.amazon.cn/dp/B014QN8VFM?th=1&psc=1"}]}商品规格信息列表

desc

String0  

pinglun

Mix0[]
- 请求示例 url 默认请求参数已经URL编码处理
curl -i "https://api-gw.…….cn/amazon/item_get/?key=<您自己的apiKey>&secret=<您自己的apiSecret>&num_iid=B016LO4UTA"
<?php

// 请求示例 url 默认请求参数已经URL编码处理
// 本示例代码未加密secret参数明文传输,若要加密请参考:https://open.…….cn/help/demo/sdk/demo-sign.php
$method = "GET";
$url = "https://api-gw.…….cn/amazon/item_get/?key=<您自己的apiKey>&secret=<您自己的apiSecret>&num_iid=B016LO4UTA";
$curl = curl_init();
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, $method);
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST,FALSE);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER,FALSE);
curl_setopt($curl, CURLOPT_FAILONERROR, false);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_HEADER, true);
curl_setopt($curl, CURLOPT_ENCODING, "gzip");
var_dump(curl_exec($curl));
?>

 

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.Reader;
import java.net.URL;
import java.nio.charset.Charset;
import org.json.JSONException;
import org.json.JSONObject;
import java.io.PrintWriter;
import java.net.URLConnection;

public class Example {
	private static String readAll(Reader rd) throws IOException {
		StringBuilder sb = new StringBuilder();
		int cp;
		while ((cp = rd.read()) != -1) {
			sb.append((char) cp);
		}
		return  sb.toString();
	}
	public static JSONObject postRequestFromUrl(String url, String body) throws IOException, JSONException {
		URL realUrl = new URL(url);
		URLConnection conn = realUrl.openConnection();
		conn.setDoOutput(true);
		conn.setDoInput(true);
		PrintWriter out = new PrintWriter(conn.getOutputStream());
		out.print(body);
		out.flush();
		InputStream instream = conn.getInputStream();
		try {
			BufferedReader rd = new BufferedReader(new InputStreamReader(instream, Charset.forName("UTF-8")));
			String jsonText = readAll(rd);
			JSONObject json = new JSONObject(jsonText);
			return json;
		} finally {
			instream.close();
		}
	}
	public static JSONObject getRequestFromUrl(String url) throws IOException, JSONException {
		URL realUrl = new URL(url);
		URLConnection conn = realUrl.openConnection();
		InputStream instream = conn.getInputStream();
		try {
			BufferedReader rd = new BufferedReader(new InputStreamReader(instream, Charset.forName("UTF-8")));
			String jsonText = readAll(rd);
			JSONObject json = new JSONObject(jsonText);
			return json;
		} finally {
			instream.close();
		}
	}
	public static void main(String[] args) throws IOException, JSONException {
		// 请求示例 url 默认请求参数已经URL编码处理
		String url = "https://api-gw.…….cn/amazon/item_get/?key=<您自己的apiKey>&secret=<您自己的apiSecret>&num_iid=B016LO4UTA";
		JSONObject json = getRequestFromUrl(url);
		System.out.println(json.toString());
	}

}

 

...全文
79 回复 打赏 收藏 转发到动态 举报
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复

236,171

社区成员

发帖
与我相关
我的任务
社区描述
一个人可以走的很快,一群人才能走的更远!
数据库 企业社区
社区管理员
  • Lucifer三思而后行
  • 韬光养晦208
  • 芒果再努力
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

❤️ 添加版主微信:Lucifer-4622 

🎉【数据库交流社区】联合 【摸鱼社区】本周重磅推出【兄弟社区每日打卡】活动 

🎁 新玩法,奖励升级!

数据库交流社区:https://bbs.csdn.net/forums/lucifer-database

摸鱼社区:https://bbs.csdn.net/forums/moyu

新增抽奖池:6本技术书籍 📚 + 每周社区排名奖品 🏅 ,绝对丰厚!

奖品预览可以参考:CSDN社区赞助奖品一览

⭐️ 活动要求:

1、每日 同时在两个社区 打卡贴进行发帖打卡,提交任务

2、同时在两个社区 坚持 7 天打卡 ,将参与到抽奖名单中,这很重要!

3、参加抽奖请先 添加打卡抽奖群,否则无效,加群请添加微信:Lucifer-4622

【社区积分规则】

  • 在社区「发帖」得10积分
  • 内容被管理员「加精」得10积分
  • 点赞他人内容得1积分
  • 评论内容得2积分

社区玩法👇👇👇

试试用AI创作助手写篇文章吧