{
  "id": 22642081,
  "title": "Find your real 24-hour click peak with the Search Console API (hourly data)",
  "url": "https://urgent.news/2026/11/29/find-your-real-24-hour-click-peak-with-the-search-console-api-hourly",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-11-29T19:07:34.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/mapalocal/find-your-real-24-hour-click-peak-with-the-search-console-api-hourly-data-3c7o"
  },
  "original_language": null,
  "account": "The Search Console UI presents a \"last 24 hours\" view, but it updates every hour. If someone only checks it twice a day, they might overlook their actual peak. Last week, their site achieved a high of 307 clicks on its best day, but the rolling 24-hour peak reached 347. The discrepancy was discovered only by utilizing the API.\n\nTo uncover the real peak, the following steps were taken:\n\n1. Request hourly data using the Search Analytics API with dataState: \"hourly_all\" and the hour dimension. This returns the last few days hour by hour, with timestamps in Pacific Time. The necessary credentials were obtained from a service account file with the scope \"https://www.googleapis.com/auth/webmasters.readonly\". The API query was made for the site \"https://example.com/\", with a row limit of 500.\n\n2. Scan a 24-hour window to find the best peak. Initialize a variable \"best\" as (0, None), then iterate through the rows, creating a window of 24 hours. Calculate the total clicks in each window, and if the current window's clicks exceed the best value, update \"best\" with the new clicks and the timestamp of the last hour in the window. Print the peak with the format \"Peak: X clicks in the 24 h ending YYYY-MM-DD HH:MM:SS\". Remember to convert the timestamp to the appropriate time zone before reporting.\n\n3. Examine concentration, not just volume. To differentiate between a spike from a single lucky URL and a spike spread across many pages, use the same API query with the page dimension and daily data. Calculate the total clicks, determine the percentage of pages with clicks, and print the results. In this case, there were 61 pages with clicks, with the top page accounting for only 18% of the total clicks. This indicated that the growth was due to the method rather than a single page.\n\nImportant notes:\n- Hourly data only covers the last ~10 days. Save it if historical data is needed.\n- dataState: \"all\" includes fresh, not-yet-final data; numbers may fluctuate for a couple of days.\n- The 24-hour UI view and the sum can differ by a few clicks due to privacy filtering.\n- A scheduled script was used to generate a daily report and post it to Telegram, ensuring the peak is never missed.",
  "summary": "The Search Console UI shows a \"last 24 hours\" view, but it moves every hour. If you only look at it twice a day you'll miss your real peak. Last week our site hit 307 clicks on its best calendar day, but the rolling 24-hour peak was 347 — and I only found it through the API. Here's the small script. 1. Request hourly data The Search Analytics API accepts dataState: \"hourly_all\" together with the…",
  "summary_source": "publisher",
  "key_points": [
    "Search Console UI updates hourly, missing true peak if checked twice daily",
    "API reveals actual peak: 347 clicks in 24-hour window, not UI's 307",
    "Concentration analysis shows 18% of clicks came from top page, not single URL"
  ],
  "editors_take": null,
  "opinion": false,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "machine_translated": false,
  "ai_generated": true,
  "disclaimer": "Accounts, briefs, key points, the editor’s take and translations are written by software from other outlets’ reporting and may contain errors. A summary whose summary_source is \"publisher\" is the outlet’s own feed text. Always check the linked original."
}