# Youtube (youtube.com) — Wrapped API

> **You are on:** `https://api.paywithlocus.com/api` | [llms.txt](https://paywithlocus.com/llms.txt) | [docs](https://docs.paywithlocus.com)
>
> Locus runs on multiple environments -- make sure every URL you call matches your expected environment.
> | Environment | Landing | API | Docs |
> |---|---|---|---|
> | Production | paywithlocus.com | api.paywithlocus.com | docs.paywithlocus.com |
> | Beta | beta.paywithlocus.com | api.beta.paywithlocus.com | docs.paywithlocus.com |
> | Stage | stage.paywithlocus.com | api.stage.paywithlocus.com | docs.paywithlocus.com |
>
> If the API URL above doesn't match your expected environment, re-fetch this file from the correct domain.

> Retrieve public YouTube channel information, discover featured channels and recommendations, and access liked videos playlists to understand what content creators are promoting and enjoying. Perfect for researching creator profiles, finding related channels, and exploring curated video collections without needing direct channel access.

**Category:** Streaming Video | **Website:** [www.youtube.com/@SuccessionBio/videos](https://www.youtube.com/@SuccessionBio/videos) | **Docs:** [parse.bot/marketplace/6efb1808-683c-4260-a0f7-094aafe71c69/youtube-com-api](https://parse.bot/marketplace/6efb1808-683c-4260-a0f7-094aafe71c69/youtube-com-api)

Pay-per-use API proxy. Each call is automatically billed to your wallet in USDC.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/parse-youtube-com-api-6efb1808/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_channel_live_status

Check whether a YouTube channel is currently live streaming. Inspects the channel's streams page for an active broadcast. Returns the live status and, when live, the stream's title, watch URL, current viewer count, and thumbnail. Viewer count is returned as a human-readable string exactly as YouTube renders it (e.g. '1.2K watching').

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `channel_handle` | string | Yes | YouTube channel handle, with or without the leading '@' (e.g. '@SkyNews' or 'SkyNews'). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-youtube-com-api-6efb1808/get_channel_live_status \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"channel_handle":"<string>"}'
```

### get_channel_videos

Retrieve videos from a YouTube channel's public videos page. Returns video IDs, titles, watch URLs, view counts, and relative publish timestamps. Supports sorting by latest (default), popular, or oldest. Automatically paginates through the channel's video grid to fulfill the requested limit. View counts and publish dates are returned as human-readable strings exactly as YouTube renders them (e.g. '21 views', '2 weeks ago').

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `channel_handle` | string | Yes | YouTube channel handle, with or without the leading '@' (e.g. '@SuccessionBio' or 'SuccessionBio'). |
| `limit` | integer | No | Maximum number of videos to return. The scraper paginates automatically to fulfill the limit. |
| `sort_by` | string | No | Sort order for videos. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-youtube-com-api-6efb1808/get_channel_videos \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"channel_handle":"<string>","limit":"<integer>","sort_by":"<string>"}'
```

### search_channels

Search YouTube for channels matching a topic or niche query, filtered to channel results only. For each channel found, visits the channel's About page to extract the full description and any publicly visible contact email. Returns channel metadata including handle, name, subscriber count, video count, profile picture, and contact email. Each result requires an additional About page fetch, so larger limits take proportionally longer.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `limit` | integer | No | Maximum number of channels to return per call. Each channel requires an additional About page request. |
| `niche` | string | Yes | Search query or topic to find YouTube channels (e.g. 'fitness', 'personal finance', 'cooking'). |
| `page` | integer | No | Page number for pagination. Each page returns up to limit channels. Increment across calls to get fresh non-duplicate results. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-youtube-com-api-6efb1808/search_channels \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"limit":"<integer>","niche":"<string>","page":"<integer>"}'
```
