Find Media By Embed Location
find_media_by_embed_locationFind Wistia media embedded at a URL and return hashed IDs ranked by plays for a date range, so you can fetch analytics for content at that location.
Instructions
Find the media embedded at a given URL. Returns the hashed IDs of the
account's media that recorded activity at that embed location during the
date range, ranked by plays. The resulting hashed IDs can be passed to
other endpoints, such as Show Account Top Content's hashed_ids[] filter,
to fetch analytics for those media.
The domain of embed_url is always matched exactly. Its path is matched
exactly by default, or as a prefix with path_match=prefix (e.g.
/pricing also matching /pricing/plans). A path that is empty or /
is ignored, returning media across all paths on the domain.
Embed location data is retained for 6 months; a start_date older than
that returns a 422 error. When start_date and end_date are omitted,
the full 6-month queryable window is used.
Requires api token with one of the following permissions
Read detailed statsTokens 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.
Read-only account operation.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| account | No | Named private Wistia account; selects credentials, not a remote account ID. | |
| end_date | No | End date for the analytics period in ISO 8601 format (YYYY-MM-DD). Exclusive — the range ends before the beginning of this date. Defaults to tomorrow, so today's activity is included. | |
| per_page | No | Number of media hashed IDs to return (max 1000). | |
| embed_url | Yes | The URL of the page to look up, e.g. `https://example.com/pricing`. The protocol is optional (https is assumed), so `example.com/pricing` also works. | |
| path_match | No | How to match the path of `embed_url` against embed locations. `exact` requires the path to match exactly; `prefix` matches any embed path starting with it. | exact |
| start_date | No | Start date for the analytics period in ISO 8601 format (YYYY-MM-DD). Inclusive — the range starts at the beginning of this date. Must be within the last 6 months. Defaults to 6 months ago, the start of the queryable window. |