Sand AISand AI MAGI-2MAGI-2 ya está en SandBase: video en 1080p con audio nativoPruébalo ahora

YouTube Channel ID from URL

Documentación de la API
https://api.sandbase.ai/v1/api/youtube/web-v2/channel-id

Resolves a YouTube channel URL to its canonical channel ID. Accepts various channel URL structures including handle, channel, custom, and user formats.

Precio
$0.001USD / llamada
Método
POST
Respuesta
JSON
Parámetros
1 obligatorios · 0 opcionales

Entorno de pruebas

Entrada
Channel URL.
SalidaListo

Su salida aparecerá aquí

Complete las entradas y luego haga clic en Ejecutar.

README de la API

YouTube Channel ID from URL API

This API takes a YouTube channel URL and returns the channel's canonical ID and the canonical /channel/ URL. It needs one input, channel_url.

Use cases

  • Turn a handle URL such as https://www.youtube.com/@CozyCraftYT into a stable channel ID to store in a database.
  • Normalize a list of mixed channel URLs into one ID format before you remove duplicates.
  • Get the channel ID you need to call channel-level APIs that ask for an ID instead of a URL.

Request

curl -X POST "https://api.sandbase.ai/v1/api/youtube/web-v2/channel-id" \
  -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.

Parameters

NameTypeRequiredDescription
channel_urlstringYesChannel URL.

Example response

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"
}

Response fields

FieldMeaning
channel_idThe canonical YouTube channel ID. It starts with UC.
channel_urlThe canonical channel URL built from the ID, in the form https://www.youtube.com/channel/<channel_id>.

Notes

Pricing

$0.001 per successful call. Failed calls are not charged. It is included in the daily free quota of each organization.

Explorar más

APIs relacionadas

Todas las APIs
APIPrecioRespuesta
YouTube$0.001 por llamadaJSON
YouTube$0.001 por llamadaJSON
YouTube$0.001 por llamadaJSON
YouTube$0.001 por llamadaJSON
YouTube$0.001 por llamadaJSON
YouTube$0.001 por llamadaJSON

Guías:Best YouTube API in 2026: Pricing Compared

Preguntas

FAQ

¿Cómo uso la API de YouTube Channel ID from URL?

Envía una solicitud POST a https://api.sandbase.ai/v1/api/youtube/web-v2/channel-id 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.

¿Cuánto cuesta la API de YouTube Channel ID from URL?

$0.001 por llamada, facturado desde tu saldo de SandBase. Solo se te cobra por las llamadas que haces; no hay suscripción.

¿Qué parámetros acepta la API de YouTube Channel ID from URL?

Requeridos: channel_url (string). La tabla de Parámetros y el Playground de esta página enumeran todos los campos.

¿Qué devuelve la API de YouTube Channel ID from URL?

Una respuesta JSON devuelta en la misma solicitud HTTP (sincrónica). El README de esta página incluye una respuesta de ejemplo.

¿Necesito una cuenta de desarrollador o una clave API de YouTube?

No. YouTube Channel ID from URL 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.