Real-Time News Tracking
On this page
Build an intelligent news feed
Traditional news feeds (RSS, Google Alerts) drown you in raw information. The Grok API lets you build a system that not only retrieves news but filters, contextualizes, and prioritizes it based on your business criteria.
You don’t want to know everything that’s happening. You want to know what matters for your business, why it’s important, and what you should do about it.
Configurable thematic alerts
Create custom alerts that go well beyond simple keywords:
def alerte_thematique(theme, contexte_entreprise):
response = client.responses.create(
model="grok-4.5",
input=f"""Search for news from the last 24h
on the theme: {theme}
Context: {contexte_entreprise}
For each relevant news item, indicate:
1. The fact (one-sentence summary)
2. Potential impact on our business
3. Urgency (immediate / monitor / context)
4. Recommended action
Keep only news items truly
relevant to our context.""",
tools=[{"type": "web_search"}]
)
return response.output_text
alerte = alerte_thematique(
theme="AI regulation in Europe",
contexte_entreprise="SaaS company offering AI tools for French SMEs"
)
Real-time multi-source tracking
Combine web and X to get a complete real-time view of an ongoing event:
def suivi_evenement(evenement):
response = client.responses.create(
model="grok-4.5",
input=f"""Real-time tracking of: {evenement}
1. CONFIRMED FACTS (official web sources)
- What is verified and published
2. IMMEDIATE REACTIONS (X/Twitter)
- What experts and influencers are saying
3. TIMELINE
- Sequence of known events
4. UNCERTAINTIES
- What is not yet confirmed
Clearly distinguish facts from speculation.""",
tools=[
{"type": "web_search"},
{"type": "x_search"}
]
)
return response.output_text
Automated sector newsletter
Generate a structured newsletter from sector news:
def newsletter_secteur(secteur, sources_fiables):
response = client.responses.create(
model="grok-4.5",
input=f"""Write a professional newsletter on
the {secteur} sector for the past week.
Structure:
- Editorial: the highlight of the week (3 sentences)
- Top 5 news items (summary + source)
- Figure of the week (notable data)
- Watch list (emerging trend)
Tone: professional, concise, factual.
Length: 500 words maximum.""",
tools=[{
"type": "web_search",
"allowed_domains": sources_fiables
}]
)
return response.output_text
Crisis monitoring
In a crisis situation (bad buzz, technical incident, unexpected regulation), speed of information is critical:
def monitoring_crise(sujet_crise, notre_marque):
response = client.responses.create(
model="grok-4.5",
input=f"""CRISIS MONITORING - {sujet_crise}
1. Scope: what is the current media coverage?
2. Virality on X: is the topic trending?
3. Mentions of {notre_marque}: are we associated?
4. Dominant narratives: which angles are being picked up?
5. Influencers involved: who is amplifying the message?
Prioritize accuracy over speed.
Cite all sources.""",
tools=[
{"type": "web_search"},
{
"type": "x_search",
"enable_image_understanding": True
}
]
)
return response.output_text
Manage volume and relevance
The main challenge in news tracking is not collection but filtering. Here are a few techniques to improve relevance:
- Define a precise business context in each prompt so the model filters with full knowledge
- Prioritize by asking for ranking by impact or urgency
- Differentiate sources: explicitly ask to separate verified facts from opinions
- Limit volume: ask for a specific number of news items (top 5, top 10) to force prioritization
Hands-on practice
Configure news tracking on a professional topic of your choice. Run it for three consecutive days and evaluate the relevance and freshness of the results. Adjust the prompt and filters to optimize the signal-to-noise ratio.
Key takeaways
- Contextualized thematic alerts are more useful than keyword alerts
- Combining web + X gives a complete view (facts + reactions)
- Structure prompts with business context to improve filtering
- Crisis monitoring requires both sources with image analysis
- Always ask for prioritization to avoid information overload
- Automated newsletters are a proven format for internal distribution