Welcome to the LiveViewCountAPI!
This API provides real-time viewership statistics for YouTube live videos. By supplying the video ID as input, you can retrieve up-to-the-minute data on the number of viewers currently tuned into your live stream.
Endpoint
POST /snipe
Request Body
video_id
(string, required) - The unique identifier of the YouTube videoPOST https://live-view-count-api.p.rapidapi.com/snipe
Body: { "video_id": "jfKfPfyJRdk" }
{
"watchCount": "13793",
"streamingFrom": "Started streaming on Jul 12, 2022",
"title": "lofi hip hop radio ๐ - beats to relax/study to",
"description": "๐ผ | Listen on Spotify, Apple music and more\nโ https://fanlink.to/lofigirl-music\n\n๐ | Lofi Girl on all social media\nโ https://fanlink.to/lofigirl-social\n\n๐ | Lofi Girl merch\nโ https://bit.ly/Iofigirl-shop\n\n๐ญ | Create your lofi avatar now\nโ https://lofigirl.com/generator/\n\n๐ฌ | Join the Lofi Girl community\nโ https://bit.ly/lofigirl-discord\nโ https://bit.ly/lofigirl-reddit\n\n๐ถ | Radio tracklist\nโ https://bit.ly/lofi-tracklist\n\n๐จ | Art by Lofi Studio (full list of artists here)\nโ https://www.instagram.com/p/CuChqFXs08M/\n\n๐ | Submit your music / art\nโ https://bit.ly/lofi-submission\n\n๐ค Thank you for listening, I hope you will have a good time here"
}
In the event of an error, the API will return an appropriate HTTP status code along with a JSON response containing an error message.
For example, if the video_id is not currently live streaming:
{
"message": "Video isn't streaming"
}
curl --request POST \
--url https://live-view-count-api.p.rapidapi.com/snipe \
--header 'X-RapidAPI-Host: live-view-count-api.p.rapidapi.com' \
--header 'X-RapidAPI-Key: <RAPID_API_KEY>' \
--header 'content-type: application/json' \
--data '{
"video_id": "jfKfPfyJRdk"
}