1

I just started using the Stack Overflow API. I want to collect all questions related to a specific keyword.

My code iterates over all result pages by increasing the &page=N parameter while 'has_more' is true. However, I noticed a discrepancy in results between the result I find when I search for the term on the site and when using the API. For example, when I search for GDPR on stackoverflow.com I get 1,449 results. When I use the API I get 855 results.

This is my filter: &filter=!-PM0x_wtQ*dB)nch99.Yykxk*OOLMzj.H

I still have enough quota.

0

I can reproduce (sort of):

What happens here is explained in the API documentation, if you look closely:

Usage of /search/advanced GET

Discussion

Searches a site for any questions which fit the given criteria.

(emphasis mine).

If you limit your site search to questions only, with the is:q parameter, you get 857 results as well. To search for answers as well, you need another API method: /search/excerpts to be precise.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .