Get YouTube daily views
Returns daily view counts for a YouTube video including views, watch time, and subscriber changes. Requires yt-analytics.readonly scope (re-authorization may be needed). Data has a 2-3 day delay. Max 90 days, defaults to last 30 days.
API key authentication - use your Late API key as a Bearer token
In: header
Query Parameters
The YouTube video ID (e.g., "dQw4w9WgXcQ")
The Late account ID for the YouTube account
Start date (YYYY-MM-DD). Defaults to 30 days ago.
dateEnd date (YYYY-MM-DD). Defaults to 3 days ago (YouTube data latency).
dateResponse Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://getlate.dev/api/v1/analytics/youtube/daily-views?videoId=string&accountId=string"{
"success": true,
"videoId": "dQw4w9WgXcQ",
"dateRange": {
"startDate": "2025-01-01",
"endDate": "2025-01-12"
},
"totalViews": 12345,
"dailyViews": [
{
"date": "2025-01-12",
"views": 1234,
"estimatedMinutesWatched": 567.5,
"averageViewDuration": 45.2,
"subscribersGained": 10,
"subscribersLost": 2,
"likes": 89,
"comments": 12,
"shares": 5
},
{
"date": "2025-01-11",
"views": 987,
"estimatedMinutesWatched": 432.1,
"averageViewDuration": 43.8,
"subscribersGained": 8,
"subscribersLost": 1,
"likes": 67,
"comments": 8,
"shares": 3
}
],
"lastSyncedAt": "2025-01-15T12:00:00Z",
"scopeStatus": {
"hasAnalyticsScope": true
}
}{
"error": "videoId is required"
}{
"error": "Unauthorized"
}{
"error": "Analytics add-on required",
"code": "analytics_addon_required"
}{
"error": "Access denied to this account"
}{
"success": false,
"error": "To access daily video analytics, please reconnect your YouTube account to grant the required permissions.",
"code": "youtube_analytics_scope_missing",
"scopeStatus": {
"hasAnalyticsScope": false,
"requiresReauthorization": true,
"reauthorizeUrl": "https://accounts.google.com/o/oauth2/auth?client_id=..."
}
}{
"success": false,
"error": "string"
}Get LinkedIn post stats GET
Returns analytics for a specific LinkedIn post by URN. Works for both personal and organization accounts.
Get presigned upload URL POST
Get a presigned URL to upload files directly to cloud storage (up to 5GB). Returns an uploadUrl and publicUrl. PUT your file to the uploadUrl, then use the publicUrl in your posts.