Coder Social home page Coder Social logo

kehsihba19 / inshorts-api Goto Github PK

View Code? Open in Web Editor NEW
15.0 0.0 6.0 18 KB

Built a restful api which fetches news articles from Inshorts app.

Home Page: https://inshorts-news.vercel.app

License: MIT License

Python 100.00%
flask flask-api api rest-api api-service news-api news shortnews india python3

inshorts-api's Introduction

Inshorts News API

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

Show some ❤️ and ⭐ the repo to support the project


News Categories

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

Sl. No. Category Endpoints
1 All /all
2 Automobile /automobile
3 Business /business
4 Entertainment /entertainment
5 National /national
6 Politics /politics
7 Science /science
8 Sports /sports
9 Startups /startup
10 Technology /technology
11 World /world

Installation

Refer to requirements.txt file for all the packages needed. Use the package manager pip to install python packages.

pip install package_name

Usage

Make a get request specifying the category of news you want

https://inshorts-news.vercel.app/{category_name}

Example - https://inshorts-news.vercel.app/science


Response Format

The response JSON Object looks something like this -

{
  "category": "technology",
  "count-articles":24,
  "data": [
    {
      "author":"Nandini Sinha",
      "decription":"The UAE has become the first Gulf Arab country to establish diplomatic relations with Israel in a \"historic deal\" brokered by US President Donald Trump. Under the deal, Israel will suspend its annexation of the occupied West Bank to focus on improving relations with the Arab and Muslim world, a joint statement by the US, UAE and Israel read.",
      "images":"https://static.inshorts.com/inshorts/images/v1/variants/jpg/m/2020/08_aug/13_thu/img_1597332122442_79.jpg?",
      "inshorts-link":"https://inshorts.com/en/news/israel-to-suspend-annexation-of-west-bank-establish-diplomatic-ties-with-uae-1597334118265",
      "read-more":"https://www.rt.com/news/497940-israel-uae-deal-trump-palestine/amp/?utm_campaign=fullarticle&utm_medium=referral&utm_source=inshorts ",
      "time":"2020-08-13T15:55:18.000Z",
      "title":"Israel to suspend annexation of West Bank, establish diplomatic ties with UAE"
    },
    ],
}

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

Show some ❤️ and ⭐ the repo in case you liked it :)

inshorts-api's People

Contributors

kehsihba19 avatar scortier avatar shreyasminocha avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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.