channel_namestringwymagane
Channel name.
https://api.sandbase.ai/v1/api/youtube/web/channel-idRetrieves the unique YouTube channel ID associated with a specific channel name. Provide the target channel name to receive the matching channel identifier.
Twój wynik pojawi się tutaj
Uzupełnij dane wejściowe, a następnie kliknij Uruchom.
This API returns the YouTube channel ID that matches a channel name. It needs one input, channel_name, and returns the ID with the name it matched.
curl -X POST "https://api.sandbase.ai/v1/api/youtube/web/channel-id" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"channel_name": "LinusTechTips"}'
The result is returned in outputs[0].data.
| Name | Type | Required | Description |
|---|---|---|---|
channel_name | string | Yes | Channel name. |
Real response for the request above, trimmed: lists keep their first item and long strings are cut.
{
"channel_id": "UCXuqSBlHAE6Xw-yeJA0Tunw",
"channel_name": "LinusTechTips"
}
| Field | Meaning |
|---|---|
channel_id | The YouTube channel ID for the matched channel. It starts with UC, as in UCXuqSBlHAE6Xw-yeJA0Tunw. |
channel_name | The channel name in the response. It matches the channel_name you sent in the example request. |
channel_name, for example LinusTechTips.channel_id as input for other YouTube channel APIs, such as YouTube Channel Information.$0.001 per successful call. Failed calls are not charged. It is included in the daily free quota of each organization.
Zacznij tworzyć
Punkt końcowy API platformy z jednolitym uwierzytelnianiem i śledzeniem użycia.
curl -X POST "https://api.sandbase.ai/v1/api/youtube/web/channel-id" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"channel_name": "LinusTechTips"
}'Ustaw klucz API SandBase w środowisku serwera. Żądania używają uwierzytelniania Bearer.
export SANDBASE_API_KEY="YOUR_API_KEY"Przechowuj klucz na serwerze. Nie ujawniaj go w kodzie przeglądarkowym.
channel_namestringwymaganeChannel name.
Zapisany przykładowy response dla tego API; podczas wyświetlania nie jest wykonywane żadne żądanie na żywo.
Nie opublikowano zapisanego response. Uruchom API w Playground, aby sprawdzić jego odpowiedź.
Odkryj więcej
| API | Cena | Odpowiedź |
|---|---|---|
YouTube | $0.001 za wywołanie | JSON |
YouTube | $0.001 za wywołanie | JSON |
YouTube | $0.001 za wywołanie | JSON |
YouTube | $0.001 za wywołanie | JSON |
YouTube | $0.001 za wywołanie | JSON |
YouTube | $0.001 za wywołanie | JSON |
Przewodniki:Best YouTube API in 2026: Pricing Compared
Pytania
Wyślij żądanie POST do https://api.sandbase.ai/v1/api/youtube/web/channel-id z kluczem API SandBase w nagłówku Authorization (Bearer) oraz parametrami w treści JSON. Możesz też wypróbować je w Playground na tej stronie bez pisania kodu.
$0.001 za wywołanie, rozliczane z salda SandBase. Płacisz tylko za wykonane wywołania; nie ma subskrypcji.
Wymagane: channel_name (string). Tabela Parameters oraz Playground na tej stronie zawierają wszystkie pola.
Odpowiedź JSON zwrócona w tym samym żądaniu HTTP (synchronicznie). README na tej stronie zawiera przykładową odpowiedź.
Nie. YouTube Channel ID Lookup działa przez SandBase, więc jeden klucz API SandBase obejmuje ten endpoint i każde inne API oraz model w katalogu. Nie musisz osobno ubiegać się o dostęp do API YouTube.