channel_urlstringrequerido
Channel URL.
https://api.sandbase.ai/v1/api/youtube/web/channel-id-v2Resolves a YouTube channel URL into its unique channel ID and standardized channel URL. Accepts various URL formats including handles, custom URLs, and user links.
[
{
"data": {
"channel_id": "UCeu6U67OzJhV1KwBansH3Dg",
"channel_url": "https://www.youtube.com/channel/UCeu6U67OzJhV1KwBansH3Dg"
}
}
]Seleccione un ejemplo para cargar sus entradas y el resultado en el playground.
Takes a YouTube channel URL and returns the channel's unique ID and its standard channel URL. The input is channel_url, which can be a handle, custom URL, user link, or channel link.
@handle link into a UC... channel ID before you call other channel APIs.curl -X POST "https://api.sandbase.ai/v1/api/youtube/web/channel-id-v2" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"channel_url": "https://www.youtube.com/@CozyCraftYT"}'
The result is returned in outputs[0].data.
| Name | Type | Required | Description |
|---|---|---|---|
channel_url | string | Yes | Channel URL. |
Real response for the request above, trimmed: lists keep their first item and long strings are cut.
{
"channel_id": "UCeu6U67OzJhV1KwBansH3Dg",
"channel_url": "https://www.youtube.com/channel/UCeu6U67OzJhV1KwBansH3Dg"
}
| Field | Meaning |
|---|---|
channel_id | The unique YouTube channel ID. It starts with UC, for example UCeu6U67OzJhV1KwBansH3Dg. |
channel_url | The standard channel URL built from the ID, in the form https://www.youtube.com/channel/<channel_id>. |
channel_url. The example uses a handle URL: https://www.youtube.com/@CozyCraftYT.channel_id and inside channel_url, so you can use either one.$0.001 per successful call. Failed calls are not charged. It is included in the daily free quota of each organization.
Empiece a construir
Endpoint de la API de la plataforma con autenticación unificada y seguimiento de uso.
curl -X POST "https://api.sandbase.ai/v1/api/youtube/web/channel-id-v2" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"channel_url": "https://static.sandbase.ai/examples/1e292b4d-4702-4fe1-a012-cba3b931bb0e/input/456962a8-0887-4ca6-aee3-9be7a5538cd5.bin"
}'Configure su clave de API de SandBase en el entorno de su servidor. Las solicitudes usan autenticación Bearer.
export SANDBASE_API_KEY="YOUR_API_KEY"Conserve su clave en el servidor. No la exponga en código del navegador.
channel_urlstringrequeridoChannel URL.
Respuesta de ejemplo guardada para esta API; no se realiza ninguna solicitud en vivo al verla.
[
{
"data": {
"channel_id": "UCeu6U67OzJhV1KwBansH3Dg",
"channel_url": "https://www.youtube.com/channel/UCeu6U67OzJhV1KwBansH3Dg"
}
}
]Explorar más
| API | Precio | Respuesta |
|---|---|---|
YouTube Channel ID from URL (V2)Esta API YouTube | $0.001 por llamada | JSON |
YouTube | $0.001 por llamada | JSON |
YouTube | $0.001 por llamada | JSON |
YouTube | $0.001 por llamada | JSON |
YouTube | $0.001 por llamada | JSON |
YouTube | $0.001 por llamada | JSON |
Preguntas
Envía una solicitud POST a https://api.sandbase.ai/v1/api/youtube/web/channel-id-v2 con tu clave API de SandBase en el encabezado Authorization (Bearer) y los parámetros como un cuerpo JSON. También puedes probarlo en el Playground de esta página sin escribir código.
$0.001 por llamada, facturado desde tu saldo de SandBase. Solo se te cobra por las llamadas que haces; no hay suscripción.
Requeridos: channel_url (string). La tabla de Parámetros y el Playground de esta página enumeran todos los campos.
Una respuesta JSON devuelta en la misma solicitud HTTP (sincrónica). El README de esta página incluye una respuesta de ejemplo.
No. YouTube Channel ID from URL (V2) funciona a través de SandBase, así que una sola clave API de SandBase cubre este endpoint y todas las demás APIs y modelos del catálogo. No necesitas solicitar acceso a la API de YouTube por separado.