Youtube data api v3 search.list 查询最大长度? [英] Youtube data api v3 search.list query maximum length?
问题描述
在以下 youtube 数据 api 搜索调用中允许的最大 q 长度是多少?q 中允许的术语数量有任何限制吗?https://www.googleapis.com/youtube/v3/search?part=snippet&maxResults=50&q=football
what is the allowed maximum length of q in the following youtube data api search call? is there any restriction on the number of terms allowed in q? https://www.googleapis.com/youtube/v3/search?part=snippet&maxResults=50&q=football
推荐答案
我认为没有定义
q q 参数指定要搜索的查询词.
q The q parameter specifies the query term to search for.
您的请求还可以使用布尔 NOT (-) 和 OR (|) 运算符来排除视频或查找与多个搜索词之一相关联的视频.例如,要搜索与划船"或划船"匹配的视频.或sailing",将 q 参数值设置为boating|sailing.类似地,要搜索与划船"匹配的视频,或航行"但不是钓鱼",将 q 参数值设置为boating|sailing -fishing.请注意,管道字符在 API 请求中发送时必须经过 URL 转义.管道符的 URL 转义值为 %7C.
Your request can also use the Boolean NOT (-) and OR (|) operators to exclude videos or to find videos that are associated with one of several search terms. For example, to search for videos matching either "boating" or "sailing", set the q parameter value to boating|sailing. Similarly, to search for videos matching either "boating" or "sailing" but not "fishing", set the q parameter value to boating|sailing -fishing. Note that the pipe character must be URL-escaped when it is sent in your API request. The URL-escaped value for the pipe character is %7C.
但是,您必须考虑浏览器中查询字符串的最大长度.
However your going to have to consider the max length of a query string in the browser.
RFC 3986 还声明没有限制,但表示由于 DNS 限制(第 2.3.3 节),主机名限制为 255 个字符.Microsoft 声明 Internet Explorer 中 URL 的最大长度为 2,083 个字符,URL 的路径部分不得超过 2,048 个字符.2009 年 5 月 2 日
RFC 3986 also states there is no limit, but indicates the hostname is limited to 255 characters because of DNS limitations (section 2.3.3). Microsoft states that the maximum length of a URL in Internet Explorer is 2,083 characters, with no more than 2,048 characters in the path portion of the URL.May 2, 2009
这篇关于Youtube data api v3 search.list 查询最大长度?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!