newsAPI

फ्रीमियम
द्वारा Strata Consulting LLC | अपडेट किया गया il y a 2 mois | News, Media
लोकप्रियता

9.7 / 10

लेटेंसी

1,259ms

सेवा का स्तर

100%

Health Check

N/A

सभी ट्यूटोरियल पर वापस जाएं (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”