首页 API列表 API文档 社区 登录 注册
12306候车室大屏
GET https://gulangsc.cn/API/12306/12306.php

基础信息

接口描述
12306车站大屏信息,数据来源于12306官方平台,仅供参考,接口请不要用于商业用途!
请求方式
GET
返回格式
TEXT
计费类型
免费
QPS限制
20/s
状态
正常

返回预览

// 加载中...

请求参数

参数名类型必填默认值说明
apikeystring必填
msgstring必填
typestring必填
pagestring必填

在线测试

// 点击发送请求查看结果

示例代码

<?php
$API_URL = 'https://gulangsc.cn/API/12306/12306.php';

$params = array(
    'apikey' => 'YOUR_VALUE',
    'msg' => 'YOUR_VALUE',
    'type' => 'YOUR_VALUE',
    'page' => 'YOUR_VALUE',
);

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $API_URL . '?' . http_build_query($params));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_TIMEOUT, 10);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
$res = curl_exec($ch);
curl_close($ch);
print($res);

状态码

接口状态码

状态码说明
200请求成功
351多错误,请求查看

服务器状态码

状态码说明
500服务器错误
501请求接口不存在

AI开发文档

{
    "name": "12306候车室大屏",
    "method": "GET",
    "endpoint": "https:\/\/gulangsc.cn\/API\/12306\/12306.php",
    "description": "12306车站大屏信息,数据来源于12306官方平台,仅供参考,接口请不要用于商业用途!",
    "params": [
        {
            "name": "apikey",
            "type": "string",
            "required": "yes",
            "desc": "本站密钥"
        },
        {
            "name": "msg",
            "type": "string",
            "required": "yes",
            "desc": "车站名称,直接填城市名"
        },
        {
            "name": "type",
            "type": "string",
            "required": "no",
            "desc": "返回格式,默认text可选json"
        },
        {
            "name": "page",
            "type": "string",
            "required": "no",
            "desc": "页数(默认第1页)(仅对text生效)"
        }
    ],
    "response_format": "text"
}