question

34950892 avatar image
0 Votes"
34950892 asked romungi-MSFT answered

Bing News Search APIs limitation

119950-image.png


 for i in range(0,10):
     result = get_bing_news_search(keyword = 'vaccine', numberarticle = 30, offset = i*30)
     dfArr.append(pd.json_normalize(result['value']))
     if i == 0 : 
            
         totalmatch = int(result['totalEstimatedMatches'])
         print(result['totalEstimatedMatches'])
     if i > totalmatch :
         break
 df_total = pd.concat(dfArr)




I want to get historical news data ( related to vaccine )
So, Use count and offset params. But there's a lot of duplicated data like the picture above

  1. Does 'Bing News Search API' have a limitation on providing only a few months of historical data or only a few number(maybe 200?) of article available?

  2. If there is any limitation, is there any way I can get news articles from years past ( long period )?

Thank you





azure-bing-webazure-bing-custom
image.png (108.1 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

romungi-MSFT avatar image
0 Votes"
romungi-MSFT answered

@34950892 I think the usage of count and offset are correct to fetch older results. I think there should not be a limitation on the results because the field totalEstimatedMatches indicates a large no. of results. The maximum value of count seems to be 100 for news search as per documentation so the offset can be used to paginate. I have tried this scenario and the results seem to only a month old based on date published without any duplicates.

The since parameter seems to support only trending topics to get older results directly though.


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.