# Flask app for fetching global news

**URL:** <https://forum.alpaca.markets/t/flask-app-for-fetching-global-news/12663>\
**Category:** Alpaca Market Data\
**Created:** [July 15, 2023, 1:34pm UTC](https://forum.alpaca.markets/t/flask-app-for-fetching-global-news/12663 "2023-07-15T13:34:47Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Joe\_O1](https://avatars.discourse-cdn.com/v4/letter/j/b5ac83/32.png) [@Joe\_O1](https://forum.alpaca.markets/u/Joe_O1)\
**Post date:** [July 15, 2023, 1:34pm UTC](https://forum.alpaca.markets/t/flask-app-for-fetching-global-news/12663/1 "2023-07-15T13:34:47Z")

</div>

In addition to python scripts for fetching information with Alpaca’s news API, this GitHub repository contains a Flask-based news search application that leverages the NewsAPI to provide real-time search functionality for news articles based on user queries. It also allows users to sort results by relevance or popularity. The app uses a free key from [https://newsapi.org](https://newsapi.org) .

This app allows quick, global, real-time searches for news in multiple languages to complement Alpaca’s limited news service.

The repository is located here:

```auto
git clone https://github.com/JOravetz/news-search-flask-api.git

```

![Figure_1](https://us1.discourse-cdn.com/flex020/uploads/alp/original/2X/3/31a632399dcdbe3d446f7fef2e33c73eb6001802.png)

 ![Figure_2](https://us1.discourse-cdn.com/flex020/uploads/alp/original/2X/8/894923fc0087d97f0cc0f68fef62ab72a42c0a8d.png)

This is a simple flask app, which can be easily be modified with additional features.

If you have Alpaca keys as environment variables, as specified in the scripts, give these other scripts a try:

```auto
python fetch_alpaca_news_nosentiment.py --symbol nvda

```

or with FinBert sentiment analysis:

```auto
python fetch_alpaca_news_with_sentiment.py --symbol nvda

```

Enjoy,

Joe O.
