Vnil interface document
Vnil(https://www.vnil.cn)
Tiktok, K wai, volcano, video, today's headlines, clips, red books, micro-blog, QQ video, Tencent news, fun headlines, hot pot video, beautiful beat, car king, fast shadow, mini view, volcano video, pewter shrimp, good looking frequency, oasis, VUE, second pat, pear video, Duan You, brush treasure, shelter, all the small video. Momo video, Meitu XiuXiu, UC browser, tiktok, Twitter, Youtube, light video, bilibilibili, eggplant short video, inspiration, WIDE, eye opening, national karaoke, rightmost, little coffee show, Pipi funny, AcFun, Netease cloud music, Migu circle, Keep, pear vortex, Xiaoying, new studio, library, sunshine broadband network, Bixin, tease Short videos from more than 50 platforms such as Meijie are de Watermarked and analyzed.
Tiktok volcano, tiktok, two, the author's home page list analysis interface has been supported: shaking, watermelon videos, today's headlines, micro vision, small video, Bilibili, jitter, volcano, beauty pat, car, video, Tencent news, penguin, express, QQ browser, AcFun, light video, shelter, hot pot video, UC browser, etc.
About interfaces:
1,Interface adoption RESTful API Mode, without limiting the development language. Provided in the current document PHP and Python The code examples of the two languages are convenient for developers to access. 2,Interface support GET and POST Two parameter submission methods 3,For interface error code, please refer to "Appendix 1: description of error code"
1, De watermark analysis interface
URL: https://api.vnil.cn/api/parse/deal
Request method: GET/POST
Request parameters:
field | type | Required | remarks | assignment |
---|---|---|---|---|
appkey | string | Y | appkey | www.vnil.cn developer background access |
url | string | Y | Resource address information to be resolved |
Return field comments
Field name | notes | remarks |
---|---|---|
code | Error code | Error code: please refer to the description of error code |
msg | error message | Error code: please refer to the description of error code |
body | ||
platform | Platform | body, such as taobao and xiaohongshu |
url | url requested by the developer | body |
text | Copywriting information | body |
cover | Cover map address | body |
images | HD large picture collection | body |
video_info | video information | The video addresses of some platforms have validity limits and cannot be stored permanently |
PHP instance code:
<?php //appkey generated by the developer in the background $appkey = ''; //url to resolve $url = ''; $param = [ 'appkey' => $appkey, 'url' => $url, ]; //Get the requested address: https://api.vnil.cn/api/parse/deal?appkey=appkey&url=url $apiUrl = 'https://api.vnil.cn/api/parse/deal?'.http_build_query($param); $ch = curl_init(); curl_setopt ( $ch, CURLOPT_URL, $apiUrl ); curl_setopt ( $ch, CURLOPT_SSL_VERIFYPEER, FALSE ); curl_setopt ( $ch, CURLOPT_SSL_VERIFYPEER, 0 ); curl_setopt ( $ch, CURLOPT_SSL_VERIFYHOST, 0 ); curl_setopt ( $ch, CURLOPT_MAXREDIRS, 5 ); curl_setopt ( $ch, CURLOPT_RETURNTRANSFER, 1 ); curl_setopt ( $ch, CURLOPT_FOLLOWLOCATION, 1 ); curl_setopt ( $ch, CURLOPT_TIMEOUT, 10 ); $content = curl_exec( $ch ); curl_close ( $ch); print_r($content);
II Interface for obtaining author information:
Request address: https://api.vnil.cn/api/customparse/getAuthorInfo
Request method: GET/POST
Request parameters:
field | type | Required | remarks | assignment |
---|---|---|---|---|
appkey | string | Y | appid | appkey generated by the developer in the background |
url | string | Y | Author sharing page url |
Failed:
{"code":10001,"msg":"parameter lost","body":[]}
Return field comments
Field name | notes | remarks |
---|---|---|
code | Error code | Error code: please refer to the description of error code |
msg | error message | Error code: please refer to the description of error code |
body | ||
uid | Author uid | |
name | nickname | |
number | number | |
short_id | Internal short ID | |
avatar | head portrait | |
desc | brief introduction | |
follower | Number of fans | |
focus | Number of concerns | |
likes | Number of likes | |
works | Number of works |
PHP EXAMPLE:
PHP file_get_contents:
//appkey generated by the developer in the background $appkey = ''; //url of the author sharing page of the short video platform that needs to be parsed $url= ''; $param = [ 'appkey' => $appkey, 'url' => $url, ]; //Get the requested address: https://api.vnil.cn/api/customparse/getAuthorInfo?appid=&appsecret=&url= $apiUrl = 'https://api.vnil.cn/api/customparse/getAuthorInfo?'.http_build_query($param); $videoInfo = file_get_contents($apiUrl); print_r($videoInfo);
Take PHP curl as an example:
//appkey generated by the developer in the background $appkey = ''; //url of the author sharing page of the short video platform that needs to be parsed $url= ''; $param = [ 'appkey' => $appkey, 'url' => $url, ]; //Get the requested address: https://api.vnil.cn/api/customparse/getAuthorInfo?appid=&appsecret=&url= $apiUrl = 'https://api.vnil.cn/api/customparse/getAuthorInfo?'.http_build_query($param); $ch = curl_init(); curl_setopt ( $ch, CURLOPT_URL, $apiUrl ); curl_setopt ( $ch, CURLOPT_SSL_VERIFYPEER, 0 ); curl_setopt ( $ch, CURLOPT_SSL_VERIFYHOST, 0 ); curl_setopt ( $ch, CURLOPT_MAXREDIRS, 5 ); curl_setopt ( $ch, CURLOPT_RETURNTRANSFER, 1 ); curl_setopt ( $ch, CURLOPT_FOLLOWLOCATION, 1 ); curl_setopt ( $ch, CURLOPT_TIMEOUT, 10 ); $content = curl_exec( $ch ); curl_close ( $ch); print_r($content);
III Get a list of author works
Request address: https://api.vnil.cn/api/customparse/getList
Request method: GET/POST
Request parameters:
field | type | Required | remarks | assignment |
---|---|---|---|---|
appkey | string | Y | appkey | appkey generated by the developer in the background |
uid | string | Y | Author uid (returned in the author information interface) | |
platform | string | Y | Platform information (returned in the author information interface) | |
cursor | string | N | "next_cursor" returned in the last call of this interface |
Return result:
Return field comments
Field name | notes | remarks |
---|---|---|
code | Error code | Error code: please refer to the description of error code |
msg | error message | Error code: please refer to the description of error code |
body | ||
desc | Introduction to works video | |
video_url | No watermark address | |
cover | Work video cover | |
duration | Video duration: seconds | |
like_count | Number of likes | |
share_count | Share number | |
to_parse | Whether secondary parsing is required: when it is 0, it is not required; when it is 1, it is required | |
next_cursor | Page turning request cursor | |
has_more | Are there more | true indicates that there are more page turning requests, and false indicates that there is no page turning request |
Access attention point
The instructions here are: 1,Returned works list“ video_url"It is the video address without watermark, if returned“ video_url"It is empty. To obtain video information without watermark, please"share_url"Call the de watermark resolution interface for the parameter 2,When"page"Lower"has_more"by"true"If yes, it means that there are still contents below. Please turn the page to get them"next_cursor"As a parameter"cursor",Call the current interface again(Get a list of author works)