There are five Custom Lists in a site collection, all have same content type. I would like to get all items from those five lists using rest api. Is there a way to get all items from all lists having a specific content type using rest api?

  • I would love to have your snippet!
    – bgmCoder
    Commented Jul 25, 2017 at 22:15

1 Answer 1


Yes, you can query search using the REST API with the following URL to get list items specific to a content type:


To find out more about search using REST see this and this links.

  • 1
    To add to this, it may be easier to create a result source, and simply use the sourceid parameter: https://<site>/_api/search/query?sourceid='xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'. This will allow you to test your query before messing with code.
    – wjervis
    Commented Sep 22, 2014 at 11:33
  • 1
    I sued your solution in the browser but I got this web page can not be displayed
    – Medes
    Commented Sep 22, 2014 at 12:15
  • Do you have crawled content in your search index ? You can check it by querying into the default seach box in the site to make sure that search is returning the results. You can try to change the browser settings to see if the REST query used in browser returns the results. Check this. Also, to test the rest query for content type try querying 'contenttype=ITEM' to see if the search works. Commented Sep 22, 2014 at 12:25
  • Sorry about my mistake, I tested it on my Online dev environment and it works, it seems my VM have some problem regarding crawling and search becasue search not works at all. I get no result when I search
    – Medes
    Commented Sep 22, 2014 at 12:37
  • 1
    I get undefined as the return, even when I search for ITEM
    – bgmCoder
    Commented Jul 26, 2017 at 22:34

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.