---
updatedAt: 2026-05-04T14:42:05.000Z
agentTools:
  projectIndex: https://docs.wistia.com/llms.txt
---

# Show Media Embed Locations Timeseries

Retrieve timeseries analytics for a video broken down by embed location. Returns
an array of timestamped buckets, each containing metrics for the top embed
locations (ranked by the chosen metric) plus an "All other" entry aggregating
the remaining locations.

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](https://docs.wistia.com/reference/post_expiring-token)
created with the `all:delegate_to_contact_permissions` scope and an
authorization granting the `view-stats` permission on this media 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:Media"
    }
  ],
  "paths": {
    "/analytics/medias/{mediaId}/embed_locations_timeseries": {
      "get": {
        "summary": "Show Media Embed Locations Timeseries",
        "x-speakeasy-group": "analyticsMedia",
        "x-speakeasy-name-override": "getEmbedLocationsTimeseries",
        "description": "Retrieve timeseries analytics for a video broken down by embed location. Returns\nan array of timestamped buckets, each containing metrics for the top embed\nlocations (ranked by the chosen metric) plus an \"All other\" entry aggregating\nthe remaining locations.\n\nThe date range between `start_date` and `end_date` must not exceed 2 years.\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\nauthorization granting the `view-stats` permission on this media can also\nbe used.\n\n",
        "parameters": [
          {
            "name": "mediaId",
            "in": "path",
            "description": "The hashed ID of the video.",
            "required": true,
            "schema": {
              "description": "The hashed ID of the media (e.g., \"4d23503f70\")",
              "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.",
            "required": true,
            "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.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "granularity",
            "in": "query",
            "description": "The time granularity for the timeseries data.",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "daily",
                "weekly",
                "monthly"
              ]
            }
          },
          {
            "name": "sort_by",
            "in": "query",
            "description": "The metric used to rank and select the top embed locations.",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "plays",
                "loads",
                "engagement_rate",
                "play_rate",
                "played_time",
                "unique_visitors"
              ],
              "default": "plays"
            }
          },
          {
            "name": "embed_url",
            "in": "query",
            "description": "Filter results to a single embed URL. When provided, only analytics for\nthe page matching this URL are returned. The protocol is optional (https is assumed).\n",
            "required": false,
            "schema": {
              "type": "string",
              "example": "https://example.com/landing-page"
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "description": "Number of top embed locations per time bucket (max 100). Remaining locations are aggregated into an \"All other\" entry.",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 5,
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "X-Wistia-API-Version",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "default": "2026-09"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success response with embed location timeseries data.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "unevaluatedProperties": false,
                    "properties": {
                      "timestamp": {
                        "description": "The start of the time bucket in ISO 8601 format.",
                        "type": "string",
                        "format": "date-time"
                      },
                      "entries": {
                        "description": "Embed location metrics for this time bucket. Contains the top locations (ranked by the chosen metric) and optionally an \"All other\" entry.",
                        "type": "array",
                        "items": {
                          "type": "object",
                          "unevaluatedProperties": false,
                          "properties": {
                            "embed_domain": {
                              "description": "The domain where the video is embedded. Null for the \"All other\" entry.",
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "embed_path": {
                              "description": "The path on the domain where the video is embedded. Null for the \"All other\" entry.",
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "embed_url": {
                              "description": "The full URL where the video is embedded. Null for the \"All other\" entry.",
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "page_title": {
                              "description": "The title of the page where the video is embedded. \"All other\" for the aggregated remainder entry.",
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "loads": {
                              "description": "The number of video loads from this location.",
                              "type": [
                                "integer",
                                "null"
                              ]
                            },
                            "unique_loads": {
                              "description": "The number of unique video loads from this location (one per visitor session).",
                              "type": [
                                "integer",
                                "null"
                              ]
                            },
                            "plays": {
                              "description": "The number of video plays from this location.",
                              "type": [
                                "integer",
                                "null"
                              ]
                            },
                            "unique_plays": {
                              "description": "The number of unique video plays from this location (one per visitor session).",
                              "type": [
                                "integer",
                                "null"
                              ]
                            },
                            "play_rate": {
                              "description": "The play rate from this location (between 0 and 1).",
                              "type": [
                                "number",
                                "null"
                              ],
                              "format": "float"
                            },
                            "played_time": {
                              "description": "Total time spent watching from this location in seconds.",
                              "type": [
                                "number",
                                "null"
                              ],
                              "format": "float"
                            },
                            "engagement_rate": {
                              "description": "The average engagement rate from this location (between 0 and 1).",
                              "type": [
                                "number",
                                "null"
                              ],
                              "format": "float"
                            },
                            "unique_visitors": {
                              "description": "The number of unique visitors from this location.",
                              "type": [
                                "integer",
                                "null"
                              ]
                            },
                            "cta_conversion_rate": {
                              "description": "The CTA conversion rate from this location (between 0 and 1).",
                              "type": [
                                "number",
                                "null"
                              ],
                              "format": "float"
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "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"
                      ]
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Media not found or does not belong to account",
            "content": {}
          },
          "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:Media"
        ],
        "x-readme": {
          "code-samples": [
            {
              "name": "Typescript (SDK)",
              "language": "javascript",
              "code": "import { Wistia } from \"@wistia/wistia-api-client\";\nimport { RFCDate } from \"@wistia/wistia-api-client/types\";\n\nconst wistia = new Wistia({\n  bearerAuth: process.env[\"WISTIA_BEARER_AUTH\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await wistia.analyticsMedia.getEmbedLocationsTimeseries({\n    mediaId: \"<id>\",\n    startDate: new RFCDate(\"2025-02-07\"),\n    endDate: new RFCDate(\"2025-10-04\"),\n    granularity: \"weekly\",\n    embedUrl: \"https://example.com/landing-page\",\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"
    ]
  }
}
````