Skip to main content

YouTube Channel Info API

Written by Kadri - RichAPI Support Team

POST /youtube_channel • Credits: 1 credit per call

YouTube Channel Info takes one YouTube channel URL and returns the public profile of that channel. The response holds the name, the channel ID, the subscriber count, the video count, the view count, the avatar, the banner and the external links. Each call costs 1 credit.

What does YouTube Channel Info do?

Creator research starts with one question: how large is this channel? YouTube Channel Info answers that question from a single channel URL. The endpoint reads the public About page of the channel and returns the profile fields as structured JSON. It needs no YouTube API key and no login. One call covers one channel. The endpoint returns the profile of the channel only. For the list of videos of the channel, use the YouTube Channel Videos API.

Which endpoint does YouTube Channel Info use?

  • Method: POST

  • URL: https://api.richapi.ai/api/v1/youtube_channel

  • Authentication: x-api-key header

  • Response: Synchronous JSON

  • Credits: 1 credit per call

How to send a YouTube Channel Info request

  1. Copy your API key from the RichAPI dashboard.

  2. Set the url parameter to the full channel URL, such as https://www.youtube.com/@MrBeast.

  3. To accept a cached result, set the cache parameter to true.

  4. Send a POST request to https://api.richapi.ai/api/v1/youtube_channel.

  5. Send the API key in the x-api-key header.

  6. Read the profile fields from the data object of the response.

CAUTION: Each YouTube Channel Info call costs 1 credit. A channel that returns incomplete data also costs 1 credit.

cURL

curl -X POST https://api.richapi.ai/api/v1/youtube_channel   
-H "x-api-key: YOUR_API_KEY"
-H "Content-Type: application/json"
-d '{
"url": "https://www.youtube.com/@MrBeast",
"cache": true
}'

Python

import requests

response = requests.post(
"https://api.richapi.ai/api/v1/youtube_channel",
headers={"x-api-key": "YOUR_API_KEY"},
json={
"url": "https://www.youtube.com/@MrBeast",
"cache": True,
},
timeout=60,
)
response.raise_for_status()
channel = response.json()["data"]
print(channel["name"], channel["subscriber_count"], channel["video_count"])

Node.js

const response = await fetch("https://api.richapi.ai/api/v1/youtube_channel", {
method: "POST",
headers: {
"x-api-key": "YOUR_API_KEY",
"Content-Type": "application/json",
},
body: JSON.stringify({
url: "https://www.youtube.com/@MrBeast",
cache: true,
}),
});

const result = await response.json();
console.log(result.data.name, result.data.subscriber_count);

Which parameters does YouTube Channel Info accept?

Parameter

Type

Required

Default

Description

url

string

Yes

None

The full YouTube channel URL. The maximum length is 2048 characters.

cache

boolean

No

false

Set to true to accept a cached result. Set to false to read the live channel page.

Which channel URL formats does YouTube Channel Info accept?

YouTube Channel Info accepts a full YouTube channel URL only. It accepts four URL forms.

Accepted URL form

Example

Handle URL

https://www.youtube.com/@MrBeast

Channel ID URL

https://www.youtube.com/channel/UCX6OQ3DkcsbYNE6H8uQQuVA

Custom name URL

https://www.youtube.com/c/MrBeast

Legacy user URL

https://www.youtube.com/user/MrBeast6000

The www. prefix is optional. Both http:// and https:// work.

The endpoint rejects these four inputs with a 422 error:

Rejected input

Reason

@MrBeast

A bare handle is not a URL. Wrap it as https://www.youtube.com/@MrBeast.

UCX6OQ3DkcsbYNE6H8uQQuVA

A bare channel ID is not a URL. Wrap it as https://www.youtube.com/channel/UCX6OQ3DkcsbYNE6H8uQQuVA.

https://m.youtube.com/@MrBeast

The mobile host is not accepted. Use the www.youtube.com host.

https://www.youtube.com/watch?v=dQw4w9WgXcQ

A video URL is not a channel URL. Send the channel URL of that video.

