BitView Logo
API Documentation

General Information

You need an BitView account to use a new version of the API. Click here if you already have account and want to use API.

All API responses are in JSON format.

Endpoints

1. Site Stats

GET /api.php?ty=stats&api_key={your_key}
Fetches BitView statistics.

Response

{
  "r": "success",
  "users": int,
  "banned_users": int,
  "videos": int,
  "total_views": int,
  "total_comments": int,
  "total_favorites": int,
  "total_ratings": int,
  "total_subs": int,
  "total_bulletins": int
}

2. User Info

GET /api.php?ty=user&ta={username}&api_key={your_key}
Fetches user information by username.

Response

{
  "r": "success",
  "username": string,
  "registered": string,
  "last_login": string,
  "videos_watched": int,
  "channel_views": int,
  "videos": int,
  "subscribers": int,
  "subscriptions": int,
  "friends": int,
  "channel_comments": int,
  "title": string or false,
  "description": string or false,
  "is_moderator": boolean,
  "country": string or false,
  "avatar": string
}

3. Video Info

GET /api.php?ty=video&ta={video_id}&api_key={your_key}
Fetches video information by video ID.

Response

{
  "r": "success",
  "url": string,
  "title": string,
  "description": string,
  "category": string,
  "tags": string,
  "upload_date": string,
  "upload_by": string,
  "duration": string,
  "ranking_views": int,
  "rankings": [
    int,
    int,
    int,
    int,
    int
  ],
  "display_views": int,
  "comment_num": int,
  "is_featured": boolean
}

Error Response

For all endpoints, the following error response is returned when there's a problem with the request:

{
  "r": "fail",
  "code": int
}

Copyright © 2017-2023 BitView