3

I am fetching a list of all new answers posted on Stack Overflow using the /answers API call. This returns the owner of the answer, but I would like to know if the answerer is the same person as the question asker. Is there any way this API call can give me that information? Right now, I solved it by first getting a list of new answers and then preparing a bulk call to /questions/{ids} to get the owners of the questions. Is there a way to do it in one call?

0

1 Answer 1

2

No; the answer object doesn't contain any information about the question except the question ID.

I'm not sure how you obtain the answer IDs, but you could investigate if it's possible to look for active questions instead (a new answer makes the question active again) and fetch both question and answer information at once; the question object contains the answers as well, if you include them in the filter.

1
  • I am fetching newly posted answers since a given timestamp. Fetching active questions would potentially get me the same answers over and over again not to mention old answers. It would be more work to process them to get the new answers only. I guess I making two separate calls is then the only way.
    – Dharman
    Mar 12, 2020 at 17:33

You must log in to answer this question.

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