pub async fn fetch_channel_info(username: &str) -> Result<ChannelInfo>Expand description
Fetch public channel information from Kick’s v2 API.
⚠️ Unofficial API — This uses Kick’s internal v2 API
(/api/v2/channels/{slug}), not the public API. It may change or break
without notice.
Returns chatroom settings, subscriber badges, user profile, and livestream status for any channel. No authentication required.
This uses curl as a subprocess because Kick’s Cloudflare protection blocks
HTTP libraries based on TLS fingerprinting. curl ships with Windows 10+,
macOS, and virtually all Linux distributions.
§Example
use kick_api::fetch_channel_info;
let info = fetch_channel_info("xqc").await?;
// Chatroom settings
println!("Chatroom ID: {}", info.chatroom.id);
println!("Slow mode: {}", info.chatroom.slow_mode);
println!("Followers only: {}", info.chatroom.followers_mode);
// Subscriber badges
for badge in &info.subscriber_badges {
println!("{}mo badge: {}", badge.months, badge.badge_image.src);
}
// Livestream status
if let Some(stream) = &info.livestream {
println!("{} is live with {} viewers", info.slug, stream.viewer_count);
}