2

I want to use the Advanced Search API to get the same results as the Stack Overflow site search.
With it, I can see new questions on 11/10/2015.

When I tried to craft a query using the Advanced Search API, it returns no questions on 11/10/2015:

          /2.2/search/advanced?min=1446940800&max=1447113600&body=vm&tagged=sql-server

Am I using the Advanced Search API in the right way?

2

Date parameters are in unix epoch time and 1447113600 is 2015-11-10, 00:00:00. So any questions posted on Nov 10th actually happened after that.

When searching for date ranges, you usually want to increment the end-date (max in this case) by one full day.

For example, if you want items from 12-12-2012 to 12-13-2012, you would use max=1355443200 (The equivalent of 12 AM on 12-14-2012).

When you take this into account, then:

          /2.2/search/advanced?min=1446940800&max=1447200000&body=vm&tagged=sql-server

Returns the 3 questions you expect.

See this answer for more details.


PS: For your apparent task, you probably want sort=creation rather that sort=activity.

You must log in to answer this question.

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