Skip to Content
Mika Scraper 1.1.1 is released ๐ŸŽ‰
๐ŸŒŠ MIKA CLASSClass: YoutubeTracker

Mika Scraper v1.1.2


Mika Scraper / YoutubeTracker

Class: YoutubeTracker

Defined in: src/_other-scraper/youtube-tract.ts:46

The YoutubeTracker class enables the retrieval of YouTube channel statistics using the SocialCounts API.

Constructor

new YoutubeTracker

new YoutubeTracker(): YoutubeTracker

Returns

YoutubeTracker โ€” An instance of the YoutubeTracker class.

Methods

track()

track(username): Promise > YoutubeTrackResult

Defined in: src/_other-scraper/youtube-tract.ts:74

Fetches the subscriber data for the specified YouTube channel.

Parameters

username

string โ€” The name or ID of the YouTube channel to track.

Returns

Promise YoutubeTrackResult โ€” A promise that resolves to a YoutubeTrackResult object containing the formatted statistics of the channel.

Throws

  • An error if the specified channel is not found or if the API call fails.

Example

const yt = new YoutubeTracker(); const result = await yt.track("MrBeast"); console.log(result.channel.name);
Last updated on