2.4.3 • Published 7 years ago
zhihu-api v2.4.3
zhihu API
UNOFFICIAL API for zhihu.
This projects implements only basic data interfaces, meaning that you should implement your own logical code (by using this project) if you want a crawler/spider.
See doc.
Install
$ npm install zhihu-api
Quick Start
const fs = require('fs')
const api = require('zhihu-api')()
// cookie must be set before any request
api.cookie(fs.readFileSync('./cookie'))
api.user('zhihuadmin')
.profile()
.then(console.log)
.catch(console.trace)
which outputs:
{
"id": "3d198a56310c02c4a83efb9f4a4c027e",
"name": "知乎小管家",
"type": "people",
"userType": "people",
"urlToken": "zhihuadmin",
"gender": 0,
"messageThreadToken": "6479654600",
"avatarUrl": "https://pic3.zhimg.com/34bf96bf5584ac4b5264bd7ed4fdbc5a_is.jpg",
"coverUrl": "",
"headline": "欢迎反馈问题和建议!",
"description": "",
"isBindSina": true,
"showSinaWeibo": true,
"sinaWeiboUrl": "http://weibo.com/u/5192295756",
"badge": [{
"type": "identity",
"description": "知乎官方帐号"
}],
"followerCount": 47741,
"followingCount": 4,
"questionCount": 7,
"answerCount": 49,
"articlesCount": 26,
"markedAnswersCount": 0,
"markedAnswersText": "",
"followingTopicCount": 8,
"followingQuestionCount": 90,
"followingColumnsCount": 0,
"followingFavlistsCount": 0,
"favoriteCount": 0,
"favoritedCount": 3711,
"thankedCount": 3871,
"hostedLiveCount": 0,
"participatedLiveCount": 0,
"logsCount": 84,
"voteupCount": 77180,
"accountStatus": [],
"isForceRenamed": false,
"isActive": 1,
"business": {
"id": "19550517",
"type": "topic",
"name": "互联网"
},
"locations": [{
"id": "19550828",
"type": "topic",
"name": "北京"
}],
"educations": [],
"employments": [{
"company": {
"id": "19550228",
"type": "topic",
"name": "知乎"
},
"job": {
"id": "19625808",
"type": "topic",
"name": "社区管理"
}
}]
}
License
3.0.0
7 years ago
2.4.3
7 years ago
2.4.2
7 years ago
2.4.1
7 years ago
2.4.0
7 years ago
2.3.2
7 years ago
2.3.1
7 years ago
2.3.0
7 years ago
2.2.0
7 years ago
2.1.1
7 years ago
2.1.0
7 years ago
2.0.0
7 years ago
1.0.1
7 years ago
1.0.0
7 years ago
0.7.2
8 years ago
0.7.1
8 years ago
0.7.0
8 years ago
0.6.1
8 years ago
0.6.0
8 years ago
0.5.1
8 years ago
0.5.0
8 years ago
0.4.1
8 years ago
0.4.0
8 years ago
0.3.1
8 years ago
0.3.0
8 years ago
0.2.0
8 years ago
0.1.1
8 years ago
0.1.0
8 years ago
0.0.14
8 years ago
0.0.13
8 years ago
0.0.12
8 years ago
0.0.11
8 years ago
0.0.10
8 years ago
0.0.9
8 years ago
0.0.8
8 years ago
0.0.7
8 years ago
0.0.5
8 years ago
0.0.4
8 years ago
0.0.3
8 years ago
0.0.2
8 years ago
0.0.1
9 years ago