I want to mimic the behavior of the search field that can be found on all Stack sites. How should I do this?

  1. Filter by tags if all words (how exactly is this detected?) in the query are tags.
  2. Otherwise, filter by title.

Correct so far? Does anyone know how the tags are told apart from each other? Any further behavior I couldn't discover?

1 Answer 1


The API supports the /search call, which only searches for an exact match within the title of questions. For more general searching, I believe the recommendation is to use a search engine. You can use their (Google, Bing, etc) APIs to search within a single site.

  • I am aware of the search call. It is exactly what I'm talking about. It allows me to search by tags or title. Which one of these is used is automatically detected by the Stack search field (Try searching for app and hello). What I want to do is duplicate this detection.
    – eflorico
    Commented Jun 30, 2010 at 21:41

You must log in to answer this question.

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