Short answer
The YouTube Data API does not provide a general anonymous endpoint that returns the text transcript of any public video. Its caption resources are designed around authenticated access and caption-track management.
captions.list returns track metadata
The official method requires OAuth 2.0 and lists caption tracks for a video. Google states that the response does not contain the actual captions. Listing a public video's metadata is therefore not the same as receiving its transcript text.
Downloading a caption track has additional authorization rules
The official download method is appropriate when an authenticated application manages caption tracks it is permitted to access. It is not a drop-in transcript endpoint for arbitrary public URLs.
Choose the path from the product requirement
Use the official API for authorized channel and caption management. Use a transcript service when the input is a public YouTube URL and the product needs normalized text, timestamps and an explicit fallback for missing captions.