Possible to get BY_LINE and DATE_LINE for news stories?

Hi,

I'm hoping to create a dataframe of news stories that includes bylines and datelines for each story. In the Eikon Data Item Browser, I can see BY_LINE and DATE_LINE. Is there a way I can query by those and have them show in a dataframe like the one below?

df = ek.get_news_headlines('Topic:US AND Language:LEN', date_to = "2020-11-04", count=100)

Thank you!

Best Answer

  • Jirapongse
    Jirapongse admin
    Answer ✓

    @noel.randewich

    The Eikon Data Item Browser is used to find available fields for the get_data method. It doesn't apply to the get_news_headlines method.

    The following is the raw data retrieved by calling the get_news_headlines method.

     [{'displayDirection': 'LeftToRight',
       'documentType': 'Story',
       'firstCreated': '2020-11-04T00:00:00.000Z',
       'isAlert': True,
       'language': 'L:en',
       'reportCode': '',
       'sourceCode': 'NS:RTRS',
       'sourceName': 'Reuters News',
       'storyId': 'urn:newsml:reuters.com:20201104:nN9N2GS003:1',
       'text': 'TRUMP PROJECTED WINNER IN INDIANA (11 ELECTORAL VOTES) – EDISON RESEARCH',
       'versionCreated': '2020-11-04T00:00:00.000Z'},
      {'displayDirection': 'LeftToRight',
       'documentType': 'Story',
       'firstCreated': '2020-11-03T23:59:54.342Z',
       'isAlert': False,
       'language': 'L:en',
       'reportCode': '',
       'sourceCode': 'NS:DJN',
       'sourceName': 'Dow Jones News',
       'storyId': 'urn:newsml:reuters.com:20201103:nDJR6sSL5T:1',
       'text': 'DJ CFO Sial Registers 48,161 Of SunPower Corp >SPWR',
       'versionCreated': '2020-11-03T23:59:54.342Z'},
      {'displayDirection': 'LeftToRight',
       'documentType': 'Story',
       'firstCreated': '2020-11-03T23:59:44.335Z',
       'isAlert': False,
       'language': 'L:en',
       'reportCode': '',
       'sourceCode': 'NS:DJN',
       'sourceName': 'Dow Jones News',
       'storyId': 'urn:newsml:reuters.com:20201103:nDJR3wJMHS:1',
       'text': 'DJ CEO Douglas Jr Registers 3,000 Of Computer Programs & Systems Inc >CPSI',
       'versionCreated': '2020-11-03T23:59:44.335Z'},

    It doesn't contain BY_LINE and DATE_LINE fields.