Reputation: 117
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.
Upvotes: 4
Views: 610
Reputation: 10321
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.
Upvotes: 1
Reputation: 139
Having more than three words in a "keyword" also appears to throw this error.
Upvotes: -1
Reputation: 10227
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
Upvotes: 2