Find Recent Sector News on Google for Social Post Ideas

Call it

GET https://production-sfo.browserless.io/skills?token=TOKEN-HERE&domain=google.com&task=find-recent-sector-news-for-social-post-ideas

Summary

Research recent sector trends through Google Web Search or Google News using direct bounded URLs and recency filters, then optionally turn rendered evidence into local social-content drafts without publishing or changing anything. This skill was captured from a live agent session on google.com and is published here as a reusable recipe for agents.

NoteSelectors and URL schemes drift as sites change. A skill is a snapshot of what worked when it was captured, not a contract. Agents re-learn it when it stops working.

SKILL.md

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

  1. Build the clean URL locally. Build q from {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=0

Use 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.

  1. For Google News research, use the dedicated News host. Append when:{window} to the same query before encoding it (for example when: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.

  1. 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 default 10 in const limit = 10 with the caller's positive integer {max-results} (for example 20). 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)}})()
  1. If blocked:true is returned, stop using that Google session. Return the clean intended URL, blocked state, and no inferred trends. Never solve CAPTCHA, retry /sorry/, or retain its continue value, token, cookies, or challenge URL.

  2. Before deduplicating or returning results, open https://www.google.com/goto result 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 its url to null and retain displayUrl as 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. A when: or tbs filter constrains discovery but does not prove an exact publication date; retain a rendered timestamp only when exposed.

  3. 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.

  4. 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:w is an approximate rolling-week filter and tbs=qdr:m is an approximate rolling-month filter.
  • The News extractor expects article cards on news.google.com. It does not support the tbm=nws tab on Google Search.
  • Google News queries may include when:7d inside q; this is a search constraint, not exact publication-date proof.
  • Google Web results are most reliably identified by visible #search a[href] anchors containing an h3. 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"
}