拍照搜书
上传书封面或条码照片,先识别 ISBN,认不出来再让大模型猜书名、作者、出版社,返回最可能的几本书。
| 请求方式 | POST |
| 接口路径 | /api/goods/photoSearch |
| Content-Type | form-data |
| 鉴权 | X-Nideshop-Token |
请求参数
curl 调用
curl -s 'https://www.8shu8.com/api/goods/photoSearch' \
-H 'X-Nideshop-Token: YOUR_LOGIN_TOKEN' \
-F 'file=@example.jpg'
响应示例
{
"code": 200,
"message": "操作成功",
"success": true,
"data": {
"mode": "string",
"text": "string",
"records": [
{
"name": "...",
"primaryPicUrl": "...",
"marketPrice": "...",
"headPhotoUrl": "...",
"promotionDesc": "...",
"id": "...",
"goodsStatus": "...",
"goodsSn": "...",
"fullText": "...",
"goodsNumber": "...",
"addTime": "...",
"retailPrice": "...",
"sellVolume": "...",
"createUserId": "...",
"updateTime": "...",
"shopId": "...",
"lat": "...",
"lon": "...",
"pushTime": "...",
"isSelfSell": "...",
"goodsId": "...",
"expiredTime": "...",
"skuId": "...",
"second": "...",
"distance": "...",
"recyclePrice": "...",
"storeId": "...",
"bookCondition": "...",
"images": "...",
"categoryId": "...",
"itemSn": "...",
"isbn": "...",
"author": "...",
"publisher": "..."
}
],
"noneRecords": [
{
"id": "...",
"levelNum": "...",
"author": "...",
"pubdate": "...",
"binding": "...",
"translator": "...",
"pages": "...",
"categoryId": "...",
"imagesLarge": "...",
"publisher": "...",
"isbn": "...",
"goodsSn": "...",
"title": "...",
"price": "...",
"kaiben": "...",
"version": "...",
"wordCnt": "...",
"dtSource": "...",
"subtitle": "...",
"summary": "...",
"score": "...",
"label": "...",
"calisLabel": "...",
"volume": "...",
"updateTime": "...",
"addTime": "...",
"recycle": "...",
"doubanScore": "...",
"hasSub": "...",
"outmoded": "...",
"ban": "...",
"sell": "...",
"demand": "...",
"contents": "...",
"recommendWords": "...",
"authorIntro": "...",
"weight": "...",
"gds": "...",
"sync": "...",
"ownActiveCode": "...",
"oneIsbnMoreBook": "...",
"suitBook": "...",
"imageMd5": "...",
"sourceTitle": "...",
"kfzMinPrice": "...",
"bsMinPrice": "...",
"humanPrice": "...",
"kfzStock": "...",
"humanCheck": "...",
"recycleMarkType": "...",
"recyclePrice": "...",
"recycleScore": "...",
"kfzSoldRate": "...",
"kfzSoldAvgPrice": "...",
"kfzWeekSell": "...",
"kfzMonthSell": "...",
"kfzThreeMonthSell": "...",
"kfzHalfYearSell": "...",
"kfzYearSell": "...",
"kfzAvgPrice": "...",
"marketStock": "...",
"marketStockTime": "...",
"bookDataSyncTime": "...",
"kfzSellShopCount": "...",
"kfzSellAvgPrice": "...",
"kfzLastSoldDay": "...",
"lastSaleDay": "...",
"bs3mSale": "...",
"bs3mSalePrice": "...",
"bsStock": "...",
"social": "...",
"recycleUpdateTime": "...",
"images": "...",
"syncErp": "...",
"imageList": "...",
"userId": "...",
"subUserName": "...",
"categoryDesc": "...",
"stockLocation": "...",
"bookFlag": "...",
"mess": "...",
"lastUpdatePriceTime": "...",
"bookCondition": "...",
"marketingTrend": "...",
"warehouseId": "..."
}
]
}
}
返回字段(data)
| 字段 | 类型 | 说明 |
mode | String | barcode:图中条码;isbn:大模型认出 ISBN;meta:按书名作者出版社 |
text | String | 识别出的文本,多本用换行分开 |
records | 对象数组 | - |
records[].name | String | 书名 |
records[].primaryPicUrl | String | 商品主图 |
records[].marketPrice | BigDecimal | - |
records[].headPhotoUrl | String | - |
records[].promotionDesc | String | - |
records[].id | Long | - |
records[].goodsStatus | 对象 | - |
records[].goodsSn | String | - |
records[].fullText | String | 书名+作者+出版社,全文检索 |
records[].goodsNumber | Integer | - |
records[].addTime | LocalDateTime | - |
records[].retailPrice | BigDecimal | - |
records[].sellVolume | Integer | - |
records[].createUserId | Long | - |
records[].updateTime | LocalDateTime | - |
records[].shopId | Integer | - |
records[].lat | Double | 经度 |
records[].lon | Double | 维度 |
records[].pushTime | LocalDateTime | - |
records[].isSelfSell | Boolean | - |
records[].goodsId | Long | - |
records[].expiredTime | LocalDateTime | - |
records[].skuId | String | - |
records[].second | Boolean | - |
records[].distance | BigDecimal | - |
records[].recyclePrice | BigDecimal | - |
records[].storeId | Integer | - |
records[].bookCondition | String | 品相,存 编码 |
records[].images | Array<String> | - |
records[].categoryId | String | - |
records[].itemSn | String | - |
records[].isbn | String | - |
records[].author | String | 列表展示用,来自货品档案 |
records[].publisher | String | 列表展示用,来自货品档案 |
noneRecords | 对象数组 | - |
noneRecords[].id | Integer | - |
noneRecords[].levelNum | Integer | 评分 |
noneRecords[].author | String | 作者 |
noneRecords[].pubdate | String | 出版日期 |
noneRecords[].binding | String | 装订 |
noneRecords[].translator | String | 译者 |
noneRecords[].pages | Integer | 页数 |
noneRecords[].categoryId | String | - |
noneRecords[].imagesLarge | String | - |
noneRecords[].publisher | String | 出版社 |
noneRecords[].isbn | String | isbn |
noneRecords[].goodsSn | String | - |
noneRecords[].title | String | 标题 |
noneRecords[].price | BigDecimal | 原价 |
noneRecords[].kaiben | String | 开本 |
noneRecords[].version | String | 版本 |
noneRecords[].wordCnt | String | - |
noneRecords[].dtSource | 对象 | - |
noneRecords[].subtitle | String | 副标题 |
noneRecords[].summary | String | 简介 |
noneRecords[].score | Double | score评分 |
noneRecords[].label | String | - |
noneRecords[].calisLabel | String | CALIS 分类标签 |
noneRecords[].volume | String | 册数 |
noneRecords[].updateTime | LocalDateTime | - |
noneRecords[].addTime | LocalDateTime | - |
noneRecords[].recycle | Boolean | - |
noneRecords[].doubanScore | Double | - |
noneRecords[].hasSub | Integer | - |
noneRecords[].outmoded | Integer | - |
noneRecords[].ban | Boolean | - |
noneRecords[].sell | Integer | - |
noneRecords[].demand | Integer | - |
noneRecords[].contents | String | 内容 |
noneRecords[].recommendWords | String | 推荐语 |
noneRecords[].authorIntro | String | - |
noneRecords[].weight | BigDecimal | - |
noneRecords[].gds | 对象数组 | - |
noneRecords[].sync | Boolean | - |
noneRecords[].ownActiveCode | Boolean | 含激活码 |
noneRecords[].oneIsbnMoreBook | Boolean | 一码多书 |
noneRecords[].suitBook | Boolean | 套装书 |
noneRecords[].imageMd5 | String | 图片md5 |
noneRecords[].sourceTitle | String | - |
noneRecords[].kfzMinPrice | BigDecimal | - |
noneRecords[].bsMinPrice | BigDecimal | - |
noneRecords[].humanPrice | BigDecimal | 人工定价 |
noneRecords[].kfzStock | Integer | - |
noneRecords[].humanCheck | Boolean | - |
noneRecords[].recycleMarkType | 对象 | - |
noneRecords[].recyclePrice | BigDecimal | - |
noneRecords[].recycleScore | BigDecimal | - |
noneRecords[].kfzSoldRate | BigDecimal | - |
noneRecords[].kfzSoldAvgPrice | BigDecimal | - |
noneRecords[].kfzWeekSell | Integer | 孔网销量/价格指标(同步自 业务数据) |
noneRecords[].kfzMonthSell | Integer | - |
noneRecords[].kfzThreeMonthSell | Integer | - |
noneRecords[].kfzHalfYearSell | Integer | - |
noneRecords[].kfzYearSell | Integer | - |
noneRecords[].kfzAvgPrice | BigDecimal | - |
noneRecords[].marketStock | Integer | 分销仓汇总库存(定时同步) |
noneRecords[].marketStockTime | LocalDateTime | - |
noneRecords[].bookDataSyncTime | LocalDateTime | - |
noneRecords[].kfzSellShopCount | Integer | - |
noneRecords[].kfzSellAvgPrice | Double | - |
noneRecords[].kfzLastSoldDay | Double | - |
noneRecords[].lastSaleDay | Double | - |
noneRecords[].bs3mSale | Float | - |
noneRecords[].bs3mSalePrice | Double | - |
noneRecords[].bsStock | Integer | - |
noneRecords[].social | Integer | - |
noneRecords[].recycleUpdateTime | LocalDateTime | - |
noneRecords[].images | String | - |
noneRecords[].syncErp | Boolean | - |
noneRecords[].imageList | Array<String> | - |
noneRecords[].userId | Long | - |
noneRecords[].subUserName | String | 最近一次实拍档案操作人(日志表查询填充,非表字段) |
noneRecords[].categoryDesc | String | - |
noneRecords[].stockLocation | String | - |
noneRecords[].bookFlag | Boolean | - |
noneRecords[].mess | Boolean | - |
noneRecords[].lastUpdatePriceTime | LocalDateTime | - |
noneRecords[].bookCondition | String | 图书品相(编码,如 p85、p0) |
noneRecords[].marketingTrend | String | - |
noneRecords[].warehouseId | Integer | - |
| …(字段较多,仅列前 60 个) |