Last updated: 4 July 2026
YouTube
LiveQuery channel analytics, video performance, and audience data from your YouTube account.
Who needs this: Marketing teams and content creators who want AI to surface video performance data and audience insights without logging into YouTube Studio.
Example questions once connected
- Which video got the most views this month?
- What is our channel's subscriber count today?
- Show me watch time and retention for the June product demo
- Search for our videos about M-Pesa integration
Step-by-step setup
- Open the connector in your Msharti dashboard. Go to Connectors → YouTube → Connect. Msharti creates a unique OAuth link. Click Open in Browser.
- Log in with your YouTube account. A consent screen lists what Msharti can access. Review the permissions and click Accept or Continue.
- Confirm the connection in Msharti. You will be redirected back to the dashboard. The connector shows Connected with a green dot. Tokens are stored securely and refreshed automatically.
Tool reference
These are the tools the AI can call on this connector. Each tool fires automatically when you ask a relevant question.
list_videos() List videos on the connected YouTube channel with view counts and publish dates. Inputs optional: max_results, order (date/viewCount/rating), published_after
Try asking "Show me our 10 most viewed videos this year"
Returns Top 10: 1. "Msharti Demo — M-Pesa in 60s" (24,312 views, 15 Jan). 2. "KRA TCC checker walkthrough" (18,204, 8 Feb). 3. "Copilot + Msharti setup" (12,018, 4 Mar).
get_analytics() Return analytics data for a video or the full channel over a date range. Inputs optional: video_id, metrics (views/watchTime/subscribers/revenue), date_range
Try asking "How many views and minutes watched did we get this month?"
Returns June 2026: 48,410 views, 124,820 minutes watched. Avg view duration: 2m 34s. Subscribers gained: +312.
get_channel_stats() Return current channel statistics: subscriber count, total views, video count. Inputs none
Try asking "What is our YouTube subscriber count right now?"
Returns Channel: Msharti Platform. Subscribers: 4,218. Total views: 312,040. Videos: 34. Last upload: 5 days ago.
search_videos() Search the channel's video library by keyword. Inputs query string, optional: max_results
Try asking "Find all videos about the KRA connector"
Returns 3 videos: "KRA TCC checker walkthrough" (18,204 views), "KRA PIN lookup demo" (4,812 views), "KRA + M-Pesa compliance automation" (2,301 views).
get_comments() Retrieve top comments for a video. Inputs video_id or title keyword, optional: max_results, order (time/relevance)
Try asking "What are people saying in the comments on our M-Pesa demo video?"
Returns Top 5 comments on "Msharti Demo — M-Pesa in 60s": "This is exactly what we needed for our SACCO" (42 likes), "Does it work with Till numbers?" (18 likes), "When is the CRB connector live?" (12 likes).
Limits
- YouTube Analytics API quota: 200 units/day by default. Msharti caches analytics responses for 1 hour to stay within quota.
- Revenue data (AdSense) requires the YouTube channel to be monetised and the OAuth scope to include yt-analytics-monetary.readonly.
- Comments are read-only — the AI cannot post or delete comments in this version.
Need help? [email protected] — Nairobi-based, same time zone.