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.

  • 1
    Note that the /search paths are the only ones that allow much text searching and they omit answers by design. Mar 5, 2014 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.
    – elixenide
    Mar 5, 2014 at 23:04

1 Answer 1


I forget when, but sometime in the last couple of years, the /search/excerpts route started allowing is:answer in the q parameter.

For example:
          /2.2/search/excerpts?&q=Hear! is:answer&site=stackapps

-- which returns Stack Apps answers with the text "Hear!" in the body.

(Pretty sure I tested this in early 2014, and it didn't work then. But, other parts of the API have stealthily changed.)

You must log in to answer this question.

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