[英]How to know number of results with an google search url?
I am coding in Google Apps Script.我正在使用 Google Apps Script 进行编码。
I have an URL like that https://www.google.com.vn/search?q=something
.我有一个像
https://www.google.com.vn/search?q=something
这样的 URL。
I want to send a GET request to that URL and from the response, I can know the number of results that should be show in the top of the SERPs.我想向该 URL 发送 GET 请求,从响应中,我可以知道应该在 SERP 顶部显示的结果数量。 (like the picture)
(如图)
Is there any way for me to do that?有什么办法可以让我这样做吗?
Sending a GET request to a web page will get you html response, instead you can try Google's Custom Search JSON API向网页发送 GET 请求将获得 html 响应,您可以尝试使用Google 的自定义搜索 JSON API
And I quote:我引用:
The JSON Custom Search API lets you develop websites and applications to retrieve and display search results from Google Custom Search programmatically.
JSON 自定义搜索 API 可让您开发网站和应用程序,以编程方式从 Google 自定义搜索中检索和显示搜索结果。 With this API, you can use RESTful requests to get either web search or image search results in JSON format.
借助此 API,您可以使用 RESTful 请求以 JSON 格式获取 Web 搜索或图像搜索结果。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.