One of the ways to conduct search via ItemService's RESTful API is through a stored query, as per the docs:

You use this method to run (“execute”) a query that is stored in a Sitecore item (a “query definition item”.)

So where can I find this "query definition item?"

1 Answer 1


According to Sitecore documentation you can run query stored on an item using


url. You must replace the {id} part with the item which stores the query, e.g.


You can add more parameters, e.g. pageSize, page, database, includeStandardTemplateFields, fields:


Description for all of the can be found in the link above.

There is a Query Definition template which you should use to store your query. Just create an item using that template. You can find it in Sitecore with /sitecore/templates/System/Services/Item Service/Query/Query Definition path:

enter image description here

  • There it is, thank you! Though I noticed that the field type for the query definition item is a Single Line Text, I assume that we write query scripts the same? e.g. query:/sitecore/content/**
    – Lala
    Commented Oct 3, 2019 at 15:35
  • Tbh I'm not sure. Test it and let us know :)
    – Marek Musielak
    Commented Oct 3, 2019 at 18:01
  • Confirmed that "query:" is not needed for the Query field. Example below: /sitecore/content/Site/Home/News//*[@@templatename='News Page'] Commented Jul 28, 2021 at 20:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.