Search for Content in Your Marketing Cloud Next Content Workspace

Use the CMS Search endpoints in Connect API to search for content in your marketing content workspace.

First, find the ID of the content workspace or folder that you want to search. If you know the workspace ID, skip this step. Otherwise, retrieve a list of workspaces by issuing a GET request to the /services/data/{apiVersion}/connect/cms/spaces endpoint.

If the request is successful, the response includes a list of workspaces.

Copy the id value of the workspace to use in your search query.

Issue a GET request to the /services/data/{apiVersion}/connect/cms/items/search endpoint. The request can include the query parameters listed in this table.

Query ParameterData TypeDescription
contentSpaceOrFolderIdsstringRequired. The ID of the workspace or folder to search.
contentTypeFQNstringThe fully qualified name of a content type to filter by in the search.
languagesstringA locale code for filtering the results. Provide a locale code, such as en_CA or es_MX, or specify All to retrieve all languages.
pageintThe page number of results to return. The first page of results is page 0.
pageSizeintThe number of results to return per page. The maximum value is 250. The default value is 25.
queryTermstringThe search term. Use * as a wildcard to return all content.
scopestringThe search scope. Use All to search across all fields, or TitleOnly to search titles only.

Include the workspace ID in the contentSpaceOrFolderIds query parameter.

If the request is successful, the response includes a list of content items.

The response includes the properties in this table.

PropertyData TypeDescription
countintThe total number of results for the query.
currentPageUristringThe address of the current page of results
nextPageUristringThe address of the next page of results, if one exists.
itemsintAn array of content items that match the search criteria.

Each content item includes a contentKey that you can use to retrieve the full content details.

You can filter search results by content type or language.

To return only emails or email templates, include the contentTypeFQN query parameter. This example returns only content with the content type sfdc_cms__email.

To return content in a specific language, include the languages query parameter. This example returns only items with the en_US locale code.