Given {sector} and optional {keywords}, {window}, {language}, {country-code}, and {max-results}, collect rendered evidence of recent developments through Google Search or Google News. In research-only mode, return the evidence. For local drafts, use {audience} and {platforms} to shape the ideas, cite observed source URLs, and avoid claims of virality.
Use Cases
- Building a social-post plan from topics observed during a recent window such as the past 7 days.
- Finding recent sector developments through Google News or date-filtered Web Search.
- Creating local Instagram, TikTok, LinkedIn, Facebook, or similar draft ideas from bounded evidence.
- Handling Google anti-bot or consent states safely without bypassing them.
- Comparing recent trends across locales, audiences, or content formats.
- For keyword rankings without a recency window, use Competitive Google SERP Research.
Automation Flow
- Build the clean URL locally. Build
qfrom{sector}and any caller-supplied{keywords}, not from{audience}or{platforms}. For a rolling Web Search window, use:
https://www.google.com/search?q={url-encoded-sector-and-keywords}&tbs=qdr:{window}&hl={language}&gl={country-code}&pws=0Use tbs=qdr:m for approximately one month and tbs=qdr:w for approximately one week. For exact calendar bounds, put after:{after-date} before:{before-date} inside the encoded query.
- For Google News research, use the dedicated News host. Append
when:{window}to the same query before encoding it (for examplewhen:7d):
https://news.google.com/search?q={url-encoded-sector-keywords-and-when-filter}&hl={language}&gl={country-code}&ceid={country-code}:{language}Omit locale parameters unless requested. Remove sei, ved, ei, oq, session, continuation, consent, and challenge parameters.
- Navigate once to the selected clean URL with
waitUntil: "domcontentloaded", wait briefly for rendering, and run this evaluator in the same browser-agent call. Replace the default10inconst limit = 10with the caller's positive integer{max-results}(for example20). This caps extraction; it does not change the number of results Google renders.
(()=>{const limit = 10; const clean=s=>(s||'').replace(/\s+/g,' ').trim();const visible=e=>!!e&&(e.offsetWidth||e.offsetHeight||e.getClientRects().length)>0;const u=new URL(location.href),body=clean(document.body?.innerText);const blocked=/^\/sorry(?:\/|$)/i.test(u.pathname)||!!document.querySelector('#captcha-form,iframe[src*="recaptcha"]')||(/captcha|unusual traffic|verify you are human|automated queries|consent/i.test(body)&&!document.querySelector('#search'));const isNews=u.hostname==='news.google.com';const out=[];if(!isNews){for(const a of document.querySelectorAll('#search a[href]')){const h=a.querySelector('h3');if(!h||!visible(a)||!a.href)continue;let url=a.href;try{const x=new URL(url,location.href);if(x.protocol!=='http:'&&x.protocol!=='https:')continue;x.hash='';url=x.href}catch{continue}const card=a.closest('[data-snhf]')||a.closest('div')||a.parentElement;out.push({title:clean(h.textContent),url,displayUrl:clean(card?.querySelector('cite')?.textContent||a.querySelector('cite')?.textContent)||null,snippet:clean(card?.innerText||a.innerText).slice(0,1200)})}}else{for(const card of document.querySelectorAll('article,[role="article"]')){if(!visible(card))continue;const a=[...card.querySelectorAll('a[href]')].find(x=>visible(x)&&/^https?:/i.test(x.href));const title=clean(card.querySelector('h1,h2,h3,h4,[role="heading"]')?.textContent||a?.textContent);if(!title||!a)continue;const time=card.querySelector('time');out.push({title,url:a.href,publisher:clean(card.querySelector('[class*="source" i],[class*="publisher" i],[data-testid*="source" i]')?.textContent)||null,published:clean(time?.getAttribute('datetime')||time?.textContent)||null,snippet:clean(card.innerText).slice(0,1200)})}}const results=out.slice(0,limit).map((x,i)=>({...x,rank:i+1}));return{success:!blocked,isGoogleSearch:/(^|\.)google\.com$/i.test(u.hostname)&&u.pathname==='/search'&&!isNews,isGoogleNews:isNews,url:location.href,query:u.searchParams.get('q')||'',dateFilter:u.searchParams.get('tbs')||null,window:(u.searchParams.get('q')||'').match(/\bwhen:[^\s]+/i)?.[0]||null,language:u.searchParams.get('hl')||null,countryCode:u.searchParams.get('gl')||null,blocked,results,resultCount:results.length,bodyExcerpt:body.slice(0,1800)}})()If
blocked:trueis returned, stop using that Google session. Return the clean intended URL, blocked state, and no inferred trends. Never solve CAPTCHA, retry/sorry/, or retain itscontinuevalue, token, cookies, or challenge URL.Before deduplicating or returning results, open
https://www.google.com/gotoresult links in a separate tab in the same browser session and record the final article URL. If a link fails to resolve to an article, set itsurltonulland retaindisplayUrlas display text, not as a citation. Do not return the session-bound redirect or try to bypass a challenge. Deduplicate resolved results by destination URL plus title, preserving the first rank and the rendered evidence. Awhen:ortbsfilter constrains discovery but does not prove an exact publication date; retain a rendered timestamp only when exposed.For additional Web Search pages, use
start=10,start=20, and so on until the combined results reach the caller's bound, no new URLs appear, or a page is blocked. Do not fabricate Google News continuation URLs.In research-only mode, return the evidence collection and stop. Otherwise use
{audience}and{platforms}to create local drafts from the evidence with{platform},{format},{workingTitle},{hookOrAngle},{audienceValue},{callToAction}, and{sourceUrls}. Label interpretation as an editorial angle or hypothesis. Never publish, schedule, save, authenticate, contact publishers, or modify destination pages.
Possible Friction Points
- Google Web Search uses
/search?q=...;tbs=qdr:wis an approximate rolling-week filter andtbs=qdr:mis an approximate rolling-month filter. - The News extractor expects article cards on
news.google.com. It does not support thetbm=nwstab on Google Search. - Google News queries may include
when:7dinsideq; this is a search constraint, not exact publication-date proof. - Google Web results are most reliably identified by visible
#search a[href]anchors containing anh3. News markup is less stable, so prefer visible article cards and headings. - Responsive markup may duplicate rows. Deduplicate by normalized URL and title while preserving bounded visible evidence.
- Search rankings, snippets, timestamps, locale, personalization, indexed coverage, and markup change over time. They are not proof of virality, popularity, factual accuracy, or exhaustive sector coverage.
/sorry/, CAPTCHA, consent, unusual-traffic, verification, and login pages are blocked states, not empty result sets. Do not bypass them or infer that no trends exist.- Keep
{sector},{audience},{platforms}, locale, date window, and result limit as caller inputs; never bake a specific topic or result into the skill. - Drafts are local read-only output. Do not publish, schedule, save, comment, contact publishers, or submit content to any platform.
Example Result
{
"success": true,
"isGoogleSearch": false,
"isGoogleNews": false,
"url": "https://example.com/search?q=example",
"query": "example",
"dateFilter": null,
"window": null,
"language": "en",
"countryCode": "us",
"blocked": false,
"results": [
{
"title": "Example Title",
"url": "https://example.com/article",
"snippet": "Example Title Example snippet",
"rank": 1
}
],
"resultCount": 1,
"bodyExcerpt": "Example Title Example snippet"
}