Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does the youtube data api classify as invalid keywords?

I am trying to upload a video using the youtube data api but for some reason am getting the error down below, the keywords I'm using are:

['ski mask the slump god x blueface type beat', 'ski mask the slump god x tyga type beat', 'ski mask the slump god x jasiah type beat', 'ski mask the slump god x bbno type beat', 'ski mask the slump god x jid type beat', 'ski mask the slump god x type beat', 'ski mask the slump god x splurge type beat', 'ski mask the slump god x zotiyac type beat', 'ski mask the slump god x smokepurpp type beat', 'ski mask the slump god x comethazine type beat', 'ski mask the slump god x gunna type beat', 'free type beat 2020', 'free dreamy beat']

The error is:

b'{\n "error": {\n "code": 400,\n "message": "The request metadata specifies invalid video keywords.",\n "errors": [\n
{\n "message": "The request metadata specifies invalid video keywords.",\n "domain": "youtube.video",\n "reason": "invalidTags",\n "location": "body.snippet.tags",\n
"locationType": "other"\n }\n ]\n }\n}\n'

Unless I am bling my keywords do not appear to contain any special characters, any double whitespaces, neither are they over 500 characters long. I have not found any documentation on what are classified as invalid keywords either, so I am kinda stumped here as to what is causing the problem.

like image 701
JustADudeTryingToCode Avatar asked Oct 28 '25 08:10

JustADudeTryingToCode


2 Answers

I believe YouTube requires the total keywords characters length to be less than 400 (approx). Seems like you have 484 characters in total here, try to reduce the number of keywords you specify

like image 98
GProst Avatar answered Oct 29 '25 21:10

GProst


For anyone in search of issues after already trying to reduce the tags to 500 characters in total:

A list of keyword tags associated with the video. Tags may contain spaces. The property value has a maximum length of 500 characters. Note the following rules regarding the way the character limit is calculated:

  • The property value is a list, and commas between items in the list count toward the limit.
  • If a tag contains a space, the API server handles the tag value as though it were wrapped in quotation marks, and the quotation marks count toward the character limit. So, for the purposes of character limits, the tag Foo-Baz contains seven characters, but the tag Foo Baz contains nine characters.

So count the white spaces in all your already-trimmed tags * 2 + the total length of all tags including comma's. That number must be below 500.

No issue with tags that have more than 3 words.

like image 35
CularBytes Avatar answered Oct 29 '25 21:10

CularBytes



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!