简体   繁体   English

如何知道谷歌搜索网址的结果数量?

[英]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.

相关问题 如何在 Google Web 脚本的搜索结果中添加 OR AND - How to add OR AND into search results on Google Web Script 将特定国家/地区的 Google 搜索结果中的关键字数量提取到 Google 表格 - Pulling the number of keywords from Google Search results for a particular country to Google Sheets 如何从谷歌应用程序脚本中的 urlfetch 获取谷歌搜索结果 - How do I get Google search results from urlfetch in google apps script 在 Google 表格中为搜索结果制作临时表 - Make a temporary table for search results in Google Sheets 谷歌表单结果 - 添加序列号 - google forms results - add a serial number 从谷歌搜索结果中抢先 URL - Grab first URL off a Google search result 使用 Google Apps 脚本限制 Google 表格上的过滤结果数量 - restrict number of filter results on Google Sheets with Google Apps Script 如何知道是否使用GAS在Google日历中创建了活动? - How to know if an event is created in Google Calendar with GAS? 如何知道 Google Apps 脚本中 UrlFetchApp 的 IP? - How to know IP of UrlFetchApp in Google Apps Script? 如何知道 Google Apps 脚本的进度状态 - How to know the progress status of a Google Apps script
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM