通过京东商品ID获取京东商品评论数据,京东商品评论API接口,接口说明接入方案

一、京东商品详情评论接口数据接口参数说明:
1.通过京东商品ID获取京东商品评论数据,可以获取到获得JD商品评论,评论内容,评论日期,评论图片
,买家昵称,评论商品属性,追评内容等页面上面的数据均可以拿到。
点击获取测试key和secret
2.请求参数:
请求参数:num_iid=71619129750&page=1

参数说明:item_id:商品ID
page:页数
3.响应参数
名称 类型 是否隐私 示例值 描述
items items[] 获得JD商品评论
rate_content String 这个帆布鞋的款式挺不错的,穿着也很百搭,做工很精细。! 评论内容
rate_date Date 2020-07-16 17:04:45 评论日期
pics MIX [“//img30.360buyimg.com/n0/s128x96_jfs/t1/143538/26/2997/98915/5f10182dE075cf6f4/3893a6ebd54bf20b.jpg”] 评论图片
display_user_nick String j***X 买家昵称
auction_sku String 颜色:白色(加绒);尺码:2XL 评论商品属性
add_feedback String 衣服面料很好 穿起来很舒服 衣服挺合适的! 追评内容
二、请求示例:(CURL、PHP 、PHPsdk 、Java 、C# 、Python)

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://注册获取请求链接jd/item_review/?key=<您自己的apiKey>&secret=<您自己的apiSecret>&num_iid=71619129750&page=1";
		JSONObject json = getRequestFromUrl(url);
		System.out.println(json.toString());
	}

}

响应参数:

