> Portal Navigation: > > - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version. > - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages). > - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`). > - Top-level index of all portals: https://dev.wix.com/docs/llms.txt > - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt # SearchContents # Package: translation # Namespace: TranslationContent # Method link: https://dev.wix.com/docs/api-reference/business-management/multilingual/translation/translation-content/search-contents.md ## Permission Scopes: Wix Multilingual - Translation Content + Published Content Read: SCOPE.DC-MULTILINGUAL.READ_TRANSLATION_CONTENT ## Introduction Retrieves a list of all translation content associated with a site that matches the search query, with optional data aggregation. Note that this method allows you to retrieve all translation content for a site, regardless of which app created it. Use this method to search translation content fields on a site for a given expression, and/or to perform data aggregations on a site's translation content fields. To learn about working with *Search* methods, see _API Query Language_ ([SDK](https://dev.wix.com/docs/sdk/articles/work-with-the-sdk/api-query-language.md) | [REST](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language.md)) and *Sorting and Paging* ([SDK](https://dev.wix.com/docs/sdk/articles/work-with-the-sdk/api-query-language.md#the-sort-array) | [REST](https://dev.wix.com/docs/rest/articles/getting-started/sorting-and-paging.md)). --- ## REST API ### Schema ``` Method: searchContents Description: Retrieves a list of all translation content associated with a site that matches the search query, with optional data aggregation. Note that this method allows you to retrieve all translation content for a site, regardless of which app created it. Use this method to search translation content fields on a site for a given expression, and/or to perform data aggregations on a site's translation content fields. To learn about working with *Search* methods, see _API Query Language_ ([SDK](https://dev.wix.com/docs/sdk/articles/work-with-the-sdk/api-query-language.md) | [REST](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language.md)) and *Sorting and Paging* ([SDK](https://dev.wix.com/docs/sdk/articles/work-with-the-sdk/api-query-language.md#the-sort-array) | [REST](https://dev.wix.com/docs/rest/articles/getting-started/sorting-and-paging.md)). URL: https://www.wixapis.com/v1/contents/search Method: POST Method parameters: param name: search | type: CursorSearch - name: cursorPaging | type: CursorPaging | description: Cursor-based paging for result navigation. When requesting `cursor_paging.cursor`, `filter`, `sort`, or `search` can't be specified. - name: limit | type: integer | description: Maximum number of items to return in the results. - name: cursor | type: string | description: Pointer to the next or previous page in the list of results. Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response. Not relevant for the first request. - name: filter | type: object | description: Filter object for narrowing search results. For example, to return only translation content for a specific locale: `"filter": {"locale": "en"}`. - name: sort | type: array | description: Array of sort objects specifying result order. For example, to sort by creation date in descending order: `"sort": [{"fieldName": "createdDate", "order": "DESC"}]`. - name: fieldName | type: string | description: Name of the field to sort by. - name: order | type: SortOrder | description: Sort order. - enum: ASC, DESC - name: aggregations | type: array | description: Aggregations for grouping data into categories (facets) and providing summaries for each category. For example, use aggregations to categorize search results by translation schema or locale. - ONE-OF: - name: value | type: ValueAggregation | description: Value aggregation configuration. - ONE-OF: - name: includeOptions | type: IncludeMissingValuesOptions | description: Options for including missing values in the aggregation results. - name: addToBucket | type: string | description: Custom bucket name for missing values. Default values: - string: `N/A` - int: `0` - bool: `false` - name: sortType | type: SortType | description: Whether to sort by number of matches or value of the field. - enum: COUNT, VALUE - name: sortDirection | type: SortDirection | description: Whether to sort in ascending or descending order. - enum: DESC, ASC - name: limit | type: integer | description: Number of aggregations to return. Min: `1` Max: `250` Default: `10` - name: missingValues | type: MissingValues | description: Whether missing values should be included or excluded from the aggregation results. Default: `EXCLUDE` - enum: EXCLUDE, INCLUDE - name: range | type: RangeAggregation | description: Range aggregation configuration. - name: buckets | type: array | description: List of range buckets defining the ranges for aggregation. During aggregation, each entity is placed in the first bucket where its value falls within the specified range bounds. - name: from | type: number | description: Inclusive lower bound of the range. Required if `to` is not provided. - name: to | type: number | description: Exclusive upper bound of the range. Required if `from` is not provided. - name: scalar | type: ScalarAggregation | description: Scalar aggregation configuration. - name: type | type: ScalarType | description: Operator for the scalar aggregation, for example `COUNT_DISTINCT`, `MIN`, `MAX`. - enum: - COUNT_DISTINCT: Total number of distinct values. - MIN: Minimum value. - MAX: Maximum value. - name: dateHistogram | type: DateHistogramAggregation | description: Date histogram aggregation configuration. - name: interval | type: Interval | description: Time interval for date histogram aggregation, for example `DAY`, `HOUR`, `MONTH`. - enum: - YEAR: Yearly interval. - MONTH: Monthly interval. - WEEK: Weekly interval. - DAY: Daily interval. - HOUR: Hourly interval. - MINUTE: Minute interval. - SECOND: Second interval. - name: nested | type: NestedAggregation | description: Nested aggregation configuration. - name: nestedAggregations | type: array | description: Flattened list of aggregations, where each next aggregation is nested within previous one. - ONE-OF: - name: value | type: ValueAggregation | description: Value aggregation configuration. Calculates the distribution of field values within the dataset. - name: range | type: RangeAggregation | description: Range aggregation configuration. Calculates counts within user-defined value ranges. - name: scalar | type: ScalarAggregation | description: Scalar aggregation configuration. Calculates single numerical metrics like count, min, max, sum, or average. - name: dateHistogram | type: DateHistogramAggregation | description: Date histogram aggregation configuration. Calculates counts within time intervals. - name: name | type: string | description: User-defined name of aggregation. Must be unique and will appear in aggregation results. - name: type | type: NestedAggregationType | description: Type of aggregation. Client must specify matching aggregation field below. - enum: - VALUE: Calculates the distribution of a specific field's values within a dataset, providing insights into the overall distribution and key statistics of those values. - RANGE: Calculates the count of the values from the specified field in the dataset that fall within the range of each bucket you define. - SCALAR: Calculates a single numerical value from a dataset, summarizing the dataset into 1 key metric: `COUNT_DISTINCT`, `SUM`, `AVG`, `MIN`, or `MAX`. - DATE_HISTOGRAM: Calculates the count of time values from the specified field in the dataset that fall within each time interval you define (hour, day, week, etc.). - name: fieldPath | type: string | description: Path to the field to aggregate by in dot notation. For example `name` or `paymentOptions.online`. - name: name | type: string | description: User-defined name of aggregation. Must be unique and will appear in aggregation results. - name: type | type: AggregationType | description: Type of aggregation. Client must specify matching aggregation field below. - enum: - VALUE: Calculates the distribution of a specific field's values within a dataset, providing insights into the overall distribution and key statistics of those values. - RANGE: Calculates the count of the values from the specified field in the dataset that fall within the range of each bucket you define. - SCALAR: Calculates a single numerical value from a dataset, summarizing the dataset into 1 key metric: `COUNT_DISTINCT`, `SUM`, `AVG`, `MIN`, or `MAX`. - DATE_HISTOGRAM: Calculates the count of time values from the specified field in the dataset that fall within each time interval you define (hour, day, week, etc.). - NESTED: Flattened list of aggregations, where each aggregation is nested within the previous one. - name: fieldPath | type: string | description: Path to the field to aggregate by in dot notation. For example `name` or `paymentOptions.online`. - name: search | type: SearchDetails | description: Free text to match in searchable fields. - name: mode | type: Mode | description: Defines how separate search terms in `expression` are combined. - enum: - OR: Any of the search terms must be present. - AND: All search terms must be present. - name: expression | type: string | description: Search term or expression. - name: fields | type: array | description: Fields to search in. If empty - will search in all searchable fields. Use dot notation to specify json path. - name: fuzzy | type: boolean | description: Whether to use auto fuzzy search (allowing typos by a managed proximity algorithm). - name: timeZone | type: string | description: Time zone in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database) or [ISO 8601 UTC offset format](https://en.wikipedia.org/wiki/ISO_8601#Time_offsets_from_UTC) for adjusting time fields in the specified filters and returned aggregation data. For example, `America/New_York`, `UTC`, or `+02:00`. Default: Time zone specified in the business [site properties](https://dev.wix.com/docs/rest/business-management/site-properties/properties/get-site-properties.md). Return type: SearchContentsResponse - name: contents | type: array | description: List of translation content. - name: id | type: string | description: Translation content GUID. - name: schemaId | type: string | description: Translation schema GUID. - name: entityId | type: string | description: A unique identifier defined by the app developer to differentiate translation content for various entities within the site. For example, if an app developer is creating translation content for blog posts, the `entityId` can be `'blog-posts-1'`. - name: locale | type: string | description: Translation content locale. - name: fields | type: Map | description: List of fields for the translation content. This property uses a string to map to a `ContentField` (`Map`). The string serves as a key, which you'll need to access each field in the content and when referencing a translation schema. - ONE-OF: - name: textValue | type: string | description: Plain text. Use this field if the corresponding schema `fields.type` is `SHORT_TEXT`, `LONG_TEXT`, `HTML`, or `IMAGE_LINK`. - name: richContent | type: RichContent | description: Translation Content rich content. See Ricos document reference - name: nodes | type: array | description: Node objects representing a rich content document. - ONE-OF: - name: buttonData | type: ButtonData | description: Data for a button node. - name: containerData | type: PluginContainerData | description: Styling for the button's container. - name: width | type: Width | description: The width of the node when it's displayed. - ONE-OF: - name: size | type: Type | description: One of the following predefined width options: `CONTENT`: The width of the container matches the content width. `SMALL`: A small width. `ORIGINAL`: For `imageData` containers only. The width of the container matches the original image width. `FULL_WIDTH`: For `imageData` containers only. The image container takes up the full width of the screen. - enum: - CONTENT: Width matches the content width - SMALL: Small Width - ORIGINAL: Width will match the original asset width - FULL_WIDTH: coast-to-coast display - name: custom | type: string | description: A custom width value in pixels. - name: alignment | type: Alignment | description: The node's alignment within its container. - enum: - CENTER: Center Alignment - LEFT: Left Alignment - RIGHT: Right Alignment - name: spoiler | type: Spoiler | description: Spoiler cover settings for the node. - name: enabled | type: boolean | description: Sets whether the spoiler cover is enabled for this node. Defaults to `false`. - name: description | type: string | description: The description displayed on top of the spoiler cover. - name: buttonText | type: string | description: The text for the button used to remove the spoiler cover. - name: height | type: Height | description: The height of the node when it's displayed. - name: custom | type: string | description: A custom height value in pixels. - name: textWrap | type: boolean | description: Sets whether text should wrap around this node when it's displayed. If `textWrap` is `false`, the node takes up the width of its container. Defaults to `true` for all node types except 'DIVIVDER' where it defaults to `false`. - name: type | type: Type | description: The button type. - enum: - LINK: Regular link button - ACTION: Triggers custom action that is defined in plugin configuration by the consumer - name: styles | type: Styles | description: Styling for the button. - name: borderWidth | type: integer | description: Border width in pixels. - name: borderRadius | type: integer | description: Border radius in pixels. - name: borderColor | type: string | description: Border color as a hexadecimal value. - name: borderColorHover | type: string | description: Border color as a hexadecimal value (hover state). - name: textColor | type: string | description: Text color as a hexadecimal value. - name: textColorHover | type: string | description: Text color as a hexadecimal value (hover state). - name: buttonSize | type: string | description: Button size option, one of `SMALL`, `MEDIUM` or `LARGE`. Defaults to `MEDIUM`. - name: background | type: Background | description: Background styling (color or gradient). - name: type | type: Type | description: Background type. - enum: - COLOR: Solid color background - GRADIENT: Gradient background - name: color | type: string | description: Background color as a hexadecimal value. - name: gradient | type: Gradient | description: Gradient configuration. - name: type | type: Type | description: Gradient type. - enum: - LINEAR: Linear gradient. - RADIAL: Radial gradient. - name: stops | type: array | description: Color stops for the gradient. - name: color | type: string | description: Stop color as hex value. - name: position | type: number | description: Stop position (0-1). - name: angle | type: integer | description: Angle in degrees for linear gradient (0-360). - name: centerX | type: number | description: Horizontal center position for radial gradient (0-100). - name: centerY | type: number | description: Vertical center position for radial gradient (0-100). - name: backgroundHover | type: Background | description: Background styling for hover state (color or gradient). - name: text | type: string | description: The text to display on the button. - name: link | type: Link | description: Button link details. - ONE-OF: - name: url | type: string | description: The absolute URL for the linked document. - name: anchor | type: string | description: The target node's GUID. Used for linking to another node in this object. - name: target | type: Target | description: he HTML `target` attribute value for the link. This property defines where the linked document opens as follows: `SELF` - Default. Opens the linked document in the same frame as the link. `BLANK` - Opens the linked document in a new browser tab or window. `PARENT` - Opens the linked document in the link's parent frame. `TOP` - Opens the linked document in the full body of the link's browser tab or window. - enum: - SELF: Opens the linked document in the same frame as it was clicked (this is default) - BLANK: Opens the linked document in a new window or tab - PARENT: Opens the linked document in the parent frame - TOP: Opens the linked document in the full body of the window - name: rel | type: Rel | description: The HTML `rel` attribute value for the link. This object specifies the relationship between the current document and the linked document. - name: nofollow | type: boolean | description: Indicates to search engine crawlers not to follow the link. Defaults to `false`. - name: sponsored | type: boolean | description: Indicates to search engine crawlers that the link is a paid placement such as sponsored content or an advertisement. Defaults to `false`. - name: ugc | type: boolean | description: Indicates that this link is user-generated content and isn't necessarily trusted or endorsed by the page’s author. For example, a link in a fourm post. Defaults to `false`. - name: noreferrer | type: boolean | description: Indicates that this link protect referral information from being passed to the target website. - name: customData | type: string | description: A serialized object used for a custom or external link panel. - name: codeBlockData | type: CodeBlockData | description: Data for a code block node. - name: textStyle | type: TextStyle | description: Styling for the code block's text. - name: textAlignment | type: TextAlignment | description: Text alignment. Defaults to `AUTO`. - enum: - AUTO: browser default, eqivalent to `initial` - LEFT: Left align - RIGHT: Right align - CENTER: Center align - JUSTIFY: Text is spaced to line up its left and right edges to the left and right edges of the line box, except for the last line - name: lineHeight | type: string | description: A CSS `line-height` value for the text expressed as a ratio relative to the font size. For example, if the font size is 20px, a `lineHeight` value of `'1.5'`` results in a line height of 30px. - name: dividerData | type: DividerData | description: Data for a divider node. - name: containerData | type: PluginContainerData | description: Styling for the divider's container. - name: lineStyle | type: LineStyle | description: Divider line style. - enum: - SINGLE: Single Line - DOUBLE: Double Line - DASHED: Dashed Line - DOTTED: Dotted Line - name: width | type: Width | description: Divider width. - enum: - LARGE: Large line - MEDIUM: Medium line - SMALL: Small line - name: alignment | type: Alignment | description: Divider alignment. - enum: - CENTER: Center alignment - LEFT: Left alignment - RIGHT: Right alignment - name: fileData | type: FileData | description: Data for a file node. - name: containerData | type: PluginContainerData | description: Styling for the file's container. - name: src | type: FileSource | description: The source for the file's data. - ONE-OF: - name: url | type: string | description: The absolute URL for the file's source. - name: id | type: string | description: An GUID that's resolved to a URL by a resolver function. - name: private | type: boolean | description: Indicates whether the file's source is private. Defaults to `false`. - name: name | type: string | description: File name. - name: type | type: string | description: File type. - name: pdfSettings | type: PDFSettings | description: Settings for PDF files. - name: viewMode | type: ViewMode | description: PDF view mode. One of the following: `NONE` : The PDF isn't displayed. `FULL` : A full page view of the PDF is displayed. `MINI` : A mini view of the PDF is displayed. - enum: - NONE: No PDF view - FULL: Full PDF view - MINI: Mini PDF view - name: disableDownload | type: boolean | description: Sets whether the PDF download button is disabled. Defaults to `false`. - name: disablePrint | type: boolean | description: Sets whether the PDF print button is disabled. Defaults to `false`. - name: mimeType | type: string | description: File MIME type. - name: path | type: string | description: File path. - name: sizeInKb | type: string | description: File size in KB. - name: galleryData | type: GalleryData | description: Data for a gallery node. - name: containerData | type: PluginContainerData | description: Styling for the gallery's container. - name: items | type: array | description: The items in the gallery. - ONE-OF: - name: image | type: Image | description: An image item. - name: media | type: Media | description: Image file details. - name: src | type: FileSource | description: The source for the media's data. - name: width | type: integer | description: Media width in pixels. - name: height | type: integer | description: Media height in pixels. - name: duration | type: number | description: Media duration in seconds. Only relevant for audio and video files. - name: link | type: Link | description: Link details for images that are links. - name: video | type: Video | description: A video item. - name: media | type: Media | description: Video file details. - name: thumbnail | type: Media | description: Video thumbnail file details. - name: title | type: string | description: Item title. - name: altText | type: string | description: Item's alternative text. - name: options | type: GalleryOptions | description: Options for defining the gallery's appearance. - name: layout | type: Layout | description: Gallery layout. - name: type | type: Type | description: Gallery layout type. - enum: - COLLAGE: Collage type - MASONRY: Masonry type - GRID: Grid type - THUMBNAIL: Thumbnail type - SLIDER: Slider type - SLIDESHOW: Slideshow type - PANORAMA: Panorama type - COLUMN: Column type - MAGIC: Magic type - FULLSIZE: Fullsize images type - name: horizontalScroll | type: boolean | description: Sets whether horizontal scroll is enabled. Defaults to `true` unless the layout `type` is set to `GRID` or `COLLAGE`. - name: orientation | type: Orientation | description: Gallery orientation. - enum: - ROWS: Rows Orientation - COLUMNS: Columns Orientation - name: numberOfColumns | type: integer | description: The number of columns to display on full size screens. - name: mobileNumberOfColumns | type: integer | description: The number of columns to display on mobile screens. - name: item | type: ItemStyle | description: Styling for gallery items. - name: targetSize | type: integer | description: Desirable dimension for each item in pixels (behvaior changes according to gallery type) - name: ratio | type: number | description: Item ratio - name: crop | type: Crop | description: Sets how item images are cropped. - enum: - FILL: Crop to fill - FIT: Crop to fit - name: spacing | type: integer | description: The spacing between items in pixels. - name: thumbnails | type: Thumbnails | description: Styling for gallery thumbnail images. - name: placement | type: Alignment | description: Thumbnail alignment. - enum: - TOP: Top alignment - RIGHT: Right alignment - BOTTOM: Bottom alignment - LEFT: Left alignment - NONE: No thumbnail - name: spacing | type: integer | description: Spacing between thumbnails in pixels. - name: disableExpand | type: boolean | description: Sets whether the gallery's expand button is disabled. Defaults to `false`. - name: disableDownload | type: boolean | description: Sets whether the gallery's download button is disabled. Defaults to `false`. - name: gifData | type: GIFData | description: Data for a GIF node. - name: containerData | type: PluginContainerData | description: Styling for the GIF's container. - name: original | type: GIF | description: The source of the full size GIF. - name: gif | type: string | description: GIF format URL. - name: mp4 | type: string | description: MP4 format URL. - name: still | type: string | description: Thumbnail URL. - name: downsized | type: GIF | description: The source of the downsized GIF. - name: height | type: integer | description: Height in pixels. - name: width | type: integer | description: Width in pixels. - name: gifType | type: GIFType | description: Type of GIF (Sticker or NORMAL). Defaults to `NORMAL`. - enum: NORMAL, STICKER - name: headingData | type: HeadingData | description: Data for a heading node. - name: level | type: integer | description: Heading level from 1-6. - name: textStyle | type: TextStyle | description: Styling for the heading text. - name: indentation | type: integer | description: Indentation level from 1-4. - name: renderedLevel | type: integer | description: Rendered heading level for SEO/accessibility, overrides the HTML tag when set. - name: htmlData | type: HTMLData | description: Data for an embedded HTML node. - ONE-OF: - name: url | type: string | description: The URL for the HTML code for the node. - name: html | type: string | description: The HTML code for the node. - name: widgetId | type: string | description: The WixelWidget GUID for AI_WIDGET source nodes. - name: containerData | type: PluginContainerData | description: Styling for the HTML node's container. Height property is irrelevant for HTML embeds when autoHeight is set to `true`. - name: source | type: Source | description: The type of HTML code. - enum: HTML, ADSENSE, AI, AI_WIDGET - name: autoHeight | type: boolean | description: If container height is aligned with its content height. Defaults to `true`. - name: imageData | type: ImageData | description: Data for an image node. - name: containerData | type: PluginContainerData | description: Styling for the image's container. - name: image | type: Media | description: Image file details. - name: link | type: Link | description: Link details for images that are links. - name: disableExpand | type: boolean | description: Sets whether the image expands to full screen when clicked. Defaults to `false`. - name: altText | type: string | description: Image's alternative text. - name: disableDownload | type: boolean | description: Sets whether the image's download button is disabled. Defaults to `false`. - name: decorative | type: boolean | description: Sets whether the image is decorative and does not need an explanation. Defaults to `false`. - name: styles | type: Styles | description: Styling for the image. - name: border | type: Border | description: Border attributes. - name: width | type: integer | description: Border width in pixels. - name: color | type: string | description: Border color as a hexadecimal value. - name: radius | type: integer | description: Border radius in pixels. - name: linkPreviewData | type: LinkPreviewData | description: Data for a link preview node. - name: containerData | type: PluginContainerData | description: Styling for the link preview's container. - name: link | type: Link | description: Link details. - name: title | type: string | description: Preview title. - name: thumbnailUrl | type: string | description: Preview thumbnail URL. - name: description | type: string | description: Preview description. - name: html | type: string | description: The preview content as HTML. - name: styles | type: Styles | description: Styling for the link preview. - name: backgroundColor | type: string | description: Background color as a hexadecimal value. - name: titleColor | type: string | description: Title color as a hexadecimal value. - name: subtitleColor | type: string | description: Subtitle color as a hexadecimal value. - name: linkColor | type: string | description: Link color as a hexadecimal value. - name: borderWidth | type: integer | description: Border width in pixels. - name: borderRadius | type: integer | description: Border radius in pixels. - name: borderColor | type: string | description: Border color as a hexadecimal value. - name: thumbnailPosition | type: Position | description: Position of thumbnail. Defaults to `START`. - enum: - START: Thumbnail positioned at the start (left in LTR layouts, right in RTL layouts) - END: Thumbnail positioned at the end (right in LTR layouts, left in RTL layouts) - TOP: Thumbnail positioned at the top - HIDDEN: Thumbnail hidden and not displayed - name: paragraphData | type: ParagraphData | description: Data for a paragraph node. - name: textStyle | type: TextStyle | description: Styling for the paragraph text. - name: indentation | type: integer | description: Indentation level from 1-4. - name: level | type: integer | description: Paragraph level - name: pollData | type: PollData | description: Data for a poll node. - name: containerData | type: PluginContainerData | description: Styling for the poll's container. - name: poll | type: Poll | description: Poll data. - name: id | type: string | description: Poll GUID. - name: title | type: string | description: Poll title. - name: creatorId | type: string | description: Poll creator GUID. - name: image | type: Media | description: Main poll image. - name: options | type: array