Skip to main content
Search real-time news articles with date and country filtering. News mode is optimised for finding current events, breaking news, and journalism content.

What You Can Do

  • Media monitoring - Track news coverage across topics and brands
  • Current events - Get up-to-the-minute news on any subject
  • Journalism research - Find sources and verify facts
  • PR and brand tracking - Monitor mentions and sentiment
  • Trend analysis - Identify emerging stories and patterns

Features

Real-Time News

Access current news articles from sources worldwide.

Date Filtering

Filter by publication date for time-sensitive research.

Country Targeting

Focus on specific regions with country code filtering.

100 Results

Retrieve up to 100 results per query for comprehensive coverage.

Quick Start

Search for news articles on any topic:
from valyu import Valyu

valyu = Valyu()  # Uses VALYU_API_KEY from env

response = valyu.search(
    query="artificial intelligence regulation updates",
    search_type="news",
    max_num_results=20,
)

for result in response["results"]:
    print(f"Title: {result['title']}")
    print(f"Date: {result.get('publication_date', 'N/A')}")
    print(f"URL: {result['url']}")
    print("---")
Filter news by publication date range:
from valyu import Valyu

valyu = Valyu()

response = valyu.search(
    query="climate change policy announcements",
    search_type="news",
    max_num_results=50,
    start_date="2025-01-01",
    end_date="2025-12-31",
)

print(f"Found {len(response['results'])} articles from 2025")

for result in response["results"][:5]:
    print(f"{result.get('publication_date', 'N/A')}: {result['title']}")
Focus on news from specific regions:
from valyu import Valyu

valyu = Valyu()

# US news
us_news = valyu.search(
    query="technology startup funding rounds",
    search_type="news",
    max_num_results=30,
    country_code="US",
)

# UK news
uk_news = valyu.search(
    query="technology startup funding rounds",
    search_type="news",
    max_num_results=30,
    country_code="GB",
)

print(f"US articles: {len(us_news['results'])}")
print(f"UK articles: {len(uk_news['results'])}")
Use ISO 3166-1 alpha-2 country codes: US (United States), GB (United Kingdom), DE (Germany), FR (France), etc.

100 Results

News mode supports up to 100 results per query. This requires the increased_max_results permission on your API key. To enable 100 results:
  1. Go to API Key Management
  2. Request the increased_max_results permission
  3. Create a new API key after approval
Without this permission, the default maximum is 20 results per query.
from valyu import Valyu

valyu = Valyu()  # Use API key with increased_max_results permission

response = valyu.search(
    query="electric vehicle market news",
    search_type="news",
    max_num_results=100,  # Requires increased_max_results permission
    start_date="2025-01-01",
    country_code="US",
)

print(f"Retrieved {len(response['results'])} news articles")

# Process all 100 results
for i, article in enumerate(response["results"], 1):
    print(f"{i}. {article['title']}")

Use Case Examples

Multi-Topic News Monitoring

Track multiple topics in a single monitoring workflow:
from valyu import Valyu
from datetime import datetime, timedelta

valyu = Valyu()

def monitor_topics(topics: list, days_back: int = 7):
    """Monitor multiple news topics with date filtering."""
    end_date = datetime.now().strftime("%Y-%m-%d")
    start_date = (datetime.now() - timedelta(days=days_back)).strftime("%Y-%m-%d")
    
    results = {}
    
    for topic in topics:
        response = valyu.search(
            query=topic,
            search_type="news",
            max_num_results=20,
            start_date=start_date,
            end_date=end_date,
        )
        
        if response.get("success"):
            results[topic] = {
                "count": len(response["results"]),
                "articles": response["results"]
            }
            print(f"📰 {topic}: {len(response['results'])} articles")
    
    return results

# Monitor tech and business topics
news = monitor_topics([
    "artificial intelligence breakthroughs",
    "cryptocurrency regulation",
    "renewable energy investments",
    "tech layoffs announcements"
])

Brand Monitoring

Track news mentions for brands or companies:
from valyu import Valyu

valyu = Valyu()

def brand_monitoring(brand: str, competitor_brands: list = None):
    """Monitor news for a brand and its competitors."""
    
    # Main brand news
    brand_news = valyu.search(
        query=f"{brand} news announcements",
        search_type="news",
        max_num_results=50,
    )
    
    print(f"=== {brand} News ===")
    print(f"Found {len(brand_news['results'])} articles")
    
    for article in brand_news["results"][:5]:
        print(f"  - {article['title']}")
    
    # Competitor comparison
    if competitor_brands:
        print(f"\n=== Competitor Coverage ===")
        for competitor in competitor_brands:
            comp_news = valyu.search(
                query=f"{competitor} news",
                search_type="news",
                max_num_results=20,
            )
            print(f"{competitor}: {len(comp_news['results'])} articles")
    
    return brand_news

# Monitor Tesla and competitors
tesla_news = brand_monitoring(
    brand="Tesla",
    competitor_brands=["Rivian", "Lucid Motors", "Ford EV"]
)

Breaking News Tracker

Monitor for breaking news on specific topics:
from valyu import Valyu
from datetime import datetime

valyu = Valyu()

def breaking_news(topics: list, hours_back: int = 24):
    """Get recent breaking news on topics."""
    
    # Use today's date for recent news
    today = datetime.now().strftime("%Y-%m-%d")
    
    print(f"=== Breaking News ({today}) ===\n")
    
    for topic in topics:
        response = valyu.search(
            query=f"{topic} breaking news today",
            search_type="news",
            max_num_results=10,
            start_date=today,
            end_date=today,
        )
        
        if response.get("success") and response["results"]:
            print(f"🔴 {topic.upper()}")
            for article in response["results"][:3]:
                print(f"   • {article['title']}")
                print(f"     {article['url']}")
            print()

# Track breaking news
breaking_news([
    "stock market",
    "federal reserve",
    "technology",
    "politics"
])

Best Practices

  1. Use date filtering - Always set start_date and end_date for time-sensitive queries
  2. Target regions - Use country_code to focus on specific markets
  3. Request 100 results - For comprehensive coverage, get the increased_max_results permission
  4. Combine with web search - Use search_type="all" when you need both news and web content
  5. Monitor regularly - Set up automated monitoring for ongoing topics
For AI agent workflows, set is_tool_call=true to optimise results for LLM consumption.

Next Steps