newsAPI

FREEMIUM
Por Strata Consulting LLC | Actualizada 2 महीने पहले | News, Media
Popularidad

9.7 / 10

Latencia

1,259ms

Nivel de servicio

100%

Health Check

N/A

Volver a todos los tutoriales (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”