Get YouTube analytics top videos

Returns top YouTube video analytics rows for one connected YouTube account. YouTube requires maxResults of 200 or less for this report.
https://api.unipost.dev
GET/v1/accounts/:account_id/youtube/analytics/videos?{from}&{to}&{limit}
Authorization
In header · Bearer <token>
Path
string
Query

Authorization

AuthorizationBearer <token>In header
Workspace API key.

Path Params

account_idstring
Connected YouTube account ID.

Query Params

fromOptionalYYYY-MM-DD
Start date. Aliases: start_date, startDate. Defaults to the first day of the last 28 complete days.
toOptionalYYYY-MM-DD
End date. Aliases: end_date, endDate. Defaults to yesterday in UTC.
limitOptionalnumber
Maximum rows to return. Defaults to 25 and caps at 200.

Response Body

200
social_account_idstring
UniPost account ID.
platformyoutube
Always youtube.
start_datestring
Applied report start date.
end_datestring
Applied report end date.
videos[]array
Top video rows sorted by views descending.
videos[].video_idstring
YouTube video ID.
videos[].metricsobject
Non-monetary metrics for that video.
limitnumber
Limit applied to the request.
fetched_atstring
UTC fetch timestamp.
required_scopes[]string[]
Required provider scopes, including yt-analytics.readonly.
401
error.codestring
UNAUTHORIZED, NOT_FOUND, WRONG_PLATFORM, ACCOUNT_DISCONNECTED, NEEDS_RECONNECT, VALIDATION_ERROR, or UPSTREAM_ERROR.
error.normalized_codestring
Lowercase error code.
error.messagestring
Human-readable error message.
request_idstring
Request identifier for support.
404
error.codestring
UNAUTHORIZED, NOT_FOUND, WRONG_PLATFORM, ACCOUNT_DISCONNECTED, NEEDS_RECONNECT, VALIDATION_ERROR, or UPSTREAM_ERROR.
error.normalized_codestring
Lowercase error code.
error.messagestring
Human-readable error message.
request_idstring
Request identifier for support.
409
error.codestring
UNAUTHORIZED, NOT_FOUND, WRONG_PLATFORM, ACCOUNT_DISCONNECTED, NEEDS_RECONNECT, VALIDATION_ERROR, or UPSTREAM_ERROR.
error.normalized_codestring
Lowercase error code.
error.messagestring
Human-readable error message.
request_idstring
Request identifier for support.
422
error.codestring
UNAUTHORIZED, NOT_FOUND, WRONG_PLATFORM, ACCOUNT_DISCONNECTED, NEEDS_RECONNECT, VALIDATION_ERROR, or UPSTREAM_ERROR.
error.normalized_codestring
Lowercase error code.
error.messagestring
Human-readable error message.
request_idstring
Request identifier for support.
502
error.codestring
UNAUTHORIZED, NOT_FOUND, WRONG_PLATFORM, ACCOUNT_DISCONNECTED, NEEDS_RECONNECT, VALIDATION_ERROR, or UPSTREAM_ERROR.
error.normalized_codestring
Lowercase error code.
error.messagestring
Human-readable error message.
request_idstring
Request identifier for support.