Details of news from website NDTV and Livescience in json formate ..
Install news_api with npm
After clone the link
follow as below
npm install
It will install all the depencences and required files and module.
After installing the module.
To deploy this news_api project type as below.
node index.js
Now the local server starts at port 5000
Type
http://127.0.0.1:5000/api/all
In your broswer to get the response.
Complete Working Of my Api.
http://127.0.0.1:5000/api/all
It will give the details of keywords AI,ML,computer Vision in json formate.
Json Response.
[
"0":{
// first website
"ls_news":[
{
//Artificial
"AI":[
{
//article
"0":[
"title":"article tilte",
"link":"link to the orginal website",
"description":"description about the website",
"img":"image link for the article",
],
// Each contain 20 article
}
],
// mechine learing
"ML":[
{
}
],
// computer Vision
"CV":[
{
}
],
}
],
"NDTV_news":[
// same details
// Each contain 30 article
]
}
]
http://127.0.0.1:5000/api/all2
It will give the details of keywords GA,NLP,RL in json formate.
Json Response.
[
"0":{
// first website
"ls_news":[
{
//genitic
"GA":[
{
//article
"0":[
"title":"article tilte",
"link":"link to the orginal website",
"description":"description about the website",
"img":"image link for the article",
],
// each contain 20 article
}
],
// natural lang proc
"NLP":[
{
}
],
// rainfor learn
"RL":[
{
}
],
}
],
"NDTV_news":[
// same details
// Each contain 20 article
]
}
]
Here for use any number
http://127.0.0.1:5000/api/all/<pageno>
it will give extra article in the main page
Here for use any number
http://127.0.0.1:5000/api/all2/<pageno>
it will give extra article in the main page 2
For extra Keyword article Use the search page.
Here Use your Keyword for .
http://127.0.0.1:5000/api/search/<Keyword>
Json Response.
[{
"ls_news":[
{
//article
"0":[
"title":"article tilte",
"link":"link to the orginal website",
"description":"description about the website",
"img":"image link for the article",
],
// contain 20 article
}
],
"NDTV_news":[
{
//article
"0":[
"title":"article tilte",
"link":"link to the orginal website",
"description":"description about the website",
"img":"image link for the article",
],
// contain 30 article
}
],
}]
For extra article Use the Extra search page.
Here Use your Keyword for .
Use for the next page.
http://127.0.0.1:5000/api/search/<Keyword>/<pageno>
Json Response.
[{
"ls_news":[
{
//article
"0":[
"title":"article tilte",
"link":"link to the orginal website",
"description":"description about the website",
"img":"image link for the article",
],
// contain 20 article
}
],
"NDTV_news":[
{
//article
"0":[
"title":"article tilte",
"link":"link to the orginal website",
"description":"description about the website",
"img":"image link for the article",
],
// contain 30 article
}
],
}]