Full flexibility and control with our APIs
When you want to keep your current design or to have the power to control every aspect of your self-service tools, including how results are displayed, you will easily do it via API.
export const fetchSearchResults = async (query: string) => {
const url = urlBuilder(routes.searchURL, {
uid,
query,
preview: "true",
device: "desktop",
"session-id": sessionId,
});
const response = await fetch(url);
const data = (await response.json()) as SearchResultsResponse;
return data.results;
};
export const fetchSummary = async (query: string) => {
const url = urlBuilder(routes.summaryURL, { uid, query });
const response = await fetch(url);
const data = await response.json();
return data as SummaryResponse;
};