News API is a simple HTTP REST API for searching and retrieving live news articles from all over the web. Using this, one can fetch the top stories running on any news website or can search top news on specific topic (or keyword).
News can be retrieved based on some criteria. Say the topic (keyword) to be searched is ‘Geeksforgeeks’ or might be concerned to specific channel. All can be done, but API Key is needed to get started.
Steps : 1. Visit https://newsapi.org/ to get your own API key. 2. Install requests package.
Below is the implementation of above idea :
1 China hits back with tariffs on US imports 2 Trump rails at immigrant programme 3 'I have 29 textbooks for 87 pupils' 4 French rail strike set to test Macron 5 London murder rate overtakes New York's 6 Hill Street Blues creator dies aged 74 7 Villagers killed in Boko Haram clash 8 Kim 'moved' by K-pop peace concert 9 Former president's poisoning ordeal 10 Costa Rican president-elect wants 'unity'
Note : Output may change based on the top articles at time.
- Facebook News Feed Algorithm
- Python Desktop News Notifier in 20 lines
- EdgeRank Algorithm - Algo behind Facebook News Feed
- Fetching text from Wikipedia's Infobox in Python
- Python Django | Google authentication and Fetching mails from scratch
- Python | Indices of sorted list of list elements
- Python | Extract specific keys from dictionary
- Python | Separate odd and even index elements
- Python | Remove all occurrences in nested list
- ML | Mean-Shift Clustering
- Automated software testing with Python
- How Autoencoders works ?
- Python | System hardening and compliance reports using Lynis
- Kolmogorov-Smirnov Test (KS Test)
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.