Skip to content

TikTok-is-Live is a TypeScript library for checking if a TikTok user is live and retrieving live stream data and other relevant details.

Notifications You must be signed in to change notification settings

robke96/TikTok-is-Live

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TikTok-is-Live

GitHub Issues or Pull Requests GitHub code size in bytes GitHub Repo stars

Table of Contents

Description

TikTok-is-Live is an unofficial TikTok API that allows you to check if a TikTok user is live and retrieve live stream and user details.

Install

  • NPM
npm install tiktok-is-live

Usage

import TikTok from "tiktok-is-live";

const username = 'USERNAME';

TikTok.getUser(username)
    .then(result => {
        console.log('User data: ', result);
})

Result

ApiResponse
{
  isLive: boolean
  data: {
    user: {
      avatarLarger: string | URL
      avatarMedium: string | URL
      avatarThumb: string | URL
      id: string
      nickname: string
      secUid: string
      secret: boolean
      uniqueId: string
      verified: boolean
      roomId: string
      signature: string
      status: number
      followStatus: number
    }
    stats: {
      followingCount: number
      followerCount: number
    }
    liveRoom: {
      coverUrl: string | URL
      title: string
      startTime: number
      status: number
      paidEvent: {
        event_id: number
        paid_type: number
      }
      liveSubOnly: number
      liveRoomMode: number
      hashTagId: number
      gameTagId: number
      liveRoomStats: {
        userCount: number
      }
      streamData: {
        pull_data: {
          options: {
            default_quality: {
              icon_type: number
              level: number
              name: string
              resolution: string
              sdk_key: string
              v_codec: string
            }
            qualities: {
              icon_type: number
              level: number
              name: string
              resolution: string
              sdk_key: string
              v_codec: string
            }[]
            show_quality_button: boolean
          }
          stream_data: string
        }
      }
      streamId: string
      multiStreamScene: number
      multiStreamSource: number
      hevcStreamData: {
        pull_data: {
          options: {
            default_quality: {
              icon_type: number
              level: number
              name: string
              resolution: string
              sdk_key: string
              v_codec: string
            }
            qualities: {
              icon_type: number
              level: number
              name: string
              resolution: string
              sdk_key: string
              v_codec: string
            }[]
            show_quality_button: boolean
          }
          stream_data: string
        }
      }
    }
  }
  message: string
  extra: {
    id: string
  }
  statusCode: number
}

About

TikTok-is-Live is a TypeScript library for checking if a TikTok user is live and retrieving live stream data and other relevant details.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published