Skip to content

Commit d0268b3

Browse files
Merge pull request SharePoint#3853 from ErikSwan/patch-1
Add information on Search REST API output format
2 parents abb8abb + 5e9687f commit d0268b3

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

docs/general-development/sharepoint-search-rest-api-overview.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,16 @@ Use **POST** requests in the following scenarios:
103103
- When you use the [ReorderingRules](#bk_ReorderingRules) parameter because it is supported only with **POST** requests.
104104

105105

106+
## Search REST results format
107+
By default, results are returned in XML format. To get results in JSON format, add the following header to your request:
108+
```
109+
accept: application/json;odata=verbose
110+
```
111+
112+
If you don't need metadata, you can instead use:
113+
```
114+
accept: application/json;odata=nometadata
115+
```
106116

107117
## Using query parameters with the Search REST service
108118
<a name="bk_UsingQueryParams"> </a>
@@ -1708,4 +1718,4 @@ When an anonymous Search REST query is submitted, the query object is constructe
17081718

17091719

17101720
- [Use OData query operations in SharePoint REST requests](/sharepoint/dev/sp-add-ins/use-odata-query-operations-in-sharepoint-rest-requests)
1711-
1721+

0 commit comments

Comments
 (0)