[{"data":1,"prerenderedAt":717},["ShallowReactive",2],{"learn-nav":3,"learn-surround:\u002Flearn-google-search-console\u002Fapi\u002Fhourly-search-analytics-api":115,"learn-page:\u002Flearn-google-search-console\u002Fapi\u002Fhourly-search-analytics-api":122},[4],{"path":5,"title":6,"children":7,"stem":114,"page":16},"\u002Flearn-google-search-console","Learn GSC",[8,26,47,76,97,106,110],{"path":9,"title":10,"children":11,"stem":25,"page":16},"\u002Flearn-google-search-console\u002Fai-agents","Agents",[12,17,21],{"path":13,"title":14,"stem":15,"page":16},"\u002Flearn-google-search-console\u002Fai-agents\u002Fmcp-server","Check the connection","ai-agents\u002F1.mcp-server",true,{"path":18,"title":19,"stem":20,"page":16},"\u002Flearn-google-search-console\u002Fai-agents\u002Fclaude-code-seo","Claude Code SEO","ai-agents\u002F2.claude-code-seo",{"path":22,"title":23,"stem":24,"page":16},"\u002Flearn-google-search-console\u002Fai-agents\u002Fseo-workflows","SEO workflows","ai-agents\u002F3.seo-workflows","ai-agents\u002Findex",{"path":27,"title":28,"children":29,"stem":46,"page":16},"\u002Flearn-google-search-console\u002Fapi","API",[30,34,38,42],{"path":31,"title":32,"stem":33,"page":16},"\u002Flearn-google-search-console\u002Fapi\u002Fquery-builder","Query builder","api\u002F2.query-builder",{"path":35,"title":36,"stem":37,"page":16},"\u002Flearn-google-search-console\u002Fapi\u002Frate-limits","Rate limits","api\u002F3.rate-limits",{"path":39,"title":40,"stem":41,"page":16},"\u002Flearn-google-search-console\u002Fapi\u002Fauthentication","Authentication","api\u002F4.authentication",{"path":43,"title":44,"stem":45,"page":16},"\u002Flearn-google-search-console\u002Fapi\u002Fhourly-search-analytics-api","Hourly data","api\u002Fhourly-search-analytics-api","api\u002Findex",{"path":48,"title":49,"children":50,"stem":75,"page":16},"\u002Flearn-google-search-console\u002Flimits","Limits",[51,55,59,63,67,71],{"path":52,"title":53,"stem":54,"page":16},"\u002Flearn-google-search-console\u002Flimits\u002F16-month-data-retention","Data retention","limits\u002F1.16-month-data-retention",{"path":56,"title":57,"stem":58,"page":16},"\u002Flearn-google-search-console\u002Flimits\u002Fexport-row-limits","Export limits","limits\u002F2.export-row-limits",{"path":60,"title":61,"stem":62,"page":16},"\u002Flearn-google-search-console\u002Flimits\u002Fbigquery-alternative","BigQuery alternative","limits\u002F3.bigquery-alternative",{"path":64,"title":65,"stem":66,"page":16},"\u002Flearn-google-search-console\u002Flimits\u002F1000-row-limit","1,000-row limit","limits\u002F4.1000-row-limit",{"path":68,"title":69,"stem":70,"page":16},"\u002Flearn-google-search-console\u002Flimits\u002Fdata-delay","Data delay","limits\u002F5.data-delay",{"path":72,"title":73,"stem":74,"page":16},"\u002Flearn-google-search-console\u002Flimits\u002Fgsc-vs-ga4","GSC vs. GA4","limits\u002F6.gsc-vs-ga4","limits\u002Findex",{"path":77,"title":78,"children":79,"stem":96,"page":16},"\u002Flearn-google-search-console\u002Fperformance","Performance reports",[80,84,88,92],{"path":81,"title":82,"stem":83,"page":16},"\u002Flearn-google-search-console\u002Fperformance\u002Fai-powered-configuration","AI-powered configuration","performance\u002Fai-powered-configuration",{"path":85,"title":86,"stem":87,"page":16},"\u002Flearn-google-search-console\u002Fperformance\u002Fbranded-queries-filter","Branded queries","performance\u002Fbranded-queries-filter",{"path":89,"title":90,"stem":91,"page":16},"\u002Flearn-google-search-console\u002Fperformance\u002Fcustom-annotations","Annotations","performance\u002Fcustom-annotations",{"path":93,"title":94,"stem":95,"page":16},"\u002Flearn-google-search-console\u002Fperformance\u002Fgenerative-ai-performance-reports","Generative AI reports","performance\u002Fgenerative-ai-performance-reports","performance\u002Findex",{"path":98,"title":99,"children":100,"stem":105,"page":16},"\u002Flearn-google-search-console\u002Fresearch","Research",[101],{"path":102,"title":103,"stem":104,"page":16},"\u002Flearn-google-search-console\u002Fresearch\u002Fgsc-data-loss-study","Query gaps research","research\u002F1.gsc-data-loss-study","research\u002Findex",{"path":107,"title":108,"stem":109,"page":16},"\u002Flearn-google-search-console\u002Fsocial-platform-properties","Social accounts","social-platform-properties",{"path":111,"title":112,"stem":113,"page":16},"\u002Flearn-google-search-console\u002Fweekly-monthly-views","Weekly and monthly views","weekly-monthly-views","index",[116,119],{"path":39,"title":40,"description":117,"navigation":118},"Set up read-only Google OAuth access, confirm property permissions, and diagnose expired tokens or redirect errors.",{"title":40},{"path":27,"title":28,"description":120,"navigation":121},"Make an authorized Search Console API request, read the returned metrics, and choose the right guide for filters, quotas, or hourly data.",{"title":28},{"title":123,"description":124,"publishedAt":125,"updatedAt":125,"ogImage":126,"body":131,"id":711,"path":43,"stem":45,"extension":712,"navigation":713,"seo":714,"_source":715,"sitemap":716},"Search Console hourly API data: request and check recent hours","Request hourly Search Console data with hour and hourly_all. Preserve timestamp offsets and inspect incomplete-hour metadata before comparing recent traffic.","2026-09-11",{"component":127,"props":128},"Article",{"title":129,"description":130},"Hourly Search Console data","Keep incomplete hours out of finished comparisons",{"toc":132,"nodes":146,"frontmatter":700,"meta":704},{"links":133,"title":144,"searchDepth":145,"depth":145},[134,138,141],{"id":135,"text":136,"depth":137},"make-one-request","Make one request",2,{"id":139,"text":140,"depth":137},"read-the-incomplete-hour-boundary","Read the incomplete-hour boundary",{"id":142,"text":143,"depth":137},"compare-matching-hours","Compare matching hours","",3,[147,179,182,185,205,208,582,592,595,597,619,626,661,668,675,677,680,683,689],[148,149,150,151,158,159,168,169,172,173,178],"p",{},"To request hourly Google Search Console data, group by ",[152,153,154],"strong",{},[155,156,157],"code",{},"hour"," and set ",[152,160,161,164,165],{},[155,162,163],{},"dataState"," to ",[155,166,167],{},"hourly_all",". Google provides up to ",[152,170,171],{},"10 days"," of hourly history through the Search Analytics API, compared with the recent 24-hour window in the interface. ",[174,175,177],"a",{"href":176},"https:\u002F\u002Fdevelopers.google.com\u002Fsearch\u002Fblog\u002F2025\u002F04\u002Fsan-hourly-data","Google introduced hourly API data in April 2025",".",[148,180,181],{},"Start with one day and no page or query filters. Check the returned timestamps and incomplete-data metadata before building a larger comparison.",[183,184,136],"h2",{"id":135},[148,186,187,188,191,192,195,196,199,200,204],{},"You need an ",[174,189,190],{"href":39},"OAuth access token"," with access to the property and the ",[155,193,194],{},"webmasters.readonly"," scope, or the broader ",[155,197,198],{},"webmasters"," scope. A Google API key by itself doesn't authorize this request. The ",[174,201,203],{"href":202},"https:\u002F\u002Fdevelopers.google.com\u002Fwebmaster-tools\u002Fv1\u002Fsearchanalytics\u002Fquery","query reference"," lists the accepted scopes and property formats.",[148,206,207],{},"This example uses a Domain property. Replace it with your property and choose a recent date within the hourly window. Both date endpoints are inclusive and use Pacific Time.",[209,210,213],"pre",{"language":211,"class":212},"js","rangi shiki shj-lang-js",[155,214,216,237,238,237,256,237,258,237,275,237,296,237,298,237,315,237,340,237,345,237,356,237,363,237,380,237,390,237,397,237,414,237,424,237,433,237,449,237,459,237,469,237,477,237,483,237,487,237,489,237,503,237,528,237,530,237,549],{"class":215},"language-js",[217,218,221,226,227,231,232],"span",{"class":219,"style":220},"line","display: inline",[217,222,225],{"class":223,"style":224},"shj-syn-kwd shj-kwd","--shiki-light:#cf222e;--shiki-default:#cf222e;color:#cf222e;--shiki-dark:#ff7b72","const"," siteUrl ",[217,228,230],{"class":229,"style":224},"shj-syn-oper shj-oper","="," ",[217,233,236],{"class":234,"style":235},"shj-syn-str shj-str","--shiki-light:#0a3069;--shiki-default:#0a3069;color:#0a3069;--shiki-dark:#a5d6ff","'sc-domain:example.com'","\n",[217,239,240,242,243,245,246,248,249,251],{"class":219,"style":220},[217,241,225],{"class":223,"style":224}," accessToken ",[217,244,230],{"class":229,"style":224}," process",[217,247,178],{"class":229,"style":224},"env",[217,250,178],{"class":229,"style":224},[217,252,255],{"class":253,"style":254},"shj-syn-num shj-num","--shiki-light:#0550ae;--shiki-default:#0550ae;color:#0550ae;--shiki-dark:#79c0ff","GOOGLE_ACCESS_TOKEN",[217,257],{"class":219,"style":220},[217,259,260,231,263,268,271,272],{"class":219,"style":220},[217,261,262],{"class":223,"style":224},"if",[217,264,267],{"class":265,"style":266},"shj-syn-bracket shj-bracket","--shiki-light:#57606a;--shiki-default:#57606a;color:#57606a;--shiki-dark:#8b949e","(",[217,269,270],{"class":229,"style":224},"!","accessToken",[217,273,274],{"class":265,"style":266},")",[217,276,277,278,231,281,231,284,289,291,294],{"class":219,"style":220},"  ",[217,279,280],{"class":223,"style":224},"throw",[217,282,283],{"class":223,"style":224},"new",[217,285,288],{"class":286,"style":287},"shj-syn-class shj-class","--shiki-light:#953800;--shiki-default:#953800;color:#953800;--shiki-dark:#ffa657","Error",[217,290,267],{"class":265,"style":266},[217,292,293],{"class":234,"style":235},"'Set GOOGLE_ACCESS_TOKEN before requesting data.'",[217,295,274],{"class":265,"style":266},[217,297],{"class":219,"style":220},[217,299,300,302,303,231,305,231,308,313],{"class":219,"style":220},[217,301,225],{"class":223,"style":224}," response ",[217,304,230],{"class":229,"style":224},[217,306,307],{"class":223,"style":224},"await",[217,309,312],{"class":310,"style":311},"shj-syn-func shj-func","--shiki-light:#8250df;--shiki-default:#8250df;color:#8250df;--shiki-dark:#d2a8ff","fetch",[217,314,267],{"class":265,"style":266},[217,316,277,317,320,323,326,328,329,331,334,337],{"class":219,"style":220},[217,318,319],{"class":234,"style":235},"`https:\u002F\u002Fwww.googleapis.com\u002Fwebmasters\u002Fv3\u002Fsites\u002F",[217,321,322],{"class":223,"style":224},"${",[217,324,325],{"class":310,"style":311},"encodeURIComponent",[217,327,267],{"class":265,"style":266},"siteUrl",[217,330,274],{"class":265,"style":266},[217,332,333],{"class":223,"style":224},"}",[217,335,336],{"class":234,"style":235},"\u002FsearchAnalytics\u002Fquery`",[217,338,339],{"class":229,"style":224},",",[217,341,277,342],{"class":219,"style":220},[217,343,344],{"class":265,"style":266},"{",[217,346,347,348,231,351,354],{"class":219,"style":220},"    method",[217,349,350],{"class":229,"style":224},":",[217,352,353],{"class":234,"style":235},"'POST'",[217,355,339],{"class":229,"style":224},[217,357,358,359,231,361],{"class":219,"style":220},"    headers",[217,360,350],{"class":229,"style":224},[217,362,344],{"class":265,"style":266},[217,364,365,366,231,368,371,271,373,375,378],{"class":219,"style":220},"      Authorization",[217,367,350],{"class":229,"style":224},[217,369,370],{"class":234,"style":235},"`Bearer ",[217,372,322],{"class":223,"style":224},[217,374,333],{"class":223,"style":224},[217,376,377],{"class":234,"style":235},"`",[217,379,339],{"class":229,"style":224},[217,381,382,383,231,385,388],{"class":219,"style":220},"      'Content-Type'",[217,384,350],{"class":229,"style":224},[217,386,387],{"class":234,"style":235},"'application\u002Fjson'",[217,389,339],{"class":229,"style":224},[217,391,392,393,395],{"class":219,"style":220},"    ",[217,394,333],{"class":265,"style":266},[217,396,339],{"class":229,"style":224},[217,398,399,400,231,402,405,407,410,412],{"class":219,"style":220},"    body",[217,401,350],{"class":229,"style":224},[217,403,404],{"class":253,"style":254},"JSON",[217,406,178],{"class":229,"style":224},[217,408,409],{"class":310,"style":311},"stringify",[217,411,267],{"class":265,"style":266},[217,413,344],{"class":265,"style":266},[217,415,416,417,231,419,422],{"class":219,"style":220},"      startDate",[217,418,350],{"class":229,"style":224},[217,420,421],{"class":234,"style":235},"'2026-09-10'",[217,423,339],{"class":229,"style":224},[217,425,426,427,231,429,431],{"class":219,"style":220},"      endDate",[217,428,350],{"class":229,"style":224},[217,430,421],{"class":234,"style":235},[217,432,339],{"class":229,"style":224},[217,434,435,436,231,438,441,444,447],{"class":219,"style":220},"      dimensions",[217,437,350],{"class":229,"style":224},[217,439,440],{"class":265,"style":266},"[",[217,442,443],{"class":234,"style":235},"'hour'",[217,445,446],{"class":265,"style":266},"]",[217,448,339],{"class":229,"style":224},[217,450,451,452,231,454,457],{"class":219,"style":220},"      dataState",[217,453,350],{"class":229,"style":224},[217,455,456],{"class":234,"style":235},"'hourly_all'",[217,458,339],{"class":229,"style":224},[217,460,461,462,231,464,467],{"class":219,"style":220},"      type",[217,463,350],{"class":229,"style":224},[217,465,466],{"class":234,"style":235},"'web'",[217,468,339],{"class":229,"style":224},[217,470,392,471,473,475],{"class":219,"style":220},[217,472,333],{"class":265,"style":266},[217,474,274],{"class":265,"style":266},[217,476,339],{"class":229,"style":224},[217,478,277,479,481],{"class":219,"style":220},[217,480,333],{"class":265,"style":266},[217,482,339],{"class":229,"style":224},[217,484,485],{"class":219,"style":220},[217,486,274],{"class":265,"style":266},[217,488],{"class":219,"style":220},[217,490,491,231,493,495,497,498,500,501],{"class":219,"style":220},[217,492,262],{"class":223,"style":224},[217,494,267],{"class":265,"style":266},[217,496,270],{"class":229,"style":224},"response",[217,499,178],{"class":229,"style":224},"ok",[217,502,274],{"class":265,"style":266},[217,504,277,505,231,507,231,509,511,513,516,497,518,520,521,523,526],{"class":219,"style":220},[217,506,280],{"class":223,"style":224},[217,508,283],{"class":223,"style":224},[217,510,288],{"class":286,"style":287},[217,512,267],{"class":265,"style":266},[217,514,515],{"class":234,"style":235},"`Search Console returned HTTP ",[217,517,322],{"class":223,"style":224},[217,519,178],{"class":229,"style":224},"status",[217,522,333],{"class":223,"style":224},[217,524,525],{"class":234,"style":235},".`",[217,527,274],{"class":265,"style":266},[217,529],{"class":219,"style":220},[217,531,532,534,535,231,537,539,540,542,545,547],{"class":219,"style":220},[217,533,225],{"class":223,"style":224}," result ",[217,536,230],{"class":229,"style":224},[217,538,307],{"class":223,"style":224}," response",[217,541,178],{"class":229,"style":224},[217,543,544],{"class":310,"style":311},"json",[217,546,267],{"class":265,"style":266},[217,548,274],{"class":265,"style":266},[217,550,551,552,554,557,559,561,563,565,567,568,231,570,573,231,575,578,580],{"class":219,"style":220},"console",[217,553,178],{"class":229,"style":224},[217,555,556],{"class":310,"style":311},"log",[217,558,267],{"class":265,"style":266},[217,560,404],{"class":253,"style":254},[217,562,178],{"class":229,"style":224},[217,564,409],{"class":310,"style":311},[217,566,267],{"class":265,"style":266},"result",[217,569,339],{"class":229,"style":224},[217,571,572],{"class":253,"style":254},"null",[217,574,339],{"class":229,"style":224},[217,576,577],{"class":253,"style":254},"2",[217,579,274],{"class":265,"style":266},[217,581,274],{"class":265,"style":266},[148,583,584,585,588,589,591],{},"Run this as a ",[155,586,587],{},".mjs"," file in a Node version with built-in ",[155,590,312],{},", with the token supplied through your environment. Update the example date before running it later. Keep the token out of source files and shared terminal logs.",[148,593,594],{},"The request shape was checked against Google's documentation. The code was exercised with local response fixtures, including an HTTP failure. It wasn't run against an authenticated Google API account for this article.",[183,596,140],{"id":139},[148,598,599,600,604,605,608,609,614,615,618],{},"The current ",[174,601,603],{"href":602},"https:\u002F\u002Fsearchconsole.googleapis.com\u002F$discovery\u002Frest?version=v1","API discovery schema",", revision ",[155,606,607],{},"20260909",", names the JSON field ",[152,610,611],{},[155,612,613],{},"metadata.firstIncompleteHour",". Google's descriptive text also refers to it as ",[155,616,617],{},"first_incomplete_hour","; use the camelCase field when reading JSON.",[148,620,621,622,625],{},"For example, this is an ",[152,623,624],{},"illustrative metadata fragment",", not a captured response:",[209,627,629],{"language":544,"class":628},"rangi shiki shj-lang-json",[155,630,632,237,636,237,645,237,653,237,657],{"class":631},"language-json",[217,633,634],{"class":219,"style":220},[217,635,344],{"class":265,"style":266},[217,637,277,638,642,643],{"class":219,"style":220},[217,639,641],{"class":640,"style":254},"shj-syn-var shj-var","\"metadata\"",": ",[217,644,344],{"class":265,"style":266},[217,646,392,647,642,650],{"class":219,"style":220},[217,648,649],{"class":640,"style":254},"\"firstIncompleteHour\"",[217,651,652],{"class":234,"style":235},"\"2026-09-10T15:00:00-07:00\"",[217,654,277,655],{"class":219,"style":220},[217,656,333],{"class":265,"style":266},[217,658,659],{"class":219,"style":220},[217,660,333],{"class":265,"style":266},[148,662,663,664,667],{},"Treat ",[152,665,666],{},"15:00 and later"," as incomplete in this example. The field marks the first affected hour, so excluding only hours after 15:00 would leave that incomplete hour in your comparison.",[148,669,670,671,674],{},"Preserve the offset in each timestamp. Compare parsed instants when ordering rows; don't strip the offset or assume the browser's local time matches the report. The discovery schema describes this metadata in the ",[155,672,673],{},"America\u002FLos_Angeles"," time zone.",[183,676,143],{"id":142},[148,678,679],{},"For a daily check, compare the same completed portion of each day. If today's data is incomplete from 15:00, comparing it with all of yesterday would build a shortfall into the calculation.",[148,681,682],{},"Keep incomplete hours visible as provisional data when they help you monitor a new page. Separate them from any total you label finished. Re-request recent periods when you need to update a saved result.",[148,684,685,686,178],{},"A missing metadata field doesn't prove complete coverage. It also doesn't turn absent rows into zero-traffic hours. Check the date window, filters, and response before filling gaps in a chart. The API ",[174,687,688],{"href":202},"returns top rows rather than guaranteeing every data row",[148,690,691,692,695,696,699],{},"If you only need an interactive check of the latest available hours, use the report's ",[152,693,694],{},"24 hours"," view. Use ",[174,697,698],{"href":111},"daily, weekly, or monthly views"," for longer trends; the hourly window doesn't replace daily history.",{"publishedAt":125,"updatedAt":125,"title":123,"description":124,"navigation":701,"ogImage":702},{"title":44},{"component":127,"props":703},{"title":129,"description":130},{"description":705,"toc":706},"To request hourly Google Search Console data, group by hour and set dataState to hourly_all. Google provides up to 10 days of hourly history through the Search Analytics API, compared with the recent 24-hour window in the interface. Google introduced hourly API data in April 2025.",{"title":144,"searchDepth":145,"depth":145,"links":707},[708,709,710],{"id":135,"depth":137,"text":136},{"id":139,"depth":137,"text":140},{"id":142,"depth":137,"text":143},"learnGsc\u002Fapi\u002Fhourly-search-analytics-api.md","md",{"title":44},{"title":123,"description":124},"\u002Fopt\u002Factions-runner\u002F_work\u002Fgscdump.com\u002Fgscdump.com\u002Fcontent\u002Flearn-google-search-console\u002Fapi\u002Fhourly-search-analytics-api.md",{"loc":43,"lastmod":125},1793234288316]