This API is capable of fetching news contents from various sources as gathered by Inshorts app.
This API supports category wise news. Here is a complete list of all categories.
- all
- national
Indian News only
- business
- sports
- world
- politics
- technology
- startup
- entertainment
- miscellaneous
- hatke
- science
- automobile
Make a request specifying the category of news you want
https://inshorts.vandit.cf/shorts?category=<Enter-a-category>
Example - https://inshorts.vandit.cf/shorts?category=technology
see all the available categories
https://inshorts.vandit.cf/categories
Example - https://inshorts.vandit.cf/categories
The response JSON Object looks something like this -
{
"category": "technology",
"data": [
{
"author": "Pragya Swastik",
"content": "A cybersecurity researcher has claimed that credit card details of nearly 10 lakh people who purchased from Domino's Pizza India are being sold on the dark web for $550,000 (over ₹4 crore). "Jubilant FoodWorks experienced an information security incident recently," a company statement said. However, it added that no data pertaining to the financial information of any person was accessed.",
"date": "19 Apr",
"img_url": "https://static.inshorts.com/inshorts/images/v1/variants/jpg/m/2021/04_apr/19_mon/img_1618830582251_240.jpg?",
"read_more_url": "https://www.thenewsminute.com/article/dominos-pizza-india-hacked-data-10-lakh-indians-allegedly-sale-147423?amp=&utm_campaign=fullarticle&utm_medium=referral&utm_source=inshorts ",
"short_url": "https://inshorts.com/en/news/data-of-10-lakh-indian-customers-of-dominos-leaked-on-sale-for-₹4-cr-report-1618832250740",
"time": "05:07 pm",
"title": "Data of 10 lakh Indian customers of Domino's leaked, on sale for ₹4 cr: Report"
},
{
"author": "Hiral Goyal",
"content": "Community-oriented platform Ethernity Chain has announced that it will launch a collection of authenticated non-fungible tokens (NFTs) to "honour the legacy" of former Brazilian footballer Pelé. It will mark the first time for Pelé trading cards to be released digitally, Ethernity Chain said. It added, 90% of the proceeds from the sale of NFTs will go to The Pelé Foundation.",
"date": "19 Apr",
"img_url": "https://static.inshorts.com/inshorts/images/v1/variants/jpg/m/2021/04_apr/19_mon/img_1618822474861_599.jpg?",
"read_more_url": "https://ethernitychain.medium.com/pele-locks-in-a-historical-anft-drop-with-ethernity-ef53afbe3f54?utm_campaign=fullarticle&utm_medium=referral&utm_source=inshorts ",
"short_url": "https://inshorts.com/en/news/former-footballer-pelés-trading-cards-to-be-launched-as-nfts-1618827073923",
"time": "03:41 pm",
"title": "Former footballer Pelé's trading cards to be launched as NFTs"
}
],
"success": true
}
Install all dependencies listed in requirements.txt file.
-
To install all dependencies run -
$ sudo -H pip3 install -r requirements.txt
-
Start the server
$ python app.py