Get live news

Retrieve real-time news results from the You.com Search API. Filter by recency, country, language, and more.

View as Markdown

Overview

The Search API automatically returns news articles alongside web results whenever your query has news intent — breaking events, recent announcements, trending topics. You don’t need a separate endpoint or special configuration: just send your query and our classification system determines if news results are relevant.

When news results are returned, they appear in the results.news array alongside results.web.

News-specific fields

Each news result includes:

FieldDescription
titleArticle headline
descriptionArticle summary
urlLink to the article
page_agePublication timestamp (ISO 8601)
thumbnail_urlAssociated image
contentsFull article content (when livecrawl is news or all)

Parameters that improve news results

These parameters tune your news queries for relevance, recency, and safety:

ParameterTypeDescription
countintegerMax results per section (default 10, max 100)
freshnessstringday, week, month, year, or a date range YYYY-MM-DDtoYYYY-MM-DD
countrystringISO 3166-2 country code — focuses results geographically (e.g., US, GB, DE)
languagestringBCP 47 language code — filters by article language (e.g., EN, FR, JP)
safesearchstringContent moderation: off, moderate (default), or strict

freshness — control recency

freshness is the most important parameter for news use cases. Breaking news requires day; trend analysis might use week or month. You can also specify an exact date range.

1from youdotcom.models import Freshness
2
3freshness=Freshness.DAY # Last 24 hours
4freshness=Freshness.WEEK # Last 7 days
5freshness=Freshness.MONTH # Last 30 days
6freshness=Freshness.YEAR # Last 365 days
7freshness="2025-01-01to2025-03-01" # Custom range

Basic news query

1from youdotcom import You
2from youdotcom.models import Freshness
3
4with You(api_key_auth="api_key") as you:
5 res = you.search.unified(
6 query="AI regulation news",
7 freshness=Freshness.DAY,
8 count=10,
9 )
10
11 if res.results and res.results.news:
12 for article in res.results.news:
13 print(f"{article.title}")
14 print(f" {article.url}")
15 print(f" Published: {article.page_age}\n")
16 else:
17 print("No news results returned for this query.")

Filter by country and language

Use country and language together to narrow results to a specific region and language. This is useful for monitoring local news, international media, or non-English markets.

1from youdotcom import You
2from youdotcom.models import Freshness, Country
3
4with You(api_key_auth="api_key") as you:
5 # Get French-language news from France, published this week
6 res = you.search.unified(
7 query="élections",
8 freshness=Freshness.WEEK,
9 country=Country.FR,
10 language="FR",
11 count=10,
12 )
13
14 if res.results and res.results.news:
15 for article in res.results.news:
16 print(f"{article.title} — {article.page_age}")

Custom date range

Use a date range string in YYYY-MM-DDtoYYYY-MM-DD format to target a specific window — useful for historical monitoring or scheduled digests.

1from youdotcom import You
2
3with You(api_key_auth="api_key") as you:
4 res = you.search.unified(
5 query="federal reserve interest rates",
6 freshness="2025-01-01to2025-03-01",
7 count=20,
8 )
9
10 if res.results and res.results.news:
11 for article in res.results.news:
12 print(f"{article.page_age} {article.title}")

Get full article content

The livecrawl parameter allows you to retrieve the full page content of every search result. You can choose to retrieve only news articles, web pages or all search results, using news, web or all respectively.

Then, set livecrawl_formats to either markdown or html based on your needs.

Since we’re focused on news, set it news or all to retrieve the full article text for every search result. Set livecrawl_formats=markdown for LLM-ready output.

1from youdotcom import You
2from youdotcom.models import Freshness, LiveCrawl, LiveCrawlFormats
3
4with You(api_key_auth="api_key") as you:
5 res = you.search.unified(
6 query="climate policy summit",
7 freshness=Freshness.DAY,
8 count=5,
9 livecrawl=LiveCrawl.NEWS,
10 livecrawl_formats=LiveCrawlFormats.MARKDOWN,
11 )
12
13 if res.results and res.results.news:
14 for article in res.results.news:
15 print(f"{article.title}")
16 if article.contents:
17 print(article.contents.markdown[:300])
18 print()

For news monitoring pipelines that need full article bodies, combine livecrawl=news with freshness=day and schedule recurring calls. See Retrieve page content for more on live crawling.


Next steps