XSZAV Api v1 Resources

How to Use the XSZAV API V1

Integrate our API in your website to get the exact content for your website and keep your DB up to date.

Below is a list of all available methods of the XSZAV API version 1:

Method searchVideos

Retrieves video list, can be filtered by multiple parameters, including the possibility to query the API for videos containing a specific string in the title or description.

Parameters:

- ac=videolist (Required). Action for videos search.

- t (Optional) Integer. Show only videos within the specified video category. For example, t=11 shows only videos in ‘JAV’ categories.

- pg (Optional) Integer. Page number

- limit (Optional) Integer.The maximum number of videos in the API response per page. Default 30, Maximum number 50.

- o (Optional). Videos ordering method. DESC order. For example, mr shows the latest videos in page 0. bw (Last viewed), mr (Latest), h (Most viewed), dh (Most viewed today), wh (Most viewed this week), mh (Most viewed this month), tr (Top rated).

- wd (Optional). Video search keywords, URL escaped non empty string, For example, wd=三上悠亜

- ids (Optional). Get videos by ids. Multiple IDs should be separated by commas, For example, ids=5,6,20,105,111

Example codes (PHP)

						
$url = 'https://api.xszav.com/v1/';
$ac = '?ac=videolist';
$t = '&t=5';
$wd = '&wd=無修正';
$pg = '&pg=1';
$limit = '&limit=18';
$response = json_decode(file_get_contents($url . $ac . $t . urlencode($wd) . $pg . $limit), true);
var_dump($response);
if ($response['success']) {
$videos = $response['videos'];
	doSomethingWith($videos);
}
						
					

The above command returns JSON structured like this:


Array
(
    [success] => 1
    [total_videos] => 18
    [videos] => Array
        (
            [0] => Array
                (
                    [vid] => 53706
                    [title] => 素人個撮無修正:[援交ハメ撮り]みさきちゃんJD19歳[生ハメ生フェラ顔射口内射精]
                    [addtime] => 1551456761
                    [viewnumber] => 80409
                    [likes] => 0
                    [dislikes] => 0
                    [video_url] => https://xszav.com/video/53706/1/1.html
                    [embedded_url] => https://xszav.com/embed/53706/1/1.html
                    [preview_url] => https://p2.lw0703.com/uploadimg/vod/2019-02-16/201902161550296423.jpg
                )

            [1] => Array
                (
                    [vid] => 15933
                    [title] => Caribbeancom-082215_954 無修正  荻野舞
                    [addtime] => 1551372213
                    [viewnumber] => 75851
                    [likes] => 0
                    [dislikes] => 0
                    [video_url] => https://xszav.com/video/15933/1/1.html
                    [embedded_url] => https://xszav.com/embed/15933/1/1.html
                    [preview_url] => http://ttdbj.com/2019-1/hd_caribbeancom-082215_954.jpg
                )
        )
)

					

Method getCategoriesList

Retrieves all available categories.

Parameters:

- ac=categories (Required).

Sample method request (for JSON output):

https://api.xszav.com/v1/?ac=categories

Example codes (PHP)

						
$url = 'https://api.xszav.com/v1/?ac=categories';
$response = json_decode(file_get_contents($url), true);
var_dump($response);
if ($response['success']) {
    $categories = $response['categories'];
    	doSomethingWith($categories);
}
						
					

The above command returns JSON structured like this:

						
Array
(
    [success] => 1
    [total_categories] => 21
    [categories] => Array
        (
            [0] => Array
                (
                    [cid] => 1
                    [enname] => Videos
                    [name] => Videos
                    [total_videos] => 0
                    [category_url] => https://xszav.com/category/1/1.html
                )

            [1] => Array
                (
                    [cid] => 16
                    [enname] => Anime
                    [name] => アニメ
                    [total_videos] => 4978
                    [category_url] => https://xszav.com/category/16/1.html
                )

            [2] => Array
                (
                    [cid] => 17
                    [enname] => SM
                    [name] => SM
                    [total_videos] => 528
                    [category_url] => https://xszav.com/category/17/1.html
                )
        )
)
						
					

Error Messages

The XSZAV API v1 uses the following error codes:

						
400	Bad Request – Your request sucks
404	Not Found – The specified video could not be found
429	Too Many Requests – You’re requesting too fast! Slow down!
5xx	Internal Server Error – We had a problem with our server. Try again later.
450	The maximum number of videos in the API response per page can't be bigger then 50!