Skip to content

Conversation

@tyler5673
Copy link
Contributor

@tyler5673 tyler5673 commented Jan 29, 2026

[2.2.0] - 2026-01-29

Performance and integration tests have all been updated with this change as well

Changed

  • Renamed SearchContents to Contents: The SearchContents model has been renamed to Contents and moved to its own module (youdotcom.models.contents). The interface remains the same with html and markdown fields.

Added

  • News results now support contents field: When using livecrawl=NEWS or livecrawl=ALL, news results can now include crawled page contents (HTML and/or Markdown), just like web results. This enables richer news content retrieval.
from youdotcom.models import LiveCrawl, LiveCrawlFormats

# Get news with crawled contents
res = you.search.unified(
    query="technology news",
    livecrawl=LiveCrawl.NEWS,
    livecrawl_formats=LiveCrawlFormats.MARKDOWN,
)

for news_item in res.results.news:
    if news_item.contents:
        print(news_item.contents.markdown)

Removed

  • SearchContents: Replaced by Contents. If you were importing SearchContents directly, update your imports to use Contents.

@tyler5673 tyler5673 merged commit b4bcce7 into main Jan 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants