Yandex Cloud
Search
Contact UsGet started
  • Blog
  • Pricing
  • Documentation
  • All Services
  • System Status
    • Featured
    • Infrastructure & Network
    • Data Platform
    • Containers
    • Developer tools
    • Serverless
    • Security
    • Monitoring & Resources
    • ML & AI
    • Business tools
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Customer Stories
    • Gateway to Russia
    • Cloud for Startups
    • Education and Science
  • Blog
  • Pricing
  • Documentation
Yandex project
© 2025 Yandex.Cloud LLC
Yandex Cloud Video
    • All guides
      • Uploading a video
      • Editing a video
      • Adding timecodes
      • Adding a thumbnail
      • Managing subtitles
      • Downloading a video
      • Publishing a video
      • Unpublishing a video
      • Getting an embed code or link
      • Adding a video to a playlist
      • Getting view statistics
      • Deleting a video
    • Adding a member
    • Overview
    • Control
    • Troubleshooting
  • Access management
  • Pricing policy
  • Audit Trails events
  • Release notes
  1. Step-by-step guides
  2. Videos
  3. Getting an embed code or link

Getting an embed code or link to a video

Written by
Yandex Cloud
Updated at March 6, 2025
Cloud Video interface
REST API
gRPC API
  1. Open the Cloud Video home page.

  2. Select a channel.

  3. In the Video tab, select the video.

  4. Under Past code:

    1. Set the required playback parameters for the video:

      1. Play video without sound by default
      2. Auto play video
      3. Display controls in the player.

      With Cloud Video Player SDK for IFrame, you can specify additional video player management settings and video playback parameters for the HTML page, such as video size and looping, volume, etc.

    2. Select the preferred video link format:

      • html: HTML embed code in Iframe format.
      • link: Direct link to the video.
    3. Click Copy.

Run the following command:

curl \
  --request GET \
  --header 'Authorization: Bearer <IAM_token>' \
  --url 'https://video.api.cloud.yandex.net/video/v1/videos/<video_ID>:getPlayerURL'

Where:

  • <IAM_token>: IAM token required for authenticating with the Cloud Video API.
  • <video_ID>: ID of the video you want to get a link to.

Result:

{
  "playerUrl": "https://runtime.video.cloud.yandex.net/player/video/vplva3626rvh********?autoplay=0\u0026mute=0",
  "html": "\u003ciframe width=\"560\" height=\"315\" src=\"https://runtime.video.cloud.yandex.net/player/video/vplva3626rvh********?autoplay=0\u0026mute=0\" allow=\"autoplay; fullscreen; accelerometer; gyroscope; picture-in-picture; encrypted-media\" frameborder=\"0\" scrolling=\"no\"\u003e\u003c/iframe\u003e"
}

Where:

  • playerUrl: Direct link to the video.
  • html: HTML embed code in Iframe format.

Run the following command:

grpcurl \
  -rpc-header "Authorization: Bearer <IAM_token>" \
  -d '{
    "videoId": "<video_ID>"
  }' \
  video.api.cloud.yandex.net:443 yandex.cloud.video.v1.VideoService/GetPlayerURL

Where:

  • <IAM_token>: IAM token required for authenticating with the Cloud Video API.
  • <video_ID>: ID of the video you want to get a link to.

Result:

{
  "playerUrl": "https://runtime.video.cloud.yandex.net/player/video/vplva3626rvh********?autoplay=0\u0026mute=0",
  "html": "\u003ciframe width=\"560\" height=\"315\" src=\"https://runtime.video.cloud.yandex.net/player/video/vplva3626rvh********?autoplay=0\u0026mute=0\" allow=\"autoplay; fullscreen; accelerometer; gyroscope; picture-in-picture; encrypted-media\" frameborder=\"0\" scrolling=\"no\"\u003e\u003c/iframe\u003e"
}

Where:

  • playerUrl: Direct link to the video.
  • html: HTML embed code in Iframe format.

Tip

To make the whole thumbnail fit in the window regardless of screen resolution when uploading the video in browser, add the &object_fit=contain parameter to the end of the link.

If this parameter is not specified in the link, the default object_fit=cover value will be used.

For more information about the object_fit parameter, see the CSS documentation.

Was the article helpful?

Previous
Unpublishing a video
Next
Adding a video to a playlist
Yandex project
© 2025 Yandex.Cloud LLC