Take the 2-minute tour ×
Stack Apps is a question and answer site for apps, scripts, and development with the Stack Exchange API. It's 100% free, no registration required.

How can I use the API to search for answers containing particular text or with particular properties? For example, this link allows me to search for is:answer foo, that is, answers containing foo. Can I do this with the current API?

Note: I have already searched the documentation, but didn't find anything like this.

share|improve this question
1  
I don't think you can do this. The API allows limited searching of question text, but nothing similar for answers that I've ever seen. You may have to resort to scraping the live page or, if data that lags by 1 to 5 weeks is okay, using SEDE queries. –  Brock Adams Mar 5 at 22:30
1  
Note that the /search paths are the only ones that allow much text searching and they omit answers by design. –  Brock Adams Mar 5 at 22:42
    
Thanks, Brock. Your first comment was what I was afraid of, and your second is spot-on. Make them into an answer and I will gladly accept it. –  Ed Cottrell Mar 5 at 23:04
    
Thanks, I'll make it into an answer in a week or so (if I remember), if nothing better comes along. I'm hoping one of the developers will come through in this case. You might also make a feature request if they don't. –  Brock Adams Mar 6 at 0:01
1  
Confirmed that the new /search/excerpts route allows you to search answers too. Unfortunately, you still can't limit results to only answers. –  Brock Adams Jul 26 at 5:52

You must log in to answer this question.

Browse other questions tagged .