Trending News Scraper API
API Endpoint Specifications
- Endpoint Path: /api/1/trendingNews
- Type of Data: JSON & 50/minute
- Data Source: 100+ Media Portals
- Request Limit: 500 request/month
- Script & Integration: Code to integrate with cURL, JS, Python, Ruby, Php, Node.js, Java, .NET, Rust, Go, Typescript
Trending News Scraper API Endpoint Basic Info
API Endpoint Path
required
Trending News Scraper API
api/1/trendingNews
Call Method
Required
GET
Type of Data Return
JSON
Output structured JSON data on Trending News
Available API Arguments & Parameters
token
required
BUYFROMLO API token. Paid subscription API is available: /api/1/trendingNews, and accessible to on-site APP on /app/1/trendingNews as well
keyword
required
Input a company name or a keyword related to the news that are intended to scrape
time
required
Enter a start date, such as 2023-01-01
timeTo
required
Enter an end date, such as 2023-01-02
language
Optional
Enter the target language, such as US, JA, FR, etc
Trending News Scraper API
api/1/trendingNews
Code Integration and Response
Python Code Sample
import requests
apiendpoint = "https://api.buyfromlo.com/api/1/trendingNews?"
## Required Arguments & Parameters ##
token = "your buyfromlo token"
keyword = "target keyword"
time = "start date"
timeTo = "end date"
data= "keyword=" + keyword + "&time=" + time + "&timeTo=" + timeTo
headers={"Authorization": "Bearer " + token}
## Call the api ##
response = requests.get(apiendpoint + data, headers=headers)
print(response.status_code)
print(response.json())
JSON Response Sample
{
"Date": " " (string),
"Keyword": " " (string),
"Title": " " (string),
"Description": " " (string),
"Publisher": " " (string),
"Published Time": " " (string),
"Content": " " (string),
"Article Link": " " (string),
"Img Link": " " (string)
}