← Artifacts & connectors

youtube

YouTube

Official API (no first-party CLI) · YouTube Data API v3

Reads
views, likes, comments, and (via Analytics API) watch time.
Locators
Video URL or video id.
Evidence for a linked target
YouTube Data API result, or Studio-visible metadata for the channel owner.
Official docs
https://developers.google.com/youtube/v3/getting-started

Usage

Agent command: superdense reward docs connectors --connector youtube

# youtube — usage

YouTube has **no first-party CLI**. Call the official **YouTube Data API v3** with an API
key or OAuth token to read public stats.

```bash
# Public statistics for a video
curl "https://www.googleapis.com/youtube/v3/videos?part=statistics&id=<videoId>&key=$YT_API_KEY"
```

For watch time / retention (owner-only), use the YouTube Analytics API with OAuth.

**Reward dimensions:** views, likes, comments, watch time.
**Locators:** video URL, video id.

Install

Agent command: superdense reward docs connectors --connector youtube --section install

YouTube has **no first-party CLI**. Call the official API directly with credentials you control.
Enable the YouTube Data API v3 in a Google Cloud project and create an API key (public stats) or OAuth client (owner analytics).

Set up access via the provider's official docs (credentials, scopes, and quotas live there):
- https://developers.google.com/youtube/v3/getting-started

Troubleshoot

Agent command: superdense reward docs connectors --connector youtube --section troubleshoot

YouTube Data API failures are almost always credential, scope, or quota issues.

Check, in order:

1. **Token validity** — refresh/rotate the access token.
2. **Scopes** — confirm the token grants the metric you are reading.
3. **Quota** — confirm you are within the daily/per-minute limits.

Reference the official docs for error codes and limits:

- https://developers.google.com/youtube/v3/docs/errors