newsAPI

FREEMIUM
By Strata Consulting LLC | Updated 한 달 전 | News, Media
Popularity

9.7 / 10

Latency

2,687ms

Service Level

100%

Health Check

N/A

Back to All Tutorials (3)

Get articles for trending topics

In this tutorial, we will describe how to combine the /trendingTopics endpoint and the /topic endpoint to search for news related to the day’s most popular topics.

Step 1:
Perform a GET request to the following endpoint:

GET https://newsapi90.p.rapidapi.com/trendingTopics

This will return a list of topics that might look something like this:

["Tesla", "Climate Change", "Presidential Election", ... ]

Step 2:
Pick the topic that you want to find news coverage for. In this example, we’ll use “Tesla”

Perform another GET request to the following endpoint:

GET https://newsapi90.p.rapidapi.com/search?query=Tesla

The result will be a list of news articles about “Tesla”