latestOpenAPI 3.0.02026-08-1012331.6 KB

cb52a4da72b3

Search

Search MATLAB Central areas for content matching specified query.

<br/><div>Returns MATLAB Central artifacts that match a specified query. Areas you can search include MATLAB Answers, File Exchange, Blogs, Cody, Discussions, Community Highlights, and Community Contests. All parameters are optional. When no parameters are specified, all results from MATLAB Central are returned.</div><br/><div>The <var>scope</var> parameter lets you restrict the request to specific MATLAB Central areas. The request accepts several other parameters to help narrow your search and create complex queries.</div><br/><div>/v1/search returns one or more of the following artifacts:<ul><li>Question</li><li>File</li><li>Problem</li><li>Blog</li><li>Topic</li></ul></div><p>The value for the scope parameter determines which artifacts are returned.</p>

get/v1/search

Query parameters

querystring
Example:plotting

Enter keywords to search. Separate multiple keywords with space or comma.

scope'matlab-answers' | 'file-exchange' | 'blogs' | 'cody' | 'discussions' | 'community-highlights' | 'community-contests'
Example:matlab-answers,discussions

A comma-separated list of MATLAB Central areas to search within.

tagsstring

A comma-separated list of tags. MATLAB Central areas that do not support tags are excluded from the result set.

created_beforestring date-time
Example:2022-03-06T11:00:00Z

Content that was created before this date and time, specified in Internet date and time format.

created_afterstring date-time
Example:2018-03-06T11:00:00Z

Content that was created after this date and time, specified in Internet date and time format.

sort_order'created asc' | 'created desc' | 'updated asc' | 'updated desc' | 'relevance asc' | 'relevance desc'
Example:created desc
<p>Items returned in the response can be ordered by created date, updated date, or relevance and sorted in ascending or descending order.</p><p>If <var>sort_order</var> is not specified and there is no value in the query parameter, results are sorted by updated date in descending order. However, if <var>sort_order</var> is not specified and there is a value in query, the default sort changes to relevance in descending order.</p>
pageinteger
Example:2

The page number indicating which page of items to be returned in the result set, specified as a valid positive number.

countinteger
Example:5

The number of items to return in the result set, specified as a value between 1 and 50. The default value is 10.

Response

Successful results

total_foundinteger
has_moreboolean

Example response

{
  "items": [
    {
      "answer_count": 1,
      "artifact_type": "question",
      "author": {
        "author_id": 123
      },
      "comment_count": 1,
      "created_date": "2022-04-08T19:03:58Z",
      "id": 123,
      "is_answered": true,
      "scope": "matlab-answers",
      "updated_date": "2022-04-08T19:03:58Z",
      "view_count": 10,
      "vote_count": 5
    }
  ],
  "total_found": 1000,
  "has_more": true
}