# youtube.channel_videos

The videos on a YouTube channel's Videos tab, newest first: 30 by default, up to 300.

YouTube channel videos, one of the YouTube scrapers.

| | |
| --- | --- |
| Id | `youtube.channel_videos` |
| Version | 1 |
| Billed per | record — 1 unit for each record of a charged run |
| Runs | within one request |

Start it with `POST /v1/scrapers/youtube.channel_videos/runs`. How runs work is in [Running a scraper](https://docs.enrichednow.com/running-a-scraper.md); what a run costs is in [Usage and units](https://docs.enrichednow.com/usage-and-units.md).

## Inputs

The fields of `input`. A field that is not listed here is refused.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `channel` | string | yes | The channel: its address (youtube.com/@name, /channel/UC…, /c/name, /user/name), its handle (@name) or its id (UC…). Limit: at most 500 characters. |
| `max_results` | integer | no | The most videos to return, newest first. The tab loads 30 at a time, so a larger number takes longer. Limit: 1 to 300. Default: `30`. |

- The tab loads 30 videos at a time, newest first. `max_results` is 30 by default and goes up to 300; a larger number takes longer. If a later batch cannot be loaded, the run ends `partial` with the videos it has.
- A channel with no Videos tab, or with no videos, ends `ok` with zero records. A channel that does not exist ends the run `failed` with `not_found`, one YouTube shows a notice for — terminated, not available — with `channel_unavailable`.
- View counts are rounded, as YouTube shows them on the tab.
- Billed per record: a charged run costs 1 unit for each video it returns.

## Record fields

Every record of a run has these fields. A value that is not known is `null` — never an empty string and never `0`.

| Field | Type | Notes |
| --- | --- | --- |
| `position` | integer | Its place among the returned videos, from 1, in the tab's order (newest first). |
| `id` | string | The video id. |
| `url` | string | The video's address: youtube.com/watch?v=<id>. |
| `title` | string or null | The title as shown. |
| `channel_id` | string or null | The id (UC…) of the channel whose tab was read. |
| `channel_name` | string or null | That channel's name. |
| `published_text` | string or null | As shown ("4mo ago"). |
| `duration_text` | string or null | The length as shown on the thumbnail ("12:44"). |
| `duration_seconds` | integer or null | The length in seconds, read from `duration_text`; null when no length is shown. |
| `view_count_text` | string or null | As shown; the tab shows a rounded count beside a play icon ("123K"). |
| `view_count` | integer or null | The views as a number, when the text reads as one: the rounded figure the tab shows ("123K" is 123000). |
| `view_count_exact` | boolean or null | True when YouTube showed the count in full, false when it showed it rounded (123K); null when no count was read. |
| `badges` | array of string | The labels shown on the video's thumbnail, other than its length. |
| `thumbnails` | array of object | The video's thumbnail, in the sizes the page lists, smallest first. |
| `thumbnails[].url` | string | The image's address. |
| `thumbnails[].width` | integer or null | Its width in pixels, when the page states it. |
| `thumbnails[].height` | integer or null | Its height in pixels, when the page states it. |
| `is_live` | boolean or null | On air now (a stream on the Live tab); null where the tab does not say. |
| `live_viewers` | integer or null | People watching now, for a stream that is on air. |
| `is_upcoming` | boolean or null | A stream or premiere that is scheduled and has not started; `published_text` then holds the scheduled time as shown. |

## Example request

It starts a run with this scraper's example input and waits up to 60 seconds for it. The key is read from `ENRICHEDNOW_API_KEY`.

```bash
curl -X POST "https://api.enrichednow.com/v1/scrapers/youtube.channel_videos/runs?wait=60" \
  -H "Authorization: Bearer $ENRICHEDNOW_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"input":{"channel":"@RickAstleyYT"}}'
```

## Example response

The run, once it has ended. A run that has not ended within `wait` comes back with `202` and the status `queued` or `running`.

```json
{
  "id": "run_841742f37553189ff9c27ba1",
  "scraper_id": "youtube.channel_videos",
  "scraper_version": 1,
  "status": "ok",
  "reason": null,
  "input": {
    "channel": "@RickAstleyYT"
  },
  "record_count": 1,
  "units": 1,
  "units_per_request": null,
  "units_per_record": 1,
  "units_per_page": null,
  "diagnostics": {
    "requests": 1,
    "bytes": 259214,
    "wall_ms": 885,
    "facts": {}
  },
  "created_at": "2026-11-16T22:37:50.170950Z",
  "started_at": "2026-11-16T22:37:50.178331Z",
  "finished_at": "2026-11-16T22:37:51.066313Z"
}
```

Its records, from `GET /v1/runs/{id}/records`. The record is a real one: this scraper's own parser read it from a page recorded from the site.

```json
{
  "records": [
    {
      "position": 1,
      "id": "PXC_PYeB6F8",
      "url": "https://www.youtube.com/watch?v=PXC_PYeB6F8",
      "title": "Rick Astley - Angels On My Side (Live at The O2, London, April 2026)",
      "channel_id": "UCuAXFkgsw1L7xaCfnd5JJOw",
      "channel_name": "Rick Astley",
      "published_text": "4mo ago",
      "duration_text": "3:51",
      "duration_seconds": 231,
      "view_count_text": "123K",
      "view_count": 123000,
      "view_count_exact": false,
      "badges": [],
      "thumbnails": [
        {
          "url": "https://i.ytimg.com/vi/PXC_PYeB6F8/hq720.jpg?sqp=-oaymwEcCOgCEMoBSFXyq4qpAw4IARUAAIhCGAFwAcABBg==&rs=AOn4CLD7bnGmc-SJ__t5X8D9q1HOZipHrA",
          "width": 360,
          "height": 202
        },
        {
          "url": "https://i.ytimg.com/vi/PXC_PYeB6F8/hq720.jpg?sqp=-oaymwEcCNAFEJQDSFXyq4qpAw4IARUAAIhCGAFwAcABBg==&rs=AOn4CLDjichxht-_GtPETZ7g8ZB6-E32BQ",
          "width": 720,
          "height": 404
        }
      ],
      "is_live": null,
      "live_viewers": null,
      "is_upcoming": null
    }
  ],
  "next_cursor": null
}
```

A run does not always end `ok`. [Results and statuses](https://docs.enrichednow.com/results-and-statuses.md#reason-codes) lists every status and the reasons every scraper shares; [the reasons of the YouTube scrapers](https://docs.enrichednow.com/results-and-statuses.md#youtube) are in their own section there.
