Menu

Extracting Hidden YouTube Video Tags with an API
πŸ“°

Extracting Hidden YouTube Video Tags with an API

DEV Community: apiΒ·Axio ApiΒ·11 days ago
#JKIZHcmg
#devtoapi#devto#dev#tags#youtube
Reading 0:00
15s threshold

YouTube removed visible tags from the watch page UI a while back, but creators and competitors still set them β€” they're just sitting in the page's <meta name="keywords"> tag and the embedded player JSON, invisible unless you view source. If you're doing competitive research on what tags a channel is targeting, you either inspect page source by hand or write a small scraper.

AxioAPI does the scraping and parsing for you and hands back structured JSON.

The endpoint

GET https://axioapi.com/api/v1/social/youtube/videos/{id}/tags

Enter fullscreen mode

Exit fullscreen mode

{id} is the 11-character YouTube video ID (the part after v= in a watch URL, or after youtu.be/ ).

const API = ' https://axioapi.com/api/v1 ' ; const headers = { Authorization : `Bearer ${ process . env . AXIOAPI_KEY } ` , Accept : ' application/json ' };

async function getTags ( videoId ) { const res = await fetch ( ` ${ API } /social/youtube/videos/ ${ videoId } /tags` , { headers }); if ( ! res . ok ) throw new Error ( ` ${ res .…

Continue reading β€” create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.