NAV Navbar
php shell

引导

欢迎使用嗨碰API

通过我们的API,你可以免费使用我们的数据和视频CDN服务

当前API域名为

https://www.hiporn.net

后续部署独立API服务器,我们会变更!

认证

嗨碰API当前完全免费使用

视频相关

获取分类

请求示例

$HIPORN_CATEGORIES_API_URL = 'https://www.hiporn.net/v1/category';
$response = json_decode(file_get_contents($url), true);
var_dump($response);
if ($response['success']) {
    $categories = $response['response']['category'];
    //doSomethingWith($categories);
}

返回示例

{
    "status": true,
    "response": {
        "category": {
            "id": "1",
            "name": "91,Chinese,\u56fd\u4ea7"
        }
    }
}

当前分类为固定, 仅91Porn国产

HTTP 请求

GET https://www.hiporn.net/v1/category

请求字段

获取视频列表

请求示例

$HIPORN_LIST_VIDEOS_API_URL = 'https://www.hiporn.net/v1/videolist/';
$page = 1;
$limit = '?limit=12';
$response = json_decode(file_get_contents($url . $page . $limit), true);
var_dump($response);
if ($response['success']) {
    $videos = $response['response']['videolist'];
    //doSomethingWith($videos);
}

返回示例 JSON格式

{
    "status": true,
    "response": {
        "total": 96419,
        "videolist": [{
            "id": "p8e",
            "id_by91": "272618",
            "id_bykey": "fc1bbd2baee578538f63",
            "cid": 1,
            "title": "\u4e70\u4e70\u4e70\u9c8d\u9c7c",
            "date": "2018-07-13",
            "duration": 105,
            "status": "1",
            "rateing": 0,
            "views": 218
        }, {
            "id": "p8d",
            "id_by91": "272619",
            "id_bykey": "1f76d0e625a13c707a1b",
            "cid": 1,
            "title": "\u5065\u8eab\u623f\u5ae9\u59b9\u7eed\uff0c\u5927\u5976\u4e30\u81c0\u64cd\u7740\u5c31\u662f\u723d",
            "date": "2018-07-13",
            "duration": 661,
            "status": "1",
            "rateing": 0,
            "views": 322
        }, {
            "id": "p8c",
            "id_by91": "272621",
            "id_bykey": "4bc45129ad7d9c50fed4",
            "cid": 1,
            "title": "\u6d4e\u5357-\u592a\u6df1\u4e86\u7136\u540e\u6362\u59ff\u52bf\u54c8\u54c8",
            "date": "2018-07-13",
            "duration": 51,
            "status": "1",
            "rateing": 0,
            "views": 175
        }]
    }
}

获取视频列表

HTTP Request

GET https://www.hiporn.net/v1/videolist/?page=<page>&limit=<size>

URL Parameters

参数 默认 备注
page false 如果没有设置,默认1 (第一页)
size true 如果没设置, 默认返回18条
参数 说明
id 视频ID (Hash内部算法)
id_by91 91官方视频ID
id_bykey 91官方KEY, http://91porn.com/view_video.php?viewkey=KEY

获取视频内容

请求示例


返回示例

{
    "status": true,
    "response": {
        "id": "p88",
        "id_by91": "272634",
        "id_bykey": "22fcbb535025ee74f6f2",
        "cid": 1,
        "title": "\u6f6e\u55b7\u8fc7\u540e\u7d2f\u7684\u4e0d\u884c",
        "date": "2018-07-13",
        "duration": 683,
        "status": "1",
        "rateing": 0,
        "views": 314,
        "video_thumb": "https:\/\/www.hiporn.net\/media\/img\/96604\/1.jpg",
        "video_imgtitle": "https:\/\/www.hiporn.net\/media\/t\/96604.png",
        "video_preview": "https:\/\/www.hiporn.net\/media\/img\/96604\/preview.jpg",
        "video_download": "https:\/\/cdnclient4388d.vcdn.us\/download\/mp4\/22fcbb535025ee74f6f2.mp4",
        "player_mp4": "https:\/\/cdnclient4388.vcdn.us\/mp4\/mp4\/22fcbb535025ee74f6f2.mp4",
        "player_hls": "https:\/\/cdnclient4388.vcdn.us\/hls\/mp4\/22fcbb535025ee74f6f2.mp4\/index.m3u8",
        "player_dash": "https:\/\/cdnclient4388.vcdn.us\/dash\/mp4\/22fcbb535025ee74f6f2.mp4\/manifest.mpd",
        "player_hds": "https:\/\/cdnclient4388.vcdn.us\/hds\/mp4\/22fcbb535025ee74f6f2.mp4\/manifest.f4m",
        "player_mss": "https:\/\/cdnclient4388.vcdn.us\/mss\/mp4\/22fcbb535025ee74f6f2.mp4\/manifest",
        "embed_url": "https:\/\/www.hiporn.net\/embed\/p88"
    }
}

获取视频

HTTP Request

GET https://www.hiporn.net/v1/video/<ID>

URL Parameters

Parameter Description
ID 视频唯一ID

返回主要参数特殊介绍

Parameter Description
video_imgtitle 视频标题图片化 , 解决关键词过滤问题 ( 暂时停用 )
video_thumb 视频缩略图 默认返回1, 支持1-10 , 大小 498p / x280px
video_preview 视频九宫格预览 , 一般作为播放器预览图
video_download 视频下载链接
player_mp4 MP4格式的播放文件, 直链 , 桌面首选
player_hls HLS协议,M3u8/TS切片格式的播放文件, 直链 , 移动首选
player_dash Dash 协议的播放文件, 直链
player_hds HDS 协议的播放文件, 直链
player_mss MSS 协议的播放文件, 直链
embed_url 框架调用的URL, 无广告,无限速, 点击即播

调用视频播放器

请求示例

Request Code

返回示例

Return Code

我们允许其他网站直接调用我们的视频内容进行直接播放

你可以根据你的网站风格,进行大小定制等操作,例如

<iframe width="530" height="298" src="https://www.hiporn.net/embed/p88" frameborder="0" allowfullscreen></iframe>

演示

Errors

这里是API的错误代码

Error Code Meaning
400 Bad Request -- Your request is invalid.
401 Unauthorized -- Your API key is wrong.
403 Forbidden -- The kitten requested is hidden for administrators only.
404 Not Found -- The specified kitten could not be found.
405 Method Not Allowed -- You tried to access a kitten with an invalid method.
406 Not Acceptable -- You requested a format that isn't json.
410 Gone -- The kitten requested has been removed from our servers.
418 I'm a teapot.
429 Too Many Requests -- You're requesting too many kittens! Slow down!
500 Internal Server Error -- We had a problem with our server. Try again later.
503 Service Unavailable -- We're temporarily offline for maintenance. Please try again later.