newsAPI

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

9.7 / 10

लेटेंसी

1,259ms

सेवा का स्तर

100%

Health Check

N/A

सभी ट्यूटोरियल पर वापस जाएं (3)

Get more coverage for a news article

By default, newsAPI returns a list of related articles for each news headline that is retrieved, but sometimes you might need to dive deeper and get even more comprehensive coverage on a news story. To do this, you can use the topicId that is provided with each article.

Here is an example to illustrate this scenario:

Step 1:
Make a request to get the latest news headlines by performing the following GET request:

GET https://newsapi90.p.rapidapi.com/topic/latest

Each article in the response will have a topicId property if there is more news coverage related to the story. (Note that it is possible for the topicId to be empty if the article isn’t considered part of a larger news story).

Step 2:
For the article that you want to get more coverage on, find it’s topicId and add it to the following GET request:

GET https://newsapi90.p.rapidapi.com/topic/INSERT_TOPIC_ID_HERE

The result of this request will be a larger list of articles that are related to the original article.