---
title: "Find Media By Embed Location"
method: GET
path: "/analytics/account/media_by_embed_location"
tags: ["Analytics:Account"]
---

# Find Media By Embed Location

`GET /analytics/account/media_by_embed_location`

## Request

- Base URL: `https://api.wistia.com/modern`
- URL: `https://api.wistia.com/modern/analytics/account/media_by_embed_location`
- Auth: HTTP bearer

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 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](https://docs.wistia.com/reference/post_expiring-token)
created with the `all:delegate_to_contact_permissions` scope and an
`account` authorization granting the `view-stats` permission can also
be used.

## Query parameters

- `embed_url` string, required
- `start_date` string, date
- `end_date` string, date
- `path_match` 'exact' | 'prefix'
- `per_page` integer

## Headers

- `X-Wistia-API-Version` string, required

## Response `200`

Success response with the hashed IDs of media embedded at the location.

- object
  - `media_hashed_ids` string[]: Hashed IDs of media embedded at the location, ranked by plays.

## Other responses

- `400`: Bad request
- `401`: Unauthorized, invalid or missing token
- `403`: Forbidden, token is valid but account does not have access to feature
- `422`: Unprocessable entity
- `500`: Internal server error
- `503`: Analytics service is temporarily unavailable

---

[API](https://skmtc.dev/wistia/apis/analytics-api.md) - [All operations](https://skmtc.dev/wistia/apis/analytics-api/llms.txt) - [OpenAPI document](https://skmtc.dev/wistia/apis/analytics-api/revisions/51b37cd3d37c?raw)
