Checks if a YouTube video exists under the given ID. No API key is required.
How does it work?
Firstly the video id is checked against a regular expression if it is in a valid format. When this check succedes the YouTube oEmbed API is used to see if a video is present under the given ID. This requires no API key and might be the best option to receive this information without one.
Checks if a YouTube video exists under the given ID. When a video is found the return object also includes the title and author of the video
- id: string - YouTube video id
- VideoInfoResponse when Promise is resolved
- AxiosError when a network issue occurred
Check if the video exists
Check if the video is private
Licensed under the MIT License.