How to get an App ID in LG TV?

How we can get an App ID of YouTube app to launch that app from a different app.

The webOS TV does not provide 3rd party apps’ information. For questions about YouTube, please contact YouTube support. Thank you.

You can use a library on your backend to request a list of installed applications and their IDs. This will allow you to retrieve all the relevant information about the applications installed on the target tv.