{
	"items": {
		"totalpage": "100",
		"total_results": "0",
		"page_size": 10,
		"page": "1",
		"item": [
			{
				"rate_content": "鞋子的版型很好看,价格也很便宜,穿上舒适透气,非常的喜欢,值得购买",
				"rate_date": "2020-07-16 17:04:45",
				"pics": [
					"//img30.360buyimg.com/n0/s128x96_jfs/t1/143538/26/2997/98915/5f10182dE075cf6f4/3893a6ebd54bf20b.jpg",
					"//img30.360buyimg.com/n0/s128x96_jfs/t1/126308/37/7305/88222/5f10182dE2ed282fb/cfebb2e627fe3be4.jpg",
					"//img30.360buyimg.com/n0/s128x96_jfs/t1/123576/17/7322/100064/5f10182dE90877815/bb5f985a08987bc6.jpg",
					"//img30.360buyimg.com/n0/s128x96_jfs/t1/133271/17/4481/244268/5f10182dEd8ecc049/555eaa30d3599158.jpg",
					"//img30.360buyimg.com/n0/s128x96_jfs/t1/146490/36/3038/90958/5f10182dE065f71fd/12bb1e78f59309d7.jpg"
				],
				"display_user_nick": "j***X",
				"auction_sku": "MX-D01黑色(女)",
				"add_feedback": ""
			},
			{
				"rate_content": "鞋子很青春休闲,版型很好看,又百搭面料,摸着很舒服,穿着非常的舒适,很满意。",
				"rate_date": "2020-07-16 14:58:08",
				"pics": [
					"//img30.360buyimg.com/n0/s128x96_jfs/t1/126114/25/7235/113602/5f0ffa80E13a4cbd1/4bb8f80169565723.jpg",
					"//img30.360buyimg.com/n0/s128x96_jfs/t1/116245/40/12535/94358/5f0ffa80Eb718edcc/a2fa0be8e208f728.jpg",
					"//img30.360buyimg.com/n0/s128x96_jfs/t1/131138/21/4585/162381/5f0ffa80E85973f3d/95647e8bbcc82ad3.jpg",
					"//img30.360buyimg.com/n0/s128x96_jfs/t1/120553/13/7355/126975/5f0ffa80Ee8c6b756/959b3ea6f73ecb86.jpg"
				],
				"display_user_nick": "j***G",
				"auction_sku": "MX-D01黑色(女)",
				"add_feedback": ""
			},
			{
				"rate_content": "鞋子已收到,穿上不闷很透气,鞋子的图案版型都很喜欢,买的是黑色的,非常耐脏嘛,尺码很标准。",
				"rate_date": "2020-07-17 18:03:27",
				"pics": [
					"//img30.360buyimg.com/n0/s128x96_jfs/t1/125182/11/7291/418447/5f11776fE80c296f6/ce4f18132f1339d5.jpg",
					"//img30.360buyimg.com/n0/s128x96_jfs/t1/124968/39/7243/404641/5f11776fE33777d13/ed56246d66b430e1.jpg",
					"//img30.360buyimg.com/n0/s128x96_jfs/t1/129908/23/4700/412863/5f11776fEe04d86f6/a2b308efe09cf8e4.jpg",
					"//img30.360buyimg.com/n0/s128x96_jfs/t1/128096/4/7282/405527/5f11776fE9788ca8f/cafeb1a293a9813e.jpg",
					"//img30.360buyimg.com/n0/s128x96_jfs/t1/115520/15/12445/454682/5f11776fE134e0e3f/9450910b70809f2b.jpg"
				],
				"display_user_nick": "j***s",
				"auction_sku": "MX-D01黑色(女)",
				"add_feedback": ""
			},
			{
				"rate_content": "帆布鞋质量不错,穿上正合适很舒适,尺码标准,脚感很好,非常喜欢。",
				"rate_date": "2020-07-21 18:52:02",
				"pics": [
					"//img30.360buyimg.com/n0/s128x96_jfs/t1/130056/36/5089/278917/5f16c8d2E196f34fd/5ad753039b65125e.jpg",
					"//img30.360buyimg.com/n0/s128x96_jfs/t1/141143/2/3492/277303/5f16c8d2E7e0c067d/f0614a2ff7580edd.jpg",
					"//img30.360buyimg.com/n0/s128x96_jfs/t1/133845/33/4975/258500/5f16c8d2E39f1a05a/324fe698896c798b.jpg",
					"//img30.360buyimg.com/n0/s128x96_jfs/t1/130437/17/5133/258634/5f16c8d2Ee4c72f6f/12f407a4aedc1c30.jpg"
				],
				"display_user_nick": "j***T",
				"auction_sku": "MX-D01黑色(女)",
				"add_feedback": ""
			},
			{
				"rate_content": "鞋子收到了,鞋子材质很好,款式简约新颖非常喜欢,版型也好看很百搭,总体非常满意。",
				"rate_date": "2020-07-20 18:07:58",
				"pics": [
					"//img30.360buyimg.com/n0/s128x96_jfs/t1/142827/18/3375/464946/5f156cfeEd3009ae9/dc98d03cb6262314.jpg",
					"//img30.360buyimg.com/n0/s128x96_jfs/t1/147097/19/3295/466559/5f156cfeE08f4dba7/ed784fb4e453c513.jpg",
					"//img30.360buyimg.com/n0/s128x96_jfs/t1/126388/38/7636/482686/5f156cfeEee2e1160/ffd1663c5236515a.jpg"
				],
				"display_user_nick": "j***Y",
				"auction_sku": "MX-D01黑色(女)",
				"add_feedback": ""
			},
			{
				"rate_content": "鞋子收到了,特别舒服的一款帆布鞋,大小合适喜欢",
				"rate_date": "2020-07-20 18:14:39",
				"pics": [
					"//img30.360buyimg.com/n0/s128x96_jfs/t1/118301/23/12855/72815/5f156e8fEa83416e3/f92e7f5b823c8a70.jpg",
					"//img30.360buyimg.com/n0/s128x96_jfs/t1/135616/29/4848/72074/5f156e8fEc82a7d80/6484851d44574830.jpg",
					"//img30.360buyimg.com/n0/s128x96_jfs/t1/148932/1/3387/69784/5f156e8fE7ba78e9d/7b61ee6327626d78.jpg",
					"//img30.360buyimg.com/n0/s128x96_jfs/t1/150109/36/3353/66120/5f156e8eE82e25eaf/9055b98faf6a044d.jpg",
					"//img30.360buyimg.com/n0/s128x96_jfs/t1/118412/31/12839/72815/5f156e8fE721e7bfd/327582fa5d9a25b3.jpg"
				],
				"display_user_nick": "j***y",
				"auction_sku": "MX-D01黑色(女)",
				"add_feedback": ""
			},
			{
				"rate_content": "东西非常不错 颜值很高很满意  搭配上牛仔裤在夏天穿 上身白体桖  一股浓郁的学院风扑面而来  年轻了十几岁",
				"rate_date": "2020-07-25 22:09:33",
				"pics": [
					"//img30.360buyimg.com/n0/s128x96_jfs/t1/126821/34/7944/185434/5f1c3d1dE11aea5ec/689c14ef4399a439.jpg"
				],
				"display_user_nick": "三***容",
				"auction_sku": "YC-X-188米色(女)",
				"add_feedback": ""
			},
			{
				"rate_content": "这个帆布鞋的款式挺不错的,穿着也很百搭,做工很精细。",
				"rate_date": "2020-07-20 00:01:00",
				"pics": [
					"//img30.360buyimg.com/n0/s128x96_jfs/t1/119504/13/11389/520508/5f1581faEf69c5854/2377fb2e01fc79e2.jpg",
					"//img30.360buyimg.com/n0/s128x96_jfs/t1/135899/37/4958/566205/5f1581faEc5f67e4c/1bd719364ac26276.jpg",
					"//img30.360buyimg.com/n0/s128x96_jfs/t1/110797/21/15353/558212/5f1581fbE98486508/98667557f6b47c31.jpg"
				],
				"display_user_nick": "j***y",
				"auction_sku": "MX-D01黑色(女)",
				"add_feedback": "很有个性的一款鞋子,穿的舒适,样子新颖,质量也很好。"
			},
			{
				"rate_content": "这个鞋子我非常的喜欢,而且穿着特别的舒服,搭配起衣服来也特别的百搭。非常值得购买的一款鞋子。",
				"rate_date": "2020-09-16 09:18:43",
				"pics": [
					"//img30.360buyimg.com/n0/s128x96_jfs/t1/120503/26/12622/88927/5f6167efE6c9ef8ae/6fdeb847965a9acf.jpg"
				],
				"display_user_nick": "j***s",
				"auction_sku": "YC-X-188黑色(女)",
				"add_feedback": ""
			},
			{
				"rate_content": "鞋子穿着很舒服,用来搭配长裙或者是棉麻裤,都很好看,而且很合脚,走起路来一点都不会累。",
				"rate_date": "2020-07-17 17:48:04",
				"pics": [],
				"display_user_nick": "j***l",
				"auction_sku": "MX-D01黑色(女)",
				"add_feedback": ""
			}
		]
	},
	"secache": "8e3404bdf02f989d0e3164490e3945a2",
	"secache_time": 1615366119,
	"secache_date": "2021-03-10 16:48:39",
	"translate_status": "",
	"translate_time": 0,
	"language": {
		"default_lang": "cn",
		"current_lang": "cn"
	},
	"error": "",
	"reason": "",
	"error_code": "0000",
	"cache": 0,
	"api_info": "today:21 max:10000",
	"execution_time": 0.854,
	"server_time": "Beijing/2021-03-10 16:48:39",
	"client_ip": "106.6.35.144",
	"call_args": {
		"num_iid": "71619129750",
		"data": "1",
		"page": 1
	},
	"api_type": "jd",
	"translate_language": "zh-CN",
	"translate_engine": "google_cn",
	"server_memory": "3.15MB",
	"request_id": "gw-3.604887e6dc512"
}

API 工具
API SDK调用示例
APISDK下载
API测试工具

如何开通API测试,点击立即开通

你可能感兴趣的:(京东API接口开发系列,京东商品评论接口,评论接口,评论API接口,京东评论接口)