1

I use SP SEARCH api and below is my enpdoint:

/_api/search/query?querytext=%27matrix%27&&$expand=ContentType&rowlimit=5

It doesn't seem to show anywhere that "$expand" is supported. I also tried to match the stringId from ContentType to another REST call to this endpoint:

/_api/web/contentTypes

But I get a result that is specific to that site only.

The question is simple: How do I get the Content Type Name for the results in SEARCH API?

2 Answers 2

2
https://siteurl/_api/search/query?querytext="keyword to search"&selectproperties='Title,ContentType'

This should help

1
  • This did it! That was pretty simple. Thank you so much. Commented Oct 19, 2016 at 17:59
1

Does this answer your question? How to get all items with a specific content type using REST Api

http://yoursite.domain.com/_api/search/query?querytext='contenttype:CONTENT_TYPE_NAME'

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.