谷歌搜索控制台,搜索分析,获取更多的数据 [英] google search console, search analytics, get more data
问题描述
我试图使用谷歌搜索控制台API来从我的网站获取一些数据。在我的代码下面用来做到这一点:à
service = build('webmasters','v3',http = http)
collection = service.searchanalytics()
request = {
'startDate':'2015-10-24',
'endDate':'2015-10- 25',
'维度':['query','page','device'],
'searchType':'web',
'rowLimit':'5000'
$ b $ response = collection.query(siteUrl = property_uri,body = request).execute()
我的问题是,我只能够约1000行。我想知道是否有办法获得我所有的网站数据。例如发送另一个请求以获取1000行下一行等等。
现在,如果我重复请求,我会得到相同的响应。
感谢您的帮助
正如文档状态:行的有效范围为1到5000,并且
因此,您最多限制5000个数据行(至少比浏览器界面会提供的1000行更多)。
有效的行数似乎也会有所不同,具体取决于过滤器和聚合设置。
编辑:支持对于分页结果来说,最近已经到来了,就像看起来一样。现在有一个名为startRow的参数,它之前没有出现过,它按预期工作。
I'am trying to use google search console api to get some data out of my website. Below my code used to do that:à
service = build('webmasters', 'v3', http=http)
collection = service.searchanalytics()
request = {
'startDate': '2015-10-24',
'endDate': '2015-10-25',
'dimensions': ['query','page', 'device'],
'searchType': 'web',
'rowLimit': '5000'
}
response = collection.query(siteUrl=property_uri, body=request).execute()
My problem is that I'am only able to about 1000 row. I was wondering if there was a way to get all my website data. For example send another request to get the 1000 next row and so on. Right now, if I repeat the request I get the same response.
Thanks for your help
As the documentation states: the valid range of rows is 1 to 5000 and "The API does not support paged results" (as opposed to the previous version of the then-called Webmaster Tools API).
So you are limited to a maximum of 5000 data rows (at least that's more than the 1000 lines that the browser interface will give you).
The effective number of rows also seems to vary, depending on filter and aggregation settings.
EDIT: Support for paged results has arrived lately, as it seems. There's now a parameter named "startRow" that has not been there before and it works as expected.
这篇关于谷歌搜索控制台,搜索分析,获取更多的数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!