知乎用户信息获取API接口
文章来源:未知
更新时间:2022-12-31 10:10:48
接口地址
https://api.vvhan.com/api/zhihu
返回格式
JSON
请求方式:
GET
请求示例
https://api.vvhan.com/api/zhihu?username=uxiaohan
参数说明
名称 |
必填 |
类型 |
说明 |
username |
是 |
string |
输入知乎用户名 |
返回数据
{"success":true,"home":"https:\/\/www.zhihu.com\/people\/uxiaohan","info":{"id":"101ead66b49d76d3a8307e9b8bcb9520","username":"uxiaohan","nickname":"韩小韩","sex":"男","avatar":"https:\/\/pic4.zhimg.com\/v2-d8032af17d9eddd96b7d1f906e9c0b13_l.jpg","signature":"山河远阔"},"vip_info":{"is_vip":false,"widget":{},"vip_icon":{}}}
调用实例
直接调用
示例代码
<?php
header("Content-Type:text/json;charset=UTF-8");
date_default_timezone_set("PRC");
$username = $_GET["username"];
$url = "https://api.vvhan.com/api/zhihu?username=" . $username;
$data = file_get_contents($url);
echo $data;
?>