I see that tags are present only for questions. How can I get the answers to these questions given in last week (if any) having specific tags?
1 Answer
I'd still use the /questions method, and change the filter to include answer details. E.g. this query lists all Stack Apps answers in the support tag, newest first. All I had to do was to edit the default filter and check the checkboxes for the fields 'answer' → 'body' and 'question' → 'answers'.
There is no way to filter on answer date upfront, but if you sort by question activity, you can ignore older answers and stop searching when you see a question with a last_activity_date
older than a week ago.
An alternative would be to use the /search/excerpts method. This seems to work too, but it doesn't return the full body, so if you need that, you'll need to make another call to e.g. /answers/{ids}.
-
This is giving answers only for the questions asked since last week. Is there any way we can get the answers which were updated/added last week for the questions posted earlier. Commented Apr 21, 2020 at 8:32
-
Check, you're right. I've modified the solution (which does require some filtering on the client side) and found an alternative as well.– Glorfindel ♦Commented Apr 21, 2020 at 8:46