Search Managed Content
| AVAILABLE API VERSION |
|---|
| API v67.0 and later |
The searchContentInChannels operation searches for published content across one or more CMS channels. Each piece of content appears only once in the results, even if it’s published to multiple channels. Results are ordered by relevance, with the best matches appearing first.
Here’s a basic example of a keyword search for content across two CMS channels. The results include the content ID, title, and content type.
The search query uses these arguments.
searchIdentifiers- (Required) Specifies which channels, sites, or UI bundles to search. At least one ofchannelIds,siteIds, oruibundleIdsmust be provided and not empty. ThesiteIdsanduibundleIdsresolve to their associated CMS channels and combine withchannelIdsto determine the full set of channels to search.channelIds- An array of CMS channel IDs to search. Specify up to 5 IDs.siteIds- An array of site IDs to search. Specify up to 5 IDs.uibundleIds- An array of UI bundle IDs to search. Specify up to 5 IDs.
keyword- (Required) Search keyword to match against content. Must be between 3-5000 characters.language- The language variant of the content. The format is an IETF locale code, such asen_US,fr,pt_BR.pagination- Controls the number of results returned and the starting offset.limit- Controls how many items are returned per page. Must be between 1-25. The default is 10.offset- Zero-based starting position. Must be greater than or equal to 0. The default is 0.
taxonomyExpression- A JSON encoded string filter for ContentTaxonomyTerm IDs. Values must be taxonomy term IDs, not term labels. Supports operators:AND,OR,NOT,parent,taxonomycontentTypeFQNs- An array of CMS content types. Specify between 1-50 strings. You don’t need to specify an exact match of a content type’s fully qualified name (FQN). For example, if you specify “news,” the search result returns content of typesfdc_cms__image.
This example shows how to combine multiple arguments to refine your search. In this case, the API searches for English news content in 2 channels. The paginated search results show 20 items per page, and they include content delivery and channel details.
Instead of specifying channelIds directly, you can search by siteIds or uibundleIds. Each site or UI bundle ID gets resolved to its associated managed content channel automatically. You can combine channelIds, siteIds, and uibundleIds in the same request, and the full set of channels searched is the combination of all three identifiers.