channel_idstringobligatoire
Channel ID (e.g., UCeu6U67OzJhV1KwBansH3Dg)
https://api.sandbase.ai/v1/api/youtube/web/channel-urlReturns the standard channel URL and vanity handle URL for a specified YouTube channel. Takes a unique channel ID as input to resolve public web addresses.
[
{
"data": {
"channel_id": "UCeu6U67OzJhV1KwBansH3Dg",
"channel_url": "https://www.youtube.com/channel/UCeu6U67OzJhV1KwBansH3Dg",
"vanity_url": "http://www.youtube.com/@CozyCraftYT"
}
}
]Sélectionnez un exemple pour charger ses entrées et son résultat dans le playground.
Returns the standard channel URL and the vanity handle URL for a YouTube channel. It needs one input, the channel ID in the channel_id parameter.
@handle URL of a creator when your database only holds the channel ID.curl -X POST "https://api.sandbase.ai/v1/api/youtube/web/channel-url" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"channel_id": "UCeu6U67OzJhV1KwBansH3Dg"}'
The result is returned in outputs[0].data.
| Name | Type | Required | Description |
|---|---|---|---|
channel_id | string | Yes | Channel ID (e.g., UCeu6U67OzJhV1KwBansH3Dg) |
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",
"vanity_url": "http://www.youtube.com/@CozyCraftYT"
}
| Field | Meaning |
|---|---|
channel_id | The channel ID you sent in the request, echoed back. It starts with UC. |
channel_url | The channel page URL built from the channel ID, in the form https://www.youtube.com/channel/<channel_id>. |
vanity_url | The channel page URL that uses the creator's @handle, for example http://www.youtube.com/@CozyCraftYT. This value uses http rather than https. |
UC.$0.001 per successful call. Failed calls are not charged. It is included in the daily free quota of each organization.
Commencer à construire
Point de terminaison de l'API de la plateforme avec authentification unifiée et suivi de l'utilisation.
curl -X POST "https://api.sandbase.ai/v1/api/youtube/web/channel-url" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"channel_id": "UCeu6U67OzJhV1KwBansH3Dg"
}'Définissez votre clé API SandBase dans l'environnement de votre serveur. Les requêtes utilisent l'authentification Bearer.
export SANDBASE_API_KEY="YOUR_API_KEY"Conservez votre clé côté serveur. Ne l'exposez pas dans le code du navigateur.
channel_idstringobligatoireChannel ID (e.g., UCeu6U67OzJhV1KwBansH3Dg)
Exemple de réponse enregistré pour cette API ; aucune requête en direct n'est effectuée lors de l'affichage.
[
{
"data": {
"channel_id": "UCeu6U67OzJhV1KwBansH3Dg",
"channel_url": "https://www.youtube.com/channel/UCeu6U67OzJhV1KwBansH3Dg",
"vanity_url": "http://www.youtube.com/@CozyCraftYT"
}
}
]Explorer plus
| API | Prix | Réponse |
|---|---|---|
YouTube Channel URL LookupCette API YouTube | $0.001 par appel | JSON |
YouTube | $0.001 par appel | JSON |
YouTube | $0.001 par appel | JSON |
YouTube | $0.001 par appel | JSON |
YouTube | $0.001 par appel | JSON |
YouTube | $0.001 par appel | JSON |
Questions
Envoyez une requête POST à https://api.sandbase.ai/v1/api/youtube/web/channel-url avec votre clé API SandBase dans l’en-tête Authorization (Bearer) et les paramètres dans un corps JSON. Vous pouvez aussi l’essayer dans le Playground sur cette page sans écrire de code.
$0.001 par appel, facturé depuis votre solde SandBase. Vous ne payez que les appels que vous effectuez ; aucun abonnement.
Obligatoire : channel_id (string). Le tableau des paramètres et le Playground sur cette page listent tous les champs.
Une réponse JSON renvoyée dans la même requête HTTP (synchrone). Le README sur cette page inclut un exemple de réponse.
Non. YouTube Channel URL Lookup fonctionne via SandBase, donc une seule clé API SandBase couvre ce point de terminaison ainsi que toutes les autres API et tous les modèles du catalogue. Vous n’avez pas besoin de demander un accès API YouTube séparément.