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 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 .