How to fetch all the posts yesterday?

I want to fetch all the posts yesterday, then find those were labeled as the accepted answer in a specified topic. I read api docs but didn’t find anyone can do this. In the docs, only a part of posts can be fetched, not all of them.

There is another solution: fetch all the topics, then get those which have an accepted answer. But I don’t know how to fetch the topic only has posts yesterday.

No matter which one, it is obviously a waste. Because not all topics or posts are required.

Is there any sound solution? Please tell me which api should I use