Using the TBS (or equivalent parameter) in Google Custom Search

浪子不回头ぞ 提交于 2019-12-10 20:12:01

问题


When using Google Custom Search the TBM parameter for selecting specific types of search engines (e.g. tbm=pts for patents or tbm=blg for blogs) seems to be supported even though this isn't properly documented in the list of parameters.

However when using such "special" searches one usually extend the query by using the TBS parameter, unfortunately this doesn't work for me. For example: https://www.google.com/?tbm=pts&gws_rd=ssl#q=touch+screen&tbas=0&tbs=ptss:g,ptso:us&tbm=pts filters correctly when posted from a browser.

But the equivalent custom search: https://www.googleapis.com/customsearch/v1?key=*MY_KEY*&cx=*MY_ENGINE*&tbm=pts&q=lice+comb&tbs=ptss:g Completely ignores the TBS parameter.

Is there a way to specify an equivalent parameter in custom search?

来源:https://stackoverflow.com/questions/27096026/using-the-tbs-or-equivalent-parameter-in-google-custom-search

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!