ISBN数据查询_专业版API通过输入13位ISBN编码,帮助用户快速获取图书的详细信息,包括书名、出版社、作者、页码和封面等,为图书管理提供了强大的支持。
参数说明
1. 请求参数说明
表格
参数名 | 必填 | 类型 | 说明 |
---|---|---|---|
key | 是 | string | 个人中心查看的API密钥 |
isbn | 是 | string | 13位ISBN编码 |
2. 返回参数说明
参数名 | 类型 | 说明 |
---|---|---|
isbn | string | ISBN编码 |
title | string | 书名 |
author | string | 作者 |
publisher | string | 出版社 |
publish_date | string | 出版日期 |
pages | int | 页码 |
cover | string | 封面图片URL |
summary | string | 图书简介 |
3.JSON返回示例:
{
"code": 1,
"msg": "操作成功",
-"data": {
"title": "百年孤独",
"img": "http://static.tanshuapi.com/isbn/202216/16507858262f014d.jpg",
"author": " (哥伦) 加西亚·马尔克斯, 著",
"isbn": "9787544291170",
"isbn10": "7544291170",
"publisher": "南海出版公司",
"pubdate": "2017-8",
"pubplace": "海口",
"keyword": "长篇小说-哥伦比亚-现代",
"pages": "360",
"price": "49.60",
"binding": "精装",
"edition": "2版",
"impression": "55",
"language": "简体中文",
"format": "21×15",
"class": "I775.45",
"summary": "哥伦比亚当代长篇小说。《百年孤独》是拉丁美洲魔幻现实主义文学流派的代表作,刻画了布恩迪亚家族七代人的传奇经历,描绘了加勒比海沿岸小镇马孔多的百年兴衰,成为20世纪最重要的经典文学巨著之一。作者以小说作品创建了一个自己的世界,一个浓缩的宇宙,映射了一片大陆及其人民的富足与贫困。",
"ciptxt": ""
}
}
4.Java示例:
接口地址:https://www.tanshuapi.com/market/detail-78
import java.net.HttpURLConnection;
import java.net.URL;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import org.json.JSONObject;
public class ISBNQueryAPIExample {
public static void main(String[] args) {
String apiUrl = "https://api.tanshuapi.com/api/isbn/v2/index";
String apiKey = "your_api_key_here";
String isbn = "9787544291170";
try {
String urlStr = apiUrl + "?key=" + apiKey + "&isbn=" + isbn;
URL url = new URL(urlStr);
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
conn.setRequestMethod("GET");
conn.setRequestProperty("Accept", "application/json");
int responseCode = conn.getResponseCode();
System.out.println("响应码: " + responseCode);
if (responseCode == HttpURLConnection.HTTP_OK) {
BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println("响应结果: " + response.toString());
JSONObject jsonResponse = new JSONObject(response.toString());
int code = jsonResponse.getInt("code");
String msg = jsonResponse.getString("msg");
JSONObject data = jsonResponse.getJSONObject("data");
System.out.println("状态码: " + code);
System.out.println("消息: " + msg);
System.out.println("书名: " + data.getString("title"));
System.out.println("作者: " + data.getString("author"));
System.out.println("出版社: " + data.getString("publisher"));
System.out.println("出版日期: " + data.getString("pubdate"));
System.out.println("页码: " + data.getString("pages"));
System.out.println("封面: " + data.getString("img"));
System.out.println("简介: " + data.getString("summary"));
} else {
System.out.println("请求失败");
}
conn.disconnect();
} catch (Exception e) {
e.printStackTrace();
}
}
}
总结
ISBN数据查询API以其快速响应和精准数据,成为不可或缺的工具,例如在二手书交易平台上,卖家可以通过ISBN数据查询API自动填充书籍信息。在图书馆、书店及个人藏书爱好者可以利用ISBN数据查询API构建或更新图书目录和库存系统。还有分析师和市场研究者通过ISBN数据API收集图书行业数据,进行出版趋势分析、市场需求预测和消费者行为研究,为行业决策提供数据支持。