Get YouTube analytics trend

Returns daily non-monetary YouTube Analytics rows for one connected YouTube account.
https://api.unipost.dev
GET/v1/accounts/:account_id/youtube/analytics/trend?{from}&{to}
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.

Response Body

200
social_account_idstring
UniPost account ID.
platformyoutube
Always youtube.
start_datestring
Applied report start date.
end_datestring
Applied report end date.
rows[]array
Daily rows sorted by day.
rows[].datestring
Day in YYYY-MM-DD format.
rows[].metricsobject
Non-monetary metrics for that day.
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.