What does YouTube Channel Info return?

The block below is an example response for https://www.youtube.com/@MrBeast. The field names and the structure are exact. The counts, the URLs and the timings are illustrative.

{
"data": {
"channel_id": "UCX6OQ3DkcsbYNE6H8uQQuVA",
"name": "MrBeast",
"description": "Go subscribe to my other channels! I make videos and give away money.",
"subscriber_count": "441000000",
"video_count": 892,
"view_count": 96482310755,
"joined_date": "2012-02-19",
"country": "US",
"avatar_url": "https://yt3.googleusercontent.com/ytc/AIdro_kQ8pMbXk3Zt2R1sVwq=s900-c-k-c0x00ffffff-no-rj",
"banner_url": "https://yt3.googleusercontent.com/Pq7Vd4mNfE1sK9xu0LbYhR3=w2560-fcrop64=1,00005a57ffffa5a8-k-c0xffffffff-no-nd-rj",
"links": [
"https://mrbeast.store",
"https://www.instagram.com/mrbeast",
"https://x.com/MrBeast"
]
},
"meta": {
"cache_hit": false,
"execution_time_ms": 2417,
"quality_warning": null
}
}

Which fields does the YouTube Channel Info response hold?

Field

Type

Description

data

object

The profile of the channel.

data.channel_id

string

The permanent channel ID, such as UCX6OQ3DkcsbYNE6H8uQQuVA. The value starts with UC.

data.name

string

The display name of the channel.

data.description

string

The About text of the channel.

data.subscriber_count

string

The subscriber count, as a string of digits. The value is "" for a channel that hides the count.

data.video_count

integer

The number of public videos on the channel. The value is 0 for an unknown count.

data.view_count

integer

The total view count of the channel. The value is 0 for an unknown count.

data.joined_date

string

The creation date of the channel. The value is "" for an unknown date.

data.country

string

The country of the channel, as a two-letter code such as US. The value is "" for a channel with no country.

data.avatar_url

string

The URL of the profile picture of the channel.

data.banner_url

string

The URL of the banner image of the channel. The value is "" for a channel with no banner.

data.links

array of strings

The external links on the About page, such as a website URL and a social profile URL.

meta

object

The metadata of the call.

meta.cache_hit

boolean

The value is true for a result served from the cache.

meta.execution_time_ms

integer

The duration of the call, in milliseconds.

meta.quality_warning

string or null

A note about an extraction that returned no data or partial data. The value is null for a normal call.

Which fields can be empty?

Every field of data carries a default value. A channel that hides a number, or an About page that holds no link, returns the default instead of an error.

Field

Value for absent data

channel_id, name, description, subscriber_count, joined_date, country, avatar_url, banner_url

""

video_count, view_count

0

links

[]

If the extraction returns no data at all, data holds every default value and meta.quality_warning holds a failure note. If the extraction returns a record with no channel name, meta.quality_warning holds the text Channel returned incomplete data. Both responses cost 1 credit.

Read data.subscriber_count as a string, then convert it. An empty string means that the channel hides the count.

channel = response.json()["data"]
raw_subscribers = channel["subscriber_count"]
subscribers = int(raw_subscribers) if raw_subscribers else None

How do you qualify a creator channel before outreach?

A sponsorship list or an influencer list often holds channel URLs and nothing else. YouTube Channel Info turns one URL into the numbers that decide the outreach. One credit per channel keeps a large list affordable.

  1. Send a YouTube Channel Info request with the channel URL as url.

  2. Read data.subscriber_count and convert the string to an integer.

  3. Drop every channel below your subscriber floor.

  4. Read data.country to confirm that the channel matches your target market.

  5. Read data.links to find the website of the creator and the business contact URL.

  6. Store data.channel_id as the stable key of the record.

The subscriber count and the video count qualify the size of a channel. They do not report the upload cadence. The data.video_count field is a lifetime total, so a channel with 892 videos can be dormant. For the upload cadence, send the channel URL to the YouTube Channel Videos API and read the publish_date field of the most recent videos.

