API DocsyoutubeSearchSearch channels
Search channels
What this API is for
- Search YouTube channels
- Only returns channel-type search results (filters out videos, playlists, etc.)
- Supports pagination to get more channels
GET
/openapi/api/v1/youtube/web_v2/search_channelsPrice:Price unavailable · Actual charges depend on free quota and account discounts
Authentication
All API requests require a Bearer project token in the Authorization header
Authorization header
Authorization: Bearer YOUR_API_TOKENRequest parameters
- keyword: Search keyword (required for first request)
- continuation_token: Pagination token (optional, for next page)
- need_format: Whether to format data (default true)
- true: Return formatted structured data (recommended)
- false: Return raw YouTube API structure (for debugging)
| Name | Location / type | Required | Notes | Example |
|---|---|---|---|---|
| keyword | query / string | null | No |
| Rick Astley |
| continuation_token | query / string | No |
| |
| need_format | query / boolean | No |
|
Request examples
curl -X GET "https://api.trmesh.com/openapi/api/v1/youtube/web_v2/search_channels" \ -H "Authorization: Bearer sdc_your_project_token" \ -H "Accept: application/json"
Response fields
- When need_format=true:
- keyword: Search keyword
- channels: Channels list
- channel_id: Channel ID (e.g., "UCjuNibFJ21MiSNpu8LZyV4w")
- title: Channel name
- handle: Channel custom handle (e.g., "@chaijing2023")
- subscriber_count_text: Subscriber count text (e.g., "1.11M subscribers")
- description: Channel description snippet
- thumbnails: Thumbnail list (multiple sizes)
- is_subscribed: Whether current user is subscribed to this channel (boolean)
- canonical_url: Channel canonical URL path (e.g., "/@chaijing2023")
- channel_url: Full channel URL (prefers custom URL)
- continuation_token: Next page pagination token
- has_more: Whether there are more channels
- total_count: Current page channel count
- When need_format=false:
- keyword: Search keyword
- channels: Raw channelRenderer object list
- continuation_token: Next page pagination token
- has_more: Whether there are more channels
- total_count: Current page channel count
| Field | Type | Notes | Example |
|---|---|---|---|
| keyword | unknown |
| |
| channels | unknown |
| |
| channel_id | unknown |
| |
| title | unknown |
| |
| handle | unknown |
| |
| subscriber_count_text | unknown |
| |
| description | unknown |
| |
| thumbnails | unknown |
| |
| is_subscribed | unknown |
| |
| canonical_url | unknown |
| |
| channel_url | unknown |
| |
| continuation_token | unknown |
| |
| has_more | unknown |
| |
| total_count | unknown |
|
Common response envelope
Common fields for response status, request identifiers and data
| Field | Type | Notes | Example |
|---|---|---|---|
| code | integer |
| |
| request_id | string | null |
| |
| message | string |
| |
| message_zh | string |
| |
| support | string |
| |
| time | string |
| |
| time_stamp | integer |
| |
| time_zone | string |
| |
| docs | string | null |
| |
| cache_message | string | null |
| |
| cache_message_zh | string | null |
| |
| cache_url | string | null |
| |
| router | string |
| |
| params | unknown |
| |
| data | unknown | null |
|
Errors and limits
The docs cover not only success responses, but also auth failures, rate limits, and data-service errors
| Code | Meaning | Notes |
|---|---|---|
| 200 | Success | The request completed and returned the standard response envelope. |
| 401 | Unauthorized | The token is missing, invalid, or no longer active. |
| 429 | Rate limited | The request exceeded token, user, or plan-level throughput limits. |
| 502 | Service unavailable | The gateway could not obtain a healthy result. Retry in a moment. |
Next steps
New to the API? Read the guide or explore examples