---
updatedAt: 2026-09-15T19:29:07.000Z
agentTools:
  projectIndex: https://docs.wistia.com/llms.txt
---

# Find Media By Embed Location

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.



# OpenAPI definition

````json
{
  "openapi": "3.1.1",
  "info": {
    "title": "Analytics API",
    "description": "Wistia Analytics API - Bottler-powered analytics endpoints",
    "version": "2026.09.0"
  },
  "servers": [
    {
      "url": "https://api.wistia.com/modern"
    }
  ],
  "security": [
    {
      "BearerAuth": []
    }
  ],
  "tags": [
    {
      "name": "Analytics:Account"
    }
  ],
  "paths": {
    "/analytics/account/media_by_embed_location": {
      "get": {
        "summary": "Find Media By Embed Location",
        "x-speakeasy-group": "analyticsAccount",
        "x-speakeasy-name-override": "findMediaByEmbedLocation",
        "description": "Find the media embedded at a given URL. Returns the hashed IDs of the\naccount's media that recorded activity at that embed location during the\ndate range, ranked by plays. The resulting hashed IDs can be passed to\nother endpoints, such as Show Account Top Content's `hashed_ids[]` filter,\nto fetch analytics for those media.\n\nThe domain of `embed_url` is always matched exactly. Its path is matched\nexactly by default, or as a prefix with `path_match=prefix` (e.g.\n`/pricing` also matching `/pricing/plans`). A path that is empty or `/`\nis ignored, returning media across all paths on the domain.\n\nEmbed location data is retained for 6 months; a `start_date` older than\nthat returns a 422 error. When `start_date` and `end_date` are omitted,\nthe full 6-month queryable window is used.\n\n\n## Requires api token with one of the following permissions\n```\nRead detailed stats\n```\n\nTokens with the \"Act with a team member's permissions\" permission\n(`all:delegate_to_contact_permissions` scope) can also be used. Requests\nmade with such a token are authorized using the permissions of the\ncontact assigned to the token.\n\nAn [expiring access token](https://docs.wistia.com/reference/post_expiring-token)\ncreated with the `all:delegate_to_contact_permissions` scope and an\n`account` authorization granting the `view-stats` permission can also\nbe used.\n\n",
        "parameters": [
          {
            "name": "embed_url",
            "in": "query",
            "description": "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.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "start_date",
            "in": "query",
            "description": "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.",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "end_date",
            "in": "query",
            "description": "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.",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "path_match",
            "in": "query",
            "description": "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.",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "exact",
                "prefix"
              ],
              "default": "exact"
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "description": "Number of media hashed IDs to return (max 1000).",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 100,
              "minimum": 1,
              "maximum": 1000
            }
          },
          {
            "name": "X-Wistia-API-Version",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "default": "2026-09"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success response with the hashed IDs of media embedded at the location.",
            "content": {
              "application/json": {
                "schema": {
                  "unevaluatedProperties": false,
                  "type": "object",
                  "properties": {
                    "media_hashed_ids": {
                      "description": "Hashed IDs of media embedded at the location, ranked by plays.",
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "unevaluatedProperties": false,
                  "type": "object",
                  "properties": {
                    "error": {
                      "description": "Error message detailing the reason for the bad request.",
                      "type": "string",
                      "examples": [
                        "Bad request"
                      ]
                    },
                    "errors": {
                      "description": "Array of error messages detailing the reasons for the bad request.",
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized, invalid or missing token",
            "content": {
              "application/json": {
                "schema": {
                  "unevaluatedProperties": false,
                  "type": "object",
                  "properties": {
                    "code": {
                      "description": "A machine-readable identifier for the specific authorization failure.",
                      "type": "string",
                      "enum": [
                        "unauthorized_credentials",
                        "account_inactive",
                        "unauthorized_scope",
                        "unauthorized_params"
                      ]
                    },
                    "error": {
                      "type": "string",
                      "examples": [
                        "Invalid credentials."
                      ]
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden, token is valid but account does not have access to feature",
            "content": {
              "application/json": {
                "schema": {
                  "unevaluatedProperties": false,
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "examples": [
                        "Webinars are not available on your current plan"
                      ]
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable entity",
            "content": {
              "application/json": {
                "schema": {
                  "unevaluatedProperties": false,
                  "type": "object",
                  "properties": {
                    "error": {
                      "description": "Error message detailing why the request could not be processed.",
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "unevaluatedProperties": false,
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "examples": [
                        "Internal server error"
                      ]
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Analytics service is temporarily unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "unevaluatedProperties": false,
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "examples": [
                        "Analytics service is temporarily unavailable"
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "tags": [
          "Analytics:Account"
        ],
        "x-readme": {
          "code-samples": [
            {
              "name": "Typescript (SDK)",
              "language": "javascript",
              "code": "import { Wistia } from \"@wistia/wistia-api-client\";\n\nconst wistia = new Wistia({\n  bearerAuth: process.env[\"WISTIA_BEARER_AUTH\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await wistia.analyticsAccount.findMediaByEmbedLocation({\n    embedUrl: \"https://milky-jury.com/\",\n  });\n\n  console.log(result);\n}\n\nrun();"
            }
          ]
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "BearerAuth": {
        "type": "http",
        "scheme": "bearer"
      }
    }
  },
  "x-readme": {
    "samples-languages": [
      "javascript",
      "shell",
      "node",
      "python",
      "ruby"
    ]
  }
}
````