4

I'm using the API explorer on the side of this page.

When I query the API with this JSON

{
  "startDate": "2017-07-01",
  "endDate": "2017-07-01",
  "startRow": 0,
  "rowLimit": 5000,
  "dimensions": [
    "page",
    "device",
    "country",
    "date",
    "query"
  ]
}

I get a result with 4248 rows.

If I run this query again, but with both startDate and endDate as 2017-07-02, I get 4355 rows.

Now, if I run it a third time with startDate as 2017-07-01 and endDate as 2017-07-02, I only get 3947 rows.

I would expect that since I have date included in dimensions, that the two dates wouldn't interfere with one another, and I would get back 4248 + 4355 = 8603 rows. What's going on here?

  • Set dimension to only page and run the query again. I think you're getting different result because you've set some dimension. If you analysis all three reports raw, then you'll get idea yourself how dimension works. I have not personally used my self search console API, so I can't say more. – Goyllo Jul 11 '17 at 8:00
  • Do you get the same numbers from within Search Console without the api? – Kristian Svensson Jul 11 '17 at 13:56
  • @Kristian It's hard to say. Search Console limits you to 999 results; the API does not seem to have a limit. – mcm Jul 11 '17 at 14:14
2

I figured out the issue. I was assuming that when I got fewer than 5000 rows in my results, then I had grabbed all available data.

However, the API often returns fewer than 5000 rows even if your row limit is set to 5000. I found that when I continued to increment startRow until there were no rows in my results, then the numbers added up properly.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.