Method: videos.rate

Adds a like or dislike rating to a video or removes a rating from a video.

Rating a video through the API doesn't affect the video's public like or dislike count; it records the authenticated user's personal rating and updates the user's Likes playlist.

If successful, this method returns an HTTP 204 No Content response with an empty body.

For method-specific error responses, see videos.rate errors. For code examples, see videos.rate code snippets.

HTTP request

POST https://youtube.googleapis.com/youtube/v3/videos/rate

The URL uses gRPC Transcoding syntax.

Query parameters

Parameters
id

string

Required. Specifies the YouTube video ID of the video that is being rated or having its rating removed.

rating

enum

Required. Specifies the rating to record: like or dislike to set a rating, or none to remove any rating the authenticated user previously set for the video.

Valid values of this enum field are:

  • none
  • like
  • dislike

Request body

The request body must be empty.

Response body

If successful, the response body is empty.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/youtube
  • https://www.googleapis.com/auth/youtubepartner
  • https://www.googleapis.com/auth/youtube.force-ssl

For more information, see the OAuth 2.0 Overview.