# (Deprecated) Fetch stream usage by country for an account The GET /usage/accounts/countries operation is deprecated and no longer available. To retrieve viewer data for a country, use GET /analytics/viewers/account endpoint. Endpoint: GET /usage/accounts/countries Version: v1.11 ## Query parameters: - `filter` (string) Restricts the data that gets returned by filtering on one or more values associated with a field. Construct a filter using a two-part expression that specifies the field on which to filter and the logic to use to filter. Keep in mind the following for account trend filters: The only valid filter is resource. The only valid filter operators are eq with values of transcoders or vod_streams or in with a value of transcoders,vod_streams. Filters use a zero-based index. For example: filter0=resource&filter0=vod_streams - `from` (string) The start of the range of time you want to view. Specify YYYY-MM-DD HH:00:00 where HH is a 24-hour clock in UTC. The range doesn't include minutes and seconds and rounds minutes up to the hour. The maximum difference between from and to is 90 days. If you set the from query parameter without setting the to query parameter, the data returned will reflect 90 days starting at the from date, or data up to to the current day, whichever is shorter. You can also specify last_bill_date. Default: last billing date - `to` (string) The end of the range of time you want to view. Specify YYYY-MM-DD HH:00:00 where HH is a 24-hour clock in UTC. The range doesn't include minutes and seconds and rounds minutes up to the hour. The maximum difference between from and to is 90 days. If you set the to query parameter without setting the from query parameter, the data returned will be from the past 90 days or from your last invoice date, whichever is shorter. You can also specify last_bill_date. Default: end of the current day ## Response 200 fields (application/json): - `countries` (object) Example: [{"code":"US","name":"United States","unique_viewers":1,"viewing_seconds":222,"avg_viewing_seconds":222,"viewing_bytes":12886},{"code":"CA","name":"Canada","unique_viewers":14,"viewing_seconds":222,"avg_viewing_seconds":16,"viewing_bytes":22886}] - `countries.code` (string) A country code where the stream was requested. - `countries.name` (string) The name of a country where the stream was requested. - `countries.unique_viewers` (integer) The total number of unique viewers to download at least one chunk of the stream at the target (for HTTP streams). A unique viewer is a single IP address; multiple users that share the same IP address are counted once. - `countries.viewing_seconds` (integer) The total length of time, in seconds, that the stream was played at the target. May be longer than the duration of the stream. - `countries.avg_viewing_seconds` (integer) The average length of time, in seconds, that the stream was played at the target. - `countries.viewing_bytes` (integer) The amount of content, in bytes, that went through the stream target during the selected time frame. - `limits` (object) The query parameters applied to the request. Example: {"resources":["transcoders","vod_streams"],"from":"2021-01-07T00:00:00.000Z","to":"2021-10-05T00:00:00.000Z"} - `limits.resources` (object) The resources represented in the response. Example: ["transcoders","vod_streams"] - `limits.resources.transcoders` (string) The response includes transcoders. - `limits.resources.vod_streams` (string) The response includes VOD streams. - `limits.from` (string) The start of the range of time represented in the response. Example: "2021-01-07T00:00:00.000Z" - `limits.to` (string) The end of the range of time represented in the response. Example: "2021-10-05T00:00:00.000Z" ## Response 401 fields (application/json): - `meta` (object, required) - `meta.status` (integer) - `meta.code` (string) - `meta.title` (string) - `meta.message` (string) - `meta.description` (string) - `meta.links` (array) ## Response 403 fields (application/json): - `meta` (object, required) - `meta.status` (integer) - `meta.code` (string) - `meta.title` (string) - `meta.message` (string) - `meta.description` (string) - `meta.links` (array) ## Response 404 fields (application/json): - `meta` (object, required) - `meta.status` (integer) - `meta.code` (string) - `meta.title` (string) - `meta.message` (string) - `meta.description` (string) - `meta.links` (array) ## Response 410 fields (application/json): - `meta` (object, required) - `meta.status` (integer) - `meta.code` (string) - `meta.title` (string) - `meta.message` (string) - `meta.description` (string) - `meta.links` (array) ## Response 422 fields (application/json): - `meta` (object, required) - `meta.status` (integer) - `meta.code` (string) - `meta.title` (string) - `meta.message` (string) - `meta.description` (string) - `meta.links` (array)