אנחנו מעדכנים את Data API כך שיתאים לאופן שבו YouTube סופר צפיות ב-Shorts.
מידע נוסף
Videos: reportAbuse
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
דיווח על סרטון שמכיל תוכן פוגע.
השפעה על המכסה: קריאה לשיטה הזו מחייבת עלות מכסה של 50 יחידות.
בקשה
בקשת HTTP
POST https://www.googleapis.com/youtube/v3/videos/reportAbuse
אישור
הבקשה הזו דורשת הרשאה עם לפחות אחד מההיקפים הבאים (מידע נוסף על אימות והרשאה).
היקף |
https://www.googleapis.com/auth/youtube |
https://www.googleapis.com/auth/youtube.force-ssl |
https://www.googleapis.com/auth/youtubepartner |
פרמטרים
בטבלה הבאה מפורטים הפרמטרים שהשאילתה הזו תומכת בהם. כל הפרמטרים שמפורטים הם פרמטרים של שאילתות.
פרמטרים |
פרמטרים אופציונליים |
onBehalfOfContentOwner |
string
אפשר להשתמש בפרמטר הזה רק בבקשה מורשית. הערה: הפרמטר הזה מיועד אך ורק לשותפי תוכן של YouTube.
הפרמטר onBehalfOfContentOwner מציין שהפרטי הכניסה של הבקשה מזהים משתמש במערכת ניהול התוכן של YouTube שפועל בשם בעלי התוכן שצוין בערך הפרמטר. הפרמטר הזה מיועד לשותפי תוכן ב-YouTube שיש להם בעלות על ערוצי YouTube רבים ושהם מנהלים אותם. הוא מאפשר לבעלי תוכן לבצע אימות פעם אחת ולקבל גישה לכל נתוני הסרטונים והערוצים שלהם, בלי לספק פרטי כניסה לכל ערוץ בנפרד. חשבון ה-CMS שבו המשתמש מבצע אימות חייב להיות מקושר לבעלי התוכן שצוין ב-YouTube. |
גוף הבקשה
מבנה הנתונים של גוף הבקשה הוא:
{
"videoId": string,
"reasonId": string,
"secondaryReasonId": string,
"comments": string,
"language": string
}
מאפיינים נדרשים
צריך להגדיר ערכים למאפיינים הבאים:
מאפיינים אופציונליים
אפשר להגדיר ערכים למאפיינים הבאים:
מאפיינים
בטבלה הבאה מפורטים המאפיינים שמופיעים במשאב הזה:
מאפיינים |
videoId |
string
מזהה את הסרטון שעליו דווח כי הוא מכיל תוכן פוגעני. מגדירים את הערך כמזהה הסרטון ב-YouTube. |
reasonId |
object
מציין את הסיבה לדיווח על הסרטון שמכיל תוכן פוגעני. מגדירים את הערך כ-unique ID של המשאב videoAbuseReportReason המתאים. |
secondaryReasonId |
object
הסיבה המשנית לדיווח על הסרטון כי הוא מכיל תוכן פוגעני. הסיבה המשנית מספקת תיאור ספציפי יותר של התוכן הפוגע בהשוואה לסיבה הראשית, שמצוינת במאפיין reasonId . מגדירים את הערך כ-unique ID של הסיבה המשנית המתאימה. |
language |
object
מזהה את השפה שבה הכתב מדבר. |
תשובה
אם הפעולה מצליחה, השיטה הזו מחזירה קוד תגובה מסוג HTTP 204
(No Content
).
שגיאות
בטבלה הבאה מפורטות הודעות השגיאה שיכולות להופיע בתגובה לקריאה לשיטה הזו. פרטים נוספים זמינים במסמכים בנושא הודעת השגיאה.
סוג השגיאה |
פרטי השגיאה |
תיאור |
badRequest (400) |
invalidAbuseReason |
הבקשה הכילה ערך לא צפוי למאפיין reasonId או שילוב לא חוקי של המאפיינים reasonId ו-secondaryReasonId . |
badRequest (400) |
rateLimitExceeded |
המשתמש שלח יותר מדי בקשות בפרק זמן נתון. |
forbidden (403) |
forbidden |
|
notFound (404) |
videoNotFound |
לא הצלחנו למצוא את הסרטון שעליו ניסית לדווח על שימוש לרעה. |
נסה בעצמך!
משתמשים ב-APIs Explorer כדי לקרוא ל-API הזה ולראות את הבקשה ואת התשובה של ה-API.
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2025-05-05 (שעון UTC).
[null,null,["עדכון אחרון: 2025-05-05 (שעון UTC)."],[[["\u003cp\u003eThis API allows reporting a YouTube video for abusive content using a POST request to \u003ccode\u003ehttps://www.googleapis.com/youtube/v3/videos/reportAbuse\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eReporting a video requires setting both the \u003ccode\u003evideoId\u003c/code\u003e (the ID of the video being reported) and the \u003ccode\u003ereasonId\u003c/code\u003e (the reason for reporting the video) within the request body.\u003c/p\u003e\n"],["\u003cp\u003eThe request can optionally include \u003ccode\u003esecondaryReasonId\u003c/code\u003e, \u003ccode\u003ecomments\u003c/code\u003e, and \u003ccode\u003elanguage\u003c/code\u003e for more detailed information about the report.\u003c/p\u003e\n"],["\u003cp\u003eUtilizing this API call consumes 50 quota units and requires authorization with specific scopes, such as \u003ccode\u003ehttps://www.googleapis.com/auth/youtube\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe API will return an error if an unexpected or invalid value is entered for \u003ccode\u003ereasonId\u003c/code\u003e or \u003ccode\u003esecondaryReasonId\u003c/code\u003e and if a video is not found.\u003c/p\u003e\n"]]],["This document details how to report a YouTube video for abusive content using the `videos.reportAbuse` API endpoint. A POST request is made to the API with a quota cost of 50 units. Authorization is needed using specified scopes. The request body requires the `videoId` and `reasonId`, and can optionally include `secondaryReasonId`, `comments`, and `language`. The response returns a 204 status code upon success and specific error codes in case of failure.\n"],null,["# Videos: reportAbuse\n\nReports a video for containing abusive content.\n\n**Quota impact:** A call to this method has a [quota cost](/youtube/v3/getting-started#quota) of 50 units.\n\nRequest\n-------\n\n### HTTP request\n\n```\nPOST https://www.googleapis.com/youtube/v3/videos/reportAbuse\n```\n\n### Authorization\n\nThis request requires authorization with at least one of the following scopes ([read more about authentication and authorization](/youtube/v3/guides/authentication)).\n\n| Scope |\n|-----------------------------------------------------|\n| `https://www.googleapis.com/auth/youtube` |\n| `https://www.googleapis.com/auth/youtube.force-ssl` |\n| `https://www.googleapis.com/auth/youtubepartner` |\n\n### Parameters\n\nThe table below lists the parameters that this query supports. All of the parameters listed are query parameters.\n\n| Parameters ||\n|--------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|\n| **Optional parameters** |||\n| `onBehalfOfContentOwner` | `string` This parameter can only be used in a properly [authorized request](/youtube/v3/guides/authentication). **Note:** This parameter is intended exclusively for YouTube content partners. The **onBehalfOfContentOwner** parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The CMS account that the user authenticates with must be linked to the specified YouTube content owner. |\n\n### Request body\n\nThe request body has the following data structure: \n\n```text\n{\n \"videoId\": string,\n \"reasonId\": string,\n \"secondaryReasonId\": string,\n \"comments\": string,\n \"language\": string\n}\n```\n\n#### Required properties\n\nYou must set values for the following properties:\n\n\u003cbr /\u003e\n\n- [videoId](#videoId)\n- [reasonId](#reasonId)\n\n\u003cbr /\u003e\n\n#### Optional properties\n\nYou can set values for the following properties:\n\n\u003cbr /\u003e\n\n- [secondaryReasonId](#secondaryReasonId)\n- [comments](#comments)\n- [language](#language)\n\n\u003cbr /\u003e\n\n### Properties\n\nThe following table defines the properties that appear in this resource:\n\n| Properties ||\n|---------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `videoId` | `string` Identifies the video that is being reported for containing abusive content. Set the value to that video's YouTube video ID. |\n| `reasonId` | `object` Specifies the reason that the video that is being reported for containing abusive content. Set the value to the appropriate `videoAbuseReportReason` resource's [unique ID](/youtube/v3/docs/videoAbuseReportReasons#id). |\n| `secondaryReasonId` | `object` Specifies the secondary reason that the video that is being reported for containing abusive content. A secondary reason provides a more specific description of the objectionable content than the primary reason, which the `reasonId` property identifies. Set the value to the appropriate secondary reason's [unique ID](/youtube/v3/docs/videoAbuseReportReasons#snippet.secondaryReasons[].id). |\n| `comments` | `string` Provides any additional information that the reporter wants to add. |\n| `language` | `object` Identifies a language spoken by the reporter. |\n\nResponse\n--------\n\nIf successful, this method returns an HTTP `204` response code (`No Content`).\n\nErrors\n------\n\nThe table below identifies error messages that the API could return in response to a call to this method. Please see the [error message](/youtube/v3/docs/errors) documentation for more detail.\n\n| Error type | Error detail | Description |\n|--------------------|----------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `badRequest (400)` | `invalidAbuseReason` | The request contained an unexpected value for the `reasonId` property, or an invalid combination of the `reasonId` and `secondaryReasonId` properties. |\n| `badRequest (400)` | `rateLimitExceeded` | The user has sent too many requests in a given timeframe. |\n| `forbidden (403)` | `forbidden` | |\n| `notFound (404)` | `videoNotFound` | The video that you are trying to report abuse for cannot be found. |\n\nTry it!\n-------\n\nUse the APIs Explorer to call this API and see the API request and response."]]