newsAPI

FREEMIUM
Door Strata Consulting LLC | Bijgewerkt 2 महीने पहले | News, Media
Populariteit

9.7 / 10

Latency

1,206ms

Serviceniveau

100%

Health Check

N/A

Terug naar alle 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”