Skip to content

News

Version Note

get_news() uses the News Flow v2 API and was added in 1.4.0.

News gives you three separate entry points:

  • get_news() for flow-style filtered news
  • get_news_headlines() for symbol headlines
  • get_news_content() for full article content

Methods

get_news(...)

from tv_scraper import News

scraper = News()
result = scraper.get_news(
    symbol="NASDAQ:AAPL",
    provider=["reuters"],
    market_country=["US"],
    market=["stock"],
    language="en",
    limit=10,
)

Output structure

{
    "status": "success",
    "data": [
        {
            "id": "tag:provider.com,2026:newsml_123:0",
            "title": "Headline title",
            "published": 1700000000,
            "urgency": 2,
            "permission": "free",
            "relatedSymbols": [{"symbol": "NASDAQ:AAPL"}],
            "storyPath": "/news/path",
            "provider": {"id": "reuters", "name": "Reuters", "logo_id": "reuters_logo"},
            "is_flash": False,
        },
        ...,
    ],
    "metadata": {...},
    "warnings": [],
    "error": None,
}

get_news_headlines(...)

result = scraper.get_news_headlines(
    exchange="NASDAQ",
    symbol="AAPL",
    provider="reuters",
    area="americas",
    sort_by="latest",
    section="all",
    language="en",
)

Output structure

{
    "status": "success",
    "data": [
        {
            "id": "tag:provider.com,2026:newsml_123:0",
            "title": "Headline title",
            "shortDescription": "Short summary",
            "published": 1700000000,
            "storyPath": "/news/path",
        },
        ...,
    "metadata": {...},
    "warnings": ["get_news_headlines() is legacy. New code should prefer get_news()."],
    "error": None,
}

get_news_content(...)

content = scraper.get_news_content(
    story_id="tag:reuters.com,2026:newsml_example:0",
    language="en",
)

Output structure

{
    "status": "success",
    "data": {
        "id": "tag:provider.com,2026:newsml_123:0",
        "title": "Headline title",
        "description": "Merged article text",
        "published": 1700000000,
        "storyPath": "/news/path",
    },
    "metadata": {...},
    "warnings": [],
    "error": None,
}

Accepted Inputs

get_news(...)

get_news_headlines(...)

get_news_content(...)

  • story_id: non-empty story id string
  • language: Languages

wrong input

This is wrong for area because the input value should be the readable key, not the mapped code.

scraper.get_news_headlines(
    exchange="NASDAQ",
    symbol="AAPL",
    area="WLD",
)

Use:

scraper.get_news_headlines(
    exchange="NASDAQ",
    symbol="AAPL",
    area="world",
)

Notes

  • get_news() applies limit client-side after the fetch.
  • get_news() rejects filter combinations that would create a URL longer than 4096 characters.
  • get_news_content() requires a non-empty story_id.