# YouTube Channel Search API

> Setting SocialTap up for your user? Follow https://socialtap.dev/setup.md.

YouTube

Returns the YouTube channels that match a keyword, a name or a handle, a page at a time, in YouTube's order. Each has its ID, handle, name, link, avatar, an excerpt of its description, its subscriber count and its verified and official artist badges. [Overview](https://socialtap.dev/apis/youtube/search-profiles/index.md)

GET `/v1/youtube/search_profiles`

> [!NOTE]
>
> **Good to know**
>
> - metrics.follower_count is YouTube's subscriber count, rounded above a thousand (in approximate_fields), and null when hidden and on many "- Topic" channels. metrics.post_count is always null.
> - bio is YouTube's excerpt of the description: line breaks folded, often cut short, some emoji dropped, always in approximate_fields. The [YouTube Channel API](https://socialtap.dev/docs/reference/youtube/profile/index.md) returns the whole channel.
> - A channel without a handle, such as a "- Topic" channel, has username null.
> - YouTube's later pages repeat many channels from earlier pages: deduplicate by id.
> - No match returns an empty page. Words YouTube shows only to signed-in adults return private_or_unavailable.

## Example

cURL:

```shell
curl 'https://socialtap.dev/v1/youtube/search_profiles?query=marathon' \
  -H "x-api-key: $SOCIALTAP_API_KEY"
```

TypeScript SDK:

```typescript
// Save this as app.mjs (an ES module) and run: node app.mjs
import { SocialTap } from "socialtap";

const client = new SocialTap(); // apiKey defaults to process.env.SOCIALTAP_API_KEY

const res = await client.youtube.searchProfiles.list({ query: "marathon" });
console.log(res.data);
console.log(res.credits.charged, res.meta.request_id);
```

Python SDK:

```python
from socialtap import SocialTap

client = SocialTap()  # api_key defaults to os.environ["SOCIALTAP_API_KEY"]

res = client.youtube.search_profiles.list(query="marathon")
print(res.data)
print(res.credits.charged, res.meta.request_id)
```

Go SDK:

```go
package main

import (
	"context"
	"fmt"
	"log"

	socialtap "socialtap.dev/sdk/go"
)

func main() {
	ctx := context.Background()
	client, err := socialtap.NewClient() // the API key defaults to $SOCIALTAP_API_KEY
	if err != nil {
		log.Fatal(err)
	}
	res, err := client.YouTube.SearchProfiles.List(ctx, socialtap.YouTubeSearchProfilesParams{Query: "marathon"})
	if err != nil {
		log.Fatal(err)
	}
	fmt.Println(res.Data)
	fmt.Println(res.Credits.Charged, res.Meta.RequestID)
}
```

200 OK:

```json
{
  "data": [
    {
      "approximate_fields": [
        "metrics.follower_count",
        "bio"
      ],
      "avatar_url": "https://yt3.ggpht.com/NUH9Z4rygvd4AsBi7HY1TxK7KLPwLH0Kbat-NIuVtSvCgULO97c6x6MOdTV7hKbGwt5RCLnuCxc=s176-c-k-c0x00ffffff-no-rj-mo",
      "banner_url": null,
      "bio": "Explore the lost colony of Tau Ceti IV, scavenging valuable loot in a high-stakes survival first person shooter from the creators of ...",
      "category": null,
      "country_code": null,
      "created_at": null,
      "display_name": "Marathon",
      "external_links": [],
      "id": "UCBsbrudhKRrT9zs8iNOEjjw",
      "is_private": false,
      "is_verified": true,
      "location": null,
      "metrics": {
        "follower_count": 204000,
        "following_count": null,
        "post_count": null,
        "total_like_count": null,
        "total_view_count": null
      },
      "platform": "youtube",
      "platform_specific": {
        "youtube": {
          "is_business_email_listed": null,
          "is_official_artist_channel": false,
          "is_subscriber_count_hidden": false,
          "keywords": []
        }
      },
      "type": "unknown",
      "unknown_fields": [
        "external_links",
        "platform_specific.youtube.keywords"
      ],
      "url": "https://www.youtube.com/channel/UCBsbrudhKRrT9zs8iNOEjjw",
      "username": "MarathonTheGame"
    }
  ],
  "page": {
    "has_more": true,
    "next_cursor": "c1.EXAMPLE_CURSOR",
    "next_cursor_expires_at": "2026-10-26T12:00:00Z",
    "end_reason": null
  },
  "meta": {
    "request_id": "req_3f9c2a7d1e8b4c6a9f0e2d4b6a8c0e1f",
    "platform": "youtube",
    "source": "api",
    "is_cached": false,
    "credits_charged": 1,
    "latency_ms": 1000,
    "fetched_at": "2026-10-25T12:00:00Z",
    "input": null,
    "credits_remaining": 9999,
    "client_request_id": null,
    "warnings": []
  }
}
```

The first item of the page; long arrays and strings are shortened for display.

## Query parameters

| Name | Type | Description | Example |
| --- | --- | --- | --- |
| `query` required | `string`<br>max 500 chars | Words, a name or a handle (@mrbeast), in any language, matched by YouTube's channel search as on youtube.com against channels' names, handles and descriptions. | `marathon` |
| `limit` optional | `integer`<br>min 1<br>max 20 | Items per page, up to the endpoint's page size (the default; larger values are reduced to it). Every page costs the same, so a smaller limit makes a walk cost more. | `20` |
| `cursor` optional | `string` | page.next_cursor from the previous response, with the other parameters unchanged. Omit for the first page. | — |

