## 条码查询 ![](https://img.kancloud.cn/fe/6c/fe6c888bee7a89344b39ad0a88961979_270x202.png =x125) > 通过条码(条形码)查询商品信息(名称、价格、图片、厂家、描述等字段),融合了包括中国条码中心在内的多个数据源。 >[danger] 目前只支持69开头的13或14位的国内商品,进口和国外商品暂不支持查询 ## 接口费用([点击购买](https://market.topthink.com/product/128)) > 最低 0.015元/次 ## 接口调用([调用须知](https://docs.topthink.com/think-api/1835086)) ### 请求地址 ``` GET https://api.topthink.com/barcode/query ``` ### 请求参数 | 参数名称 | 类型 | 必须 | 描述 | | --- | --- | --- | --- | | appCode| string| 是|用户授权码,参考[API调用](https://docs.topthink.com/think-api/1835086) | | code | String | 是 | 条形码 | ### 返回`data`参数 | 名称 | 类型 | 示例值 | 描述 | | --- | --- | --- | --- | | flag | String | true | 操作是否成功 | | code | String | 6938166920785 | 条形码 | | goodsName | String | 苹果醋 | 商品名称 | | manuName | String | 新乡市和丝露饮品有限公司 | 厂商 | | spec | String | 268ml | 规格 | | price | String | 3.00 | 参考价格(单位:元) | | trademark | String | 醋美人生 | 商标/品牌名称 | | img | String | http://www.aijiazixuan.com/upfilesmall/2013-12/2013121962731065.jpg | 图片地址 | | ret\_code | String | 0 | 返回代码 0为成功,其他为失败 | | goodsType | String | 食品、饮料和烟草>>饮料 | 商品分类 | | sptmImg | String | http://app2.showapi.com/img/barCode\_img/20161116/14792662xxxxxxx.png | 条码图片 | | ycg | String | 中国 | 原产地(可能无此参数信息) | | note | String | | 备注信息 | | remark | String | 查询成功! | 返回结果的描述 | | manuAddress | String | | 厂商地址 | | imgList | String | | 条码中心图片列表 | ## SDK调用 ``` $client = new Client("YourAppCode"); $result = $client->barcodeQuery() ->withCode('6938166920785') ->request(); dump($result); ``` 返回数据示例: ~~~ { "message": "查询成功", "data": { "sptmImg": "", "spec": "268ml", "remark": "查询成功!", "img": "http://app2.showapi.com/img/barCode_img/2f7e639b-aa2f-4248-ae79-f0acc6ea56e6.jpg", "code": "6938166920785", "ycg": "", "manuName": "新乡市和丝露饮品有限公司", "ret_code": "0", "imgList": [], "flag": true, "price": "3.00", "trademark": "醋美人生", "manuAddress": "河南省新乡市原阳县新城开发区", "note": "备注:经查,该厂商识别代码已在中国物品编码中心注册,但编码信息未按规定通报", "goodsName": "苹果醋", "goodsType": "工业生产和制造业>>食品和饮料工业>>饮料加工>>水饮料加工" }, "code": 0 } ~~~ >[danger] 返回`code`为0时计费。