Skip to content

QQ 信息接口文档 检测中...

接口地址: https://api.chyt.top/get_qq_info

请求方式: GET

返回格式: JSON

请求示例: https://api.chyt.top/get_qq_info?qq=123456789

接口说明: 获取指定 QQ 号码的头像、昵称和 QQ 邮箱信息。

请求参数

参数名必选类型说明
qqstring要查询的 QQ 号码,必须是 5-12 位数字

返回参数

参数名类型说明
codeint请求状态码,200 表示成功,其他值表示失败
msgstring错误信息,仅当 code 非 200 时返回
qqstring请求的 QQ 号码
namestringQQ 昵称
imgUrlstringQQ 头像链接,640x640 分辨率
emailstringQQ 邮箱地址,格式为 QQ号@qq.com

返回示例

成功响应:

json
{
    "code": 200,
    "qq": "123456789",
    "name": "张三",
    "imgUrl": "https://q.qlogo.cn/headimg_dl?dst_uin=123456789&spec=640&img_type=jpg",
    "email": "123456789@qq.com"
}

代码示例

php
<?php
$url = 'https://api.chyt.top/get_qq_info?qq=123456789';

$response = file_get_contents($url);
echo $response;
?>
python
import requests

url = 'https://api.chyt.top/get_qq_info'
params = {'qq': '123456789'}

response = requests.get(url, params=params)
print(response.json())
JavaScript
const https = require('https');

const url = 'https://api.chyt.top/get_qq_info?qq=123456789';

https.get(url, (res) => {
    res.on('data', (d) => process.stdout.write(d));
});
java
import java.io.*;
import java.net.HttpURLConnection;
import java.net.URL;

public class Main {
    public static void main(String[] args) throws IOException {
        URL url = new URL("https://api.chyt.top/get_qq_info?qq=123456789");
        HttpURLConnection conn = (HttpURLConnection) url.openConnection();
        conn.setRequestMethod("GET");

        try (BufferedReader br = new BufferedReader(new InputStreamReader(conn.getInputStream()))) {
            String response;
            while ((response = br.readLine()) != null) {
                System.out.println(response);
            }
        }
    }
}
C
#include <stdio.h>
#include <curl/curl.h>

int main() {
    CURL *curl = curl_easy_init();
    if(curl) {
        curl_easy_setopt(curl, CURLOPT_URL, "https://api.chyt.top/get_qq_info?qq=123456789");

        CURLcode res = curl_easy_perform(curl);
        if(res != CURLE_OK)
            fprintf(stderr, "curl_easy_perform() failed: %s\n", curl_easy_strerror(res));

        curl_easy_cleanup(curl);
    }
    return 0;
}