1
votes

I am trying to get youtube video details (mainly title of the video) from video id (XS6ysDFTbLU) and related videos of same video id(XS6ysDFTbLU)

but the approach I have is invoke the video details and related video v3 API separately.

details: https://www.googleapis.com/youtube/v3/videos?part=snippet&id=XS6ysDFTbLU&key=[yourkey]

related videos: https://www.googleapis.com/youtube/v3/search?part=snippet&type=video&relatedToVideoId=XS6ysDFTbLU&maxResults=8&safeSearch=strict&key=[yourkey]

Is there any way I can get both (related videos and video detail) in single API invocation?

1

1 Answers

1
votes

I don't think that's possible because it's two different modules. One module is videos, another is search. You should make two API calls and then process given data somehow. I see the only way.