六派数据-驾考题库
  • ID

    77

  • 收藏

    4

  • 使用

    18

驾考题库

公安部最新驾照考试题库,分小车、客车、货车、摩托车4类,科目一和科目四2种。可按顺序或者随机获取。
免费会员100次/天 白银会员600次/天 钻石会员15万次/日
免费 (根据会员等级不同,每日可调用次数不同,了解各会员权益>>
  • 获取考题

基本信息

  • 接口地址: http://open.liupai.net/driverexam/query
  • 支持格式: JSON,JSONP
  • 请求方法: GET POST
  • 请求示例: http://open.liupai.net/driverexam/query?appkey=yourappsecret

请求参数 API在线测试

参数名称 类型 必填 说明
type string 题目类型 分为A1,A3,B1,A2,B2,C1,C2,C3,D,E,F 默认C1
subject int 科目类别 1为科目一 4为科目四 默认1
pagesize int 每页数量 默认1
pagenum int 当前页数
sort string 排序方式 正常排序normal 随机排序rand 默认normal
chapter int 章节 科目一为1-4 科目四为1-7

返回参数

参数名称 类型   说明
total int   总数
pagenum int   当前页 默认1
pagesize int   每页数量 默认1
subject int   科目类别
type string   题目类型
sort string   排序方式
question string   答案
option1 string   选项一
option2 string   选项二
option3 string   选项三
option4 string   选项四
answer string   答案
explain string   解析
pic string   图片
chapter int   章节

请求代码 查看代码

  • PHP
  • JAVA
  • Python
require_once("curl.func.php");

$method = "POST";
$url = "http://open.liupai.net/driverexam/query";
$headers = NULL;
$params = array(  
    "appkey" => "yourappsecret",
    "type" => "C1",
    "subject" => "1",
    "pagesize" => "1",
    "pagenum" => "参数4",
    "sort" => "normal",
    "chapter" => "参数6"
);
$result = api_curl($method, $url, $headers, $params);
if ($result) {
    $body = json_decode($result["body"], TRUE);
    $status_code = $body["status"];
    if ($status_code == "200") { 
        var_dump($body["result"]);
    }else
        var_dump($body); 
}else  
    echo "发送请求失败";

JSON返回示例

{

    "status": 200,
    "msg": "OK",
    "result": {
        "total": 1460,
        "pagenum": 35,
        "pagesize": 5,
        "subject": 1,
        "type": "C1,C2,C3",
        "chapter": 0,
        "sort": "normal",
        "list": [
            {
                "question": "在这种路口怎样进行掉头?",
                "option1": "A、在人行横道上掉头",
                "option2": "B、进入路口后掉头",
                "option3": "C、从右侧车道掉头",
                "option4": "D、从中心线虚线处掉头",
                "answer": "D",
                "explain": "虚线处可掉头,实线是不能压的,所以实线处不能掉头、变道等。因此应该从图中中心线虚线处掉头才对。",
                "pic": "https://open.liupai.net/data/driverexam/059be.jpg",
                "type": "C1,C2,C3",
                "chapter": "道路交通安全法律、法规和规章"
            },
            {
                "question": "遇到这种情况的路口,以下做法正确的是什么?",
                "option1": "A、沿左侧车道掉头",
                "option2": "B、该路口不能掉头",
                "option3": "C、选择中间车道掉头",
                "option4": "D、在路口内掉头",
                "answer": "B",
                "explain": "此处有禁止掉头的标志,所以是不可以掉头的。",
                "pic": "https://open.liupai.net/data/driverexam/65ddf.jpg",
                

    数据信息

  • 今日调用: 55,261  次
  • 客服电话: 010-8639-9970
  • 客服邮箱: kf@ksmsoft.net
  • 售前客服:
  • 售后技术:

驾考题库问答专区

问答专区

相关资讯

其他推荐