Skip to main content

Content Search

Usage

Use the following code to retrieve product recommendations data

Example

window.FastSimonSDK.contentSearch({
query: "socks",
callback: response => {
// do stuff here
}
});

Options

OptionTypeDescription
querystring (required)query to search for in your synced content
callback(Response) => void (required)callback to handle the results
pagenumber (default=1)content search is pagination based, page size is 20

Response

TypeScript Typing
interface Response {
action: "content-search"
payload: ContentSearchPayload
}

interface ContentSearchPayload {
content: SearchContent[]
page: number
}

interface SearchContent {
title: string
url: string
description?: string
image?: string
}