身份证查询-网亿工作室

身份证查询

GET /certification 费率:10积分/次

接口说明

参数说明

请求地址

接口地址: https://www.51dzsc.com/wp-json/wangyi/v1/certification
请求方式: GET

请求头

参数名 必填 说明
X-API-Key API密钥,用于认证请求
Content-Type 请求内容类型,固定为 application/json

请求参数

参数名 类型 必填 说明
realName string 姓名
cardNo string 身份证号码

返回示例

{
    "code": 200,
    "msg": "请求成功",
    "data": {
        "isok": true,
        "IdCardInfor": {
            "realname": "张*",
            "idcard": "110101********1234",
            "province": "北京市",
            "city": "北京市",
            "district": "东城区",
            "area": "北京市北京市东城区",
            "sex": "男",
            "birthday": "1990-01-01"
        }
    },
    "exec_time": 0.123,
    "user_ip": "127.0.0.1"
}

在线测试

示例代码

# cURL示例
curl -X GET \
    -H "X-API-Key: your_api_key" \
    -H "Content-Type: application/json" \
    
    https://www.51dzsc.com/wp-json/wangyi/v1/certification
# Python示例
import requests
import json

url = "https://www.51dzsc.com/wp-json/wangyi/v1/certification"
headers = {
    "X-API-Key": "your_api_key",
    "Content-Type": "application/json"
}
response = requests.get(url, headers=headers)

print(response.json())
# PHP示例
<?php
$url = "/certification";
$api_key = "your_api_key";

$curl = curl_init();
curl_setopt_array($curl, [
    CURLOPT_URL => "/certification",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        "X-API-Key: $api_key",
        "Content-Type: application/json"
    ],
]);

$response = curl_exec($curl);
$data = json_decode($response, true);

curl_close($curl);
print_r($data);
// JavaScript示例
const apiUrl = 'https://www.51dzsc.com/wp-json/wangyi/v1/certification';
const apiKey = 'your_api_key';

fetch(apiUrl, {
    method: 'GET',
    headers: {
        'X-API-Key': apiKey,
        'Content-Type': 'application/json'
    }
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
// Java示例
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.net.URI;

public class ApiExample {
    public static void main(String[] args) {
        HttpClient client = HttpClient.newHttpClient();
                HttpRequest request = HttpRequest.newBuilder()
            .uri(URI.create("https://www.51dzsc.com/wp-json/wangyi/v1/certification"))
            .header("X-API-Key", "your_api_key")
            .header("Content-Type", "application/json")
            .GET()
            .build();
        
        try {
            HttpResponse response = client.send(request,
                HttpResponse.BodyHandlers.ofString());
            System.out.println(response.body());
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}