A two-step qualification costs 3 credits per channel, or $0.06. Step one costs 1 credit and returns the size. Step two costs 2 credits and returns the cadence.

What is the difference between YouTube Channel Info and YouTube Channel Videos?

YouTube Channel Info returns the profile of one channel for 1 credit. YouTube Channel Videos returns the video list of the same channel for 2 credits. Both endpoints accept the same channel URL.

Item

YouTube Channel Info

YouTube Channel Videos

Path

/youtube_channel

/youtube_channel_videos

Credits per call

1

2

Returns

One profile object

A list of videos and a total count

Subscriber count

Yes

No

Avatar, banner, external links

Yes

No

Per-video titles, view counts, publish dates

No

Yes

Answers "how big is this channel?"

Yes

No

Answers "how often does this channel publish?"

No

Yes

Send both requests for a full picture of a channel. The total cost is 3 credits per channel, or $0.06.

How much does YouTube Channel Info cost?

YouTube Channel Info costs 1 credit per call. 1 credit costs $0.02 on the 1,000 and 5,000 credit packs, and less on larger packs. The table uses $0.02. The credit count does not change with the size of the channel or with the number of external links.

Calls

Credits

Cost

1

1

$0.02

100

100

$2.00

1,000

1,000

$20.00

10,000

10,000

$200.00

RichAPI charges the credit for every 2xx response. A cached result costs the same 1 credit as a live extraction.

Which errors can YouTube Channel Info return?

Status

Meaning

What to do

400

The request body failed validation.

Correct the parameter that the message names. The url parameter is required.

401

The API key is missing, wrong or revoked.

Send a valid key in the x-api-key header.

403

This API key has no access to this endpoint (Endpoint not available on your plan).

Call GET /api/v1/my-endpoints to see the endpoints that this key can use. Contact support for access.

404

The endpoint name is wrong.

Send the request to /youtube_channel.

422

The url value is not a YouTube channel URL.

Send a full channel URL, such as https://www.youtube.com/@MrBeast.

429

The request rate is over the limit.

Wait, then send the request again. For a higher limit, contact support.

500

The API failed.

Send the request again. If the failure repeats, contact support.

502

The upstream service did not answer.

Wait a few seconds, then send the request again.

RichAPI charges no credit for a 400, 401, 403, 404, 422, 429, 500 or 502 response.

Frequently asked questions

Can YouTube Channel Info accept a bare channel handle or a bare channel ID?

No. YouTube Channel Info accepts a full channel URL only, and it returns a 422 error for a bare handle or a bare channel ID. Wrap a handle as https://www.youtube.com/@handle and a channel ID as https://www.youtube.com/channel/UC....

Does YouTube Channel Info need a YouTube API key?

No. YouTube Channel Info reads the public channel page and needs no YouTube API key, no OAuth token and no login. Your RichAPI key in the x-api-key header is the only credential.

Why is the subscriber count a string and not a number?

YouTube Channel Info returns data.subscriber_count as a string of digits, because a channel that hides the count returns an empty string instead of a number. Convert the value to an integer in your code, and treat an empty string as an unknown count.

What is the difference between YouTube Channel Info and YouTube Channel Videos?

YouTube Channel Info returns the profile of a channel, such as the subscriber count and the external links, for 1 credit. YouTube Channel Videos returns the recent videos of the same channel, with titles, view counts and publish dates, for 2 credits.

How long does YouTube Channel Info cache a result?

YouTube Channel Info caches a channel for 6 hours. To accept a cached result inside that window, set cache to true. The meta.cache_hit field reports the source, and a cached call costs the same 1 credit.

How do you find a channel URL that you do not have?

Send a keyword to the YouTube Search API to find videos and their channels. Take the channel URL from those results, then send it to YouTube Channel Info for the subscriber count and the profile fields.

Does YouTube Channel Info return the email address of the creator?

No. YouTube Channel Info returns the external links of the About page in data.links, and it returns no email address. Send a website URL from data.links to the Website Email Extractor API to find a contact address.

Related articles

Did this answer your question?