Every endpoint also accepts [`max_age`](https://socialtap.dev/docs/reference/index.md#common-params), [`max_credits`](https://socialtap.dev/docs/reference/index.md#common-params) and [`fields`](https://socialtap.dev/docs/reference/index.md#common-params).

## Response

`{data, page, meta}`: `data` is an array of [profile](https://socialtap.dev/resources/profile/index.md) objects, `page` says how to get the next page. Fields only YouTube has are under `platform_specific.youtube`. [`meta`](https://socialtap.dev/docs/reference/index.md#meta) describes the request.

| Field | Type | Description |
| --- | --- | --- |
| `data[].id` | `string` | Platform-native account ID (string), exactly as the platform writes it, its prefix included. |
| `data[].username` | `string` or `null` | Handle without the @; null when the account has none. |
| `data[].display_name` | `string` or `null` | Display name, channel title or page name; null when empty or not exposed. |
| `data[].url` | `string` (uri) | Canonical profile URL. |
| `data[].type` | `string` | Coarse account kind, as the platform labels it; unknown when it does not. New values may be added; treat unknown values as unknown.<br>One of `person`, `organization`, `community`, `unknown` |
| `data[].bio` | `string` or `null` | Profile bio, channel description or page about text; null when empty or not exposed. |
| `data[].avatar_url` | `string` (uri) or `null` | Profile picture URL (largest available). Platform CDN URLs can expire within hours. |
| `data[].banner_url` | `string` (uri) or `null` | Header or cover image URL. |
| `data[].is_verified` | `boolean` or `null` | Platform verification badge; null where the platform has no badge. |
| `data[].is_private` | `boolean` or `null` | True when the account's posts are not public. |
| `data[].category` | `string` or `null` | Platform category label (e.g. Musician, Media & Entertainment), as shown; not normalized. Often set only for business or creator accounts. |
| `data[].external_links` | `object[]` | Links in the bio or channel links; \[\] if none or not exposed. |
| `data[].external_links[].url` | `string` (uri) | Link target, absolute (https:// is added where the platform stores the link without a scheme). |
| `data[].external_links[].title` | `string` or `null` | Link label shown by the platform. |
| `data[].location` | `string` or `null` | Self-declared location text. |
| `data[].country_code` | `string` or `null` | ISO 3166-1 alpha-2 country the platform states for the account. |
| `data[].created_at` | `string` (date-time) or `null` | Account creation or join date, RFC 3339 UTC (some platforms give only the day: see approximate_fields). |
| `data[].metrics` | `object` | Counts at fetch time; null = not shown, 0 = zero. |
| `data[].metrics.follower_count` | `integer` or `null` | YouTube: subscribers. Followers or subscribers. |
| `data[].metrics.following_count` | `integer` or `null` | Accounts this profile follows. |
| `data[].metrics.post_count` | `integer` or `null` | Posts or videos as the platform counts them on the profile (for a private account, posts the caller cannot see). |
| `data[].metrics.total_like_count` | `integer` or `null` | Likes received across all of the profile's posts (not likes given). |
| `data[].metrics.total_view_count` | `integer` or `null` | Lifetime views across all of the profile's posts. |
| `data[].platform_specific.youtube` | `object` or `null` | A YouTube channel's own fields. |
| `data[].platform_specific.youtube.keywords` | `string[]` | The channel's keywords as its owner wrote them, a quoted phrase as one keyword; \[\] when it has none (or unknown: see unknown_fields). |
| `data[].platform_specific.youtube.is_official_artist_channel` | `boolean` or `null` | True for an Official Artist Channel (the note badge after its name), false for any other channel; null when the page shows no badge row (YouTube's built-in channels). |
| `data[].platform_specific.youtube.is_subscriber_count_hidden` | `boolean` or `null` | True when the channel hides its subscriber count (metrics.follower_count is then null), false when YouTube shows it; null when neither its About panel nor its header was seen. |
| `data[].platform_specific.youtube.is_business_email_listed` | `boolean` or `null` | True when the channel lists a business email (shown to signed-in users only; the address is not returned); null otherwise, since YouTube shows nothing for a channel without one. |
| `data[].approximate_fields` | `string[]` | JSON paths of values rounded by the platform or parsed from display text (metrics.follower_count). A list path (external_links) means the list may be incomplete. \[\] when all exact. |
| `data[].unknown_fields` | `string[]` | JSON paths of lists whose \[\] means unknown, not none (a source that cannot see them). \[\] when every list is known. |

Besides [the errors any request can return](https://socialtap.dev/docs/errors/index.md): [`not_found`](https://socialtap.dev/docs/errors/index.md#not_found) (404) and [`private_or_unavailable`](https://socialtap.dev/docs/errors/index.md#private_or_unavailable) (403) when the item can't be returned; [`invalid_cursor`](https://socialtap.dev/docs/errors/index.md#invalid_cursor) (400).

## Pagination

Send the same request with `cursor` set to `page.next_cursor` until `page.has_more` is `false`. [Pagination](https://socialtap.dev/docs/pagination/index.md)

- **Order**: YouTube's relevance ranking (its search order)
- **Page size**: Up to 20 channels (the default; `limit` lowers it)
- **Cursor lifetime**: 1 hour

## Pricing

**1 credit** per successful page ($0.75–$1.97 per 1,000). Failed requests are free. [How credits work](https://socialtap.dev/docs/credits/index.md)

Endpoint ID `youtube.search_profiles` · operationId `youtube.search_profiles.list`

---

[HTML version](https://socialtap.dev/docs/reference/youtube/search-profiles/) · [Docs index for AI agents](https://socialtap.dev/llms.txt) · [All docs in one file](https://socialtap.dev/llms-full.txt)
