# place.stream.media.getVideo

> Get a hydrated view of a place.stream.video record — the record itself plus author info plus aggregated view counts summed across every reporting node we've indexed. View counts come from place.stream.media.viewCount records; consumers see one number per metric, with the underlying multi-reporter detail collapsed away.

- Kind: query
- Authority: media.stream.place
- Lexicon: 1
- Published by [stream.place](https://lexicon.garden/identity/did:plc:rbvrr34edl5ddpuwcubjiost), not the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:rbvrr34edl5ddpuwcubjiost/place.stream.media.getVideo)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:rbvrr34edl5ddpuwcubjiost/place.stream.media.getVideo/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:rbvrr34edl5ddpuwcubjiost/place.stream.media.getVideo/analytics)

## Query (`place.stream.media.getVideo`)

Type: query · GET

### Parameters (query string)

- `uri` (string · at-uri, required): AT-URI of the place.stream.video record.

### Output (application/json)

- `schema` (ref)
  - Reference: `#videoView`

### Errors

- `VideoNotFound`: No record indexed at the supplied AT-URI.

## #videoView (`place.stream.media.getVideo#videoView`)

Type: object

### Properties

- `author` (ref, required)
  - Reference: `app.bsky.actor.defs#profileViewBasic`
- `cid` (string · cid, required)
- `likeCount` (integer, required): Total number of place.stream.like records whose subject is this video. Always present; zero when none, so consumers can render a count unconditionally.
  - Constraints: minimum: 0
- `record` (unknown, required)
- `tracks` (array)
  - `items` (ref)
    - Reference: `place.stream.media.track#trackView`
- `uri` (string · at-uri, required)
- `viewCounts` (ref, required): Aggregated view counts across every indexed reporter. Always present; zero-valued (count=0, reporters=0) when no place.stream.media.viewCount records have been observed yet, so consumers can render a count unconditionally.
  - Reference: `#viewCountSummary`

## #viewCountSummary (`place.stream.media.getVideo#viewCountSummary`)

Type: object

Sums across every place.stream.media.viewCount record indexed for this video, regardless of reporter or window. The underlying records are window-bounded; the consumer sees a running total.

### Properties

- `bytes` (integer, required): Sum of bytes transferred across every track row in every indexed report.
  - Constraints: minimum: 0
- `count` (integer, required): Sum of `count` across every indexed report.
  - Constraints: minimum: 0
- `durationMs` (integer, required): Sum of playback duration (ms) across every track row in every indexed report.
  - Constraints: minimum: 0
- `reporters` (integer, required): Number of distinct streamplace nodes that have contributed at least one viewCount record for this video.
  - Constraints: minimum: 0

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Get a hydrated view of a place.stream.video record — the record itself plus author info plus aggregated view counts summed across every reporting node we've indexed. View counts come from place.stream.media.viewCount records; consumers see one number per metric, with the underlying multi-reporter detail collapsed away.",
      "errors": [
        {
          "description": "No record indexed at the supplied AT-URI.",
          "name": "VideoNotFound"
        }
      ],
      "output": {
        "encoding": "application/json",
        "schema": {
          "ref": "#videoView",
          "type": "ref"
        }
      },
      "parameters": {
        "properties": {
          "uri": {
            "description": "AT-URI of the place.stream.video record.",
            "format": "at-uri",
            "type": "string"
          }
        },
        "required": [
          "uri"
        ],
        "type": "params"
      },
      "type": "query"
    },
    "videoView": {
      "properties": {
        "author": {
          "ref": "app.bsky.actor.defs#profileViewBasic",
          "type": "ref"
        },
        "cid": {
          "format": "cid",
          "type": "string"
        },
        "likeCount": {
          "description": "Total number of place.stream.like records whose subject is this video. Always present; zero when none, so consumers can render a count unconditionally.",
          "minimum": 0,
          "type": "integer"
        },
        "record": {
          "type": "unknown"
        },
        "tracks": {
          "items": {
            "ref": "place.stream.media.track#trackView",
            "type": "ref"
          },
          "type": "array"
        },
        "uri": {
          "format": "at-uri",
          "type": "string"
        },
        "viewCounts": {
          "description": "Aggregated view counts across every indexed reporter. Always present; zero-valued (count=0, reporters=0) when no place.stream.media.viewCount records have been observed yet, so consumers can render a count unconditionally.",
          "ref": "#viewCountSummary",
          "type": "ref"
        }
      },
      "required": [
        "uri",
        "cid",
        "author",
        "record",
        "viewCounts",
        "likeCount"
      ],
      "type": "object"
    },
    "viewCountSummary": {
      "description": "Sums across every place.stream.media.viewCount record indexed for this video, regardless of reporter or window. The underlying records are window-bounded; the consumer sees a running total.",
      "properties": {
        "bytes": {
          "description": "Sum of bytes transferred across every track row in every indexed report.",
          "minimum": 0,
          "type": "integer"
        },
        "count": {
          "description": "Sum of `count` across every indexed report.",
          "minimum": 0,
          "type": "integer"
        },
        "durationMs": {
          "description": "Sum of playback duration (ms) across every track row in every indexed report.",
          "minimum": 0,
          "type": "integer"
        },
        "reporters": {
          "description": "Number of distinct streamplace nodes that have contributed at least one viewCount record for this video.",
          "minimum": 0,
          "type": "integer"
        }
      },
      "required": [
        "count",
        "bytes",
        "durationMs",
        "reporters"
      ],
      "type": "object"
    }
  },
  "id": "place.stream.media.getVideo",
  "lexicon": 1
}
```
