News story summary

Hi, I am trying to download country specific news data using codebook and have gotten to the stage of storing the news story in either dictionary or dataframe format. My question is, is there a function that allows for summaries of news to be downloaded? Or do I have to perform manual filtering for each news story and summarize them myself?

Thanks.

Answers

  • Jirapongse
    Jirapongse ✭✭✭✭✭

    @kimsh422

    Thank you for reaching out to us.

    I checked the news endpoints but couldn't find any that provide summaries or full news stories.

    Please ensure that you are using valid methods to summarize news. Sending news content to external systems (such as AI tools) for summarization may violate data usage policies. Please contact your LSEG account team or sales team directly to verify the policies.

  • kimsh422
    kimsh422 Newcomer

    Codebook itself does not allow for extraction to external system (at least for my firm) so there is no breach of data usage policies. I am using this tool to summarize the news for internal research purposes. What I am asking is would there be methodology to extract the news stories but only important paragraphs or so? Since the news is too long and the point is to extract only relevant information.

  • Jirapongse
    Jirapongse ✭✭✭✭✭

    That is good.

    When retrieving a news story, the API returns the full content, which can be retrieved in either HTML or plain text format.

    text = ld.news.get_story("<story id>", format=ld.news.Format.TEXT)
    story = ld.news.get_story("<story id>", format=ld.news.Format.HTML)