{ "remainTimes": 49998, "msg": "查询成功,扣费", "result": { "code": 0, "resultData": [{ "probability": 0.6688041687011719, "location": { "x": 104, "width": 818, "y": 554, "height": 54 }, "text": "公民身份号码510132198606091238" }, { "probability": 0.8379375338554382, "location": { "x": 106, "width": 538, "y": 367, "height": 42 }, "text": "住址四川省新津县花源镇官林" }, { "probability": 0.2098650485277176, "location": { "x": 104, "width": 446, "y": 288, "height": 38 }, "text": "出生1986*年6月9日" }, { "probability": 0.07737317681312561, "location": { "x": 106, "width": 361, "y": 211, "height": 42 }, "text": "性别男民族汉" }, { "probability": 0.204350084066391, "location": { "x": 104, "width": 167, "y": 137, "height": 38 }, "text": "姓名" }, { "probability": 0.9999649524688721, "location": { "x": 225, "width": 114, "y": 423, "height": 41 }, "text": "村5" }], "message": "success", "request_id": "940b321db68dca0facf3bc92ed157a09" }, "code": "10000", "charge": true, "remain": 49998, "remainSeconds": -1 }
<?php /** * Created by PhpStorm. * User: FZS * Time: 2021/04/14 15:26 */ class freeApi { private $apiUrl; public function __construct() { $this->apiUrl = 'https://way.jd.com/JDAI/ocr_universal?appkey=appkey&body=body'; } /** * 获取结果 * @return array */ public function getResult() { return file_get_contents($this->apiUrl); } }
package main import ( "fmt" "io/ioutil" "log" "net/http" ) const ( APIURL = "https://way.jd.com/JDAI/ocr_universal?appkey=appkey&body=body" ) func main() { queryUrl := fmt.Sprintf("%s",APIURL) resp, err := http.Get(queryUrl) if err != nil { log.Println(err) return } defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { fmt.Println(err) return } fmt.Println(string(body)) }