Analytics:Account

Show Account Top Content

Rank the account's content by a chosen metric over a date range. Returns the top media, channels, or folders (controlled by group_by) with their analytics, answering questions like "what were my most-played videos last month?".

Optionally pass hashed_ids to scope the ranking to a specific set of media instead of the whole account — useful for fetching analytics for a known list of videos, still sorted by sort_by.

The date range between start_date and end_date must not exceed 2 years.

Requires api token with one of the following permissions

Read detailed stats

Tokens with the "Act with a team member's permissions" permission (all:delegate_to_contact_permissions scope) can also be used. Requests made with such a token are authorized using the permissions of the contact assigned to the token.

An expiring access token created with the all:delegate_to_contact_permissions scope and an account authorization granting the view-stats permission can also be used.

get/analytics/account/top_content

Request

  • Base URL
    https://api.wistia.com/modern
  • URL
    https://api.wistia.com/modern/analytics/account/top_content
  • Auth
    HTTP bearer

Query parameters

start_datestring date required

Start date for the analytics period in ISO 8601 format (YYYY-MM-DD). Inclusive — the range starts at the beginning of this date.

end_datestring date required

End date for the analytics period in ISO 8601 format (YYYY-MM-DD). Exclusive — the range ends before the beginning of this date.

group_by'media' | 'channel' | 'project'

The type of content to rank.

hashed_ids[]string[]

Scope the ranking to these specific media's hashed IDs, rather than the whole account. Only valid with group_by=media.

sort_by'plays' | 'loads' | 'play_rate' | 'engagement_rate' | 'played_time' | 'unique_visitors'

The metric to rank content by.

sort_direction'asc' | 'desc'

The sort direction.

per_pageinteger

Number of results to return. Defaults to the number of hashed_ids requested, or 10 when hashed_ids is not given.

Headers

X-Wistia-API-Versionstring required

Response

Success response with ranked content analytics. Entry shape depends on group_by.

Changes

No recorded changes to this operation across all 1 revision of this API.