newsAPI

פרמיום
על ידי Strata Consulting LLC | מְעוּדכָּן 2 месяца назад | News, Media
פּוֹפּוּלָרִיוּת

9.7 / 10

חֶבִיוֹן

2,343ms

רמת שירות

100%

Health Check

N/A

חזרה לכל הדיונים

Getting top stories by keyword

Rapid account: Soyoore
soyoore
8 месяцев назад

Hello, can you please consider adding a feature to get the top stories for a keyword (e.g. to find the current most trending news about AI)?

I’ve checked all the news APIs available on RapidAPI and all of them can get the latest news but none of them can get the top stories for a specific keyword search. I have to use a scraping tool call Hexomatic as a workaround but I’d really like to use an API instead.

Rapid account: Strataconsultingllc
strataconsultingllc Commented 6 месяцев назад

Hi, thanks for tying newsAPI! I believe the feature you are looking for already exists. To get the top stories for a keyword, you can use the /search endpoint. By default, this will return the top trending news about the keyword that you search for.

You can even add additional filters to narrow your search to a specific time period. For example, if you wanted the current most trending news about AI for only the past 3 days, you could do something like this:

GET https://newsapi90.p.rapidapi.com/search?query=AI+after:2023-12-04 (just change the date in this example to suit your needs)

Check out the README page for more details on how to include and combine filters in your search query.

I hope this helps!

הצטרף לדיון - הוסף תגובה למטה:

התחבר / הירשם כדי לפרסם תגובות חדשות