Coder Social home page Coder Social logo

inshorts-api's Introduction

Inshorts API [Unofficial]

This API is capable of fetching news contents from various sources as gathered by Inshorts app.


News Categories

This API supports category wise news. Here is a complete list of all categories.

  1. all
  2. national Indian News only
  3. business
  4. sports
  5. world
  6. politics
  7. technology
  8. startup
  9. entertainment
  10. miscellaneous
  11. hatke
  12. science
  13. automobile

Usage

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


Response Format

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
}

Setup

Install all dependencies listed in requirements.txt file.

  1. To install all dependencies run -

    $ sudo -H pip3 install -r requirements.txt
  2. Start the server

    $ python app.py

This API was used to build a News app


You can fork the repo and deploy on VPS, Heroku or Vercel :)

Deploy to Vercel


⭐ the Repo in case you liked it :)

Made with ❤️ in India

inshorts-api's People

Contributors

vendz avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.