Prompt
How can I collect news headlines from different sources?
Latest observation
You have a few good options, depending on how many sources you want and how automated you need it to be:
1. Use news APIs
Best if you want structured data and reliable access.
Examples:
- NewsAPI – aggregates headlines from many outlets
- GDELT – global news monitoring
- Bing News Search API
- The Guardian API, NYT API, etc. for specific publishers
Typical workflow:
- Sign up for an API key
- Send a request for headlines by topic, country, language, or source
- Parse the JSON response and store title, source, URL, and publish time
Example in Python:
import requests
url = "https://newsapi.org/v2/top-headlines"
params = {
"country": "us",
"apiKey": "YOUR_API_KEY"
}
response = requests.get(url, params=params)
data = response.json()
for article in data["articles"]:
print(article["source"]["name"], "-", article["title"])
2. Scrape RSS feeds
Best if the news sites provide RSS. This is often the easiest free method.
Steps:
- Find RSS feed URLs from each source
- Use a parser like
feedparser - Extract headline, link, and published date
Example:
import feedparser
feeds = [
"https://rss.nytimes.com/services/xml/rss/nyt/HomePage.xml",
"https://feeds.bbci.co.uk/news/rss.xml"
]
for feed_url in feeds:
feed = feedparser.parse(feed_url)
for entry in feed.entries[:5]:
print(feed_url, "-", entry.title)
3. Scrape the website directly
Useful when there’s no API or RSS feed, but this is less stable.
Tools:
requests+BeautifulSoupScrapyplaywright/seleniumfor JavaScript-heavy sites
Be careful:
- Check the site’s terms of service
- Respect robots.txt
- Avoid aggressive crawling
4. Use a news aggregator platform
If you only need collected headlines, these may already do the aggregation:
- Google News
- Apple News
- Feedly
Some offer export or integration options.
5. Build a multi-source pipeline
A common approach:
- Collect from RSS and APIs
- Normalize fields into one format:
sourceheadlineurlpublished_attopic
- Deduplicate similar headlines
- Store in a database or spreadsheet
Example schema:
{
"source": "BBC",
"headline": "Markets rally after inflation data",
"url": "https://...",
"published_at": "2026-07-15T08:30:00Z"
}
Recommended approach
- Few sources, low effort: RSS feeds
- Many sources, cleaner structure: News APIs
- Custom or niche sites: Web scraping
If you want, I can help you with:
- a Python script that collects headlines from multiple RSS feeds,
- a script using a news API, or
- a scraper for specific websites.
Observation history
Unlock observation history
Create a free Obsurfable account to unlock historical responses, model comparisons, and deeper brand intelligence.
How did Obsurfable measure this prompt?
Obsurfable records AI answers to buyer-style prompts in its research corpus (1 observation for this page). Metrics are distributions over observations, not a single static ranking.
Which AI systems does Obsurfable collect answers from?
OpenAI, ChatGPT, Google, Gemini, Google AI Mode, Anthropic, Claude, Perplexity, Grok, DeepSeek, Mistral, Copilot, and Meta AI.