client, err := insights.NewClient("ALGOLIA_APPLICATION_ID", "ALGOLIA_API_KEY", insights.US)if err != nil { // The client can fail to initialize if you pass an invalid parameter. panic(err)}
Make sure to use the region that matches your Algolia application’s analytics region:
insights.US for the United States or insights.DE for Europe.
You can check your analytics region in the Infrastructure > Analytics section of the Algolia dashboard.
The Insights API client is part of the algoliasearch package.
You can add this package to your pom.xml file for Maven:
InsightsClient client = new InsightsClient("ALGOLIA_APPLICATION_ID", "ALGOLIA_API_KEY", "ALGOLIA_APPLICATION_REGION");
Replace ALGOLIA_APPLICATION_ID_REGION with your Algolia application’s analytics region: us for the United States or de for Europe.
You can check your analytics region in the Infrastructure > Analytics section of the Algolia dashboard.
The Insights API client is part of the @algolia/client-insights package.
To install this package, run:
Command line
npm install @algolia/client-insights
To use this client, run:
JavaScript
import { insightsClient } from "@algolia/client-insights";const client = insightsClient("ALGOLIA_APPLICATION_ID", "ALGOLIA_API_KEY");
To send events from your front- or backend,
consider using the search-insights library instead.
It comes with many helper methods for sending specific event types
and managing the user token.
The Insights API client is part of the algoliasearch-scala package.
You can add this package to your build.gradle.kts file:
build.gradle.kts
implementation("com.algolia:algoliasearch-client-kotlin:3.28.0")// You also need to add a KTOR engine as dependency, for example:implementation("io.ktor:ktor-client-java:$ktor_version")
To use the Insights client, add this import to your files:
val client = InsightsClient(appId = "ALGOLIA_APPLICATION_ID", apiKey = "ALGOLIA_API_KEY", region = "ALGOLIA_APPLICATION_REGION")
Replace ALGOLIA_APPLICATION_ID_REGION with your Algolia application’s analytics region: us for the United States or de for Europe.
You can check your analytics region in the Infrastructure > Analytics section of the Algolia dashboard.
The Insights API client is part of the algoliasearch-client-php package.
To install this package, run:
Command line
composer require algolia/algoliasearch-client-php
To use the Insights client, add this import to your files:
Replace ALGOLIA_APPLICATION_ID_REGION with your Algolia application’s analytics region: us for the United States or de for Europe.
You can check your analytics region in the Infrastructure > Analytics section of the Algolia dashboard.
The Insights API client is part of the algoliasearch package.
You can install this package with pip:
Command line
pip install 'algoliasearch>=4,<5'
To use the Insights client, add this import to your files:
Python
from algoliasearch.insights.client import InsightsClientSyncfrom json import loads
To create an instance of the client:
Python
# In an asynchronous context, you can use InsightsClient instead, which exposes the exact same methods.client = InsightsClientSync( "ALGOLIA_APPLICATION_ID", "ALGOLIA_API_KEY", "ALGOLIA_APPLICATION_REGION")
Replace ALGOLIA_APPLICATION_ID_REGION with your Algolia application’s analytics region: us for the United States or de for Europe.
You can check your analytics region in the Infrastructure > Analytics section of the Algolia dashboard.
Replace ALGOLIA_APPLICATION_ID_REGION with your Algolia application’s analytics region: us for the United States or de for Europe.
You can check your analytics region in the Infrastructure > Analytics section of the Algolia dashboard.
The Insights API client is part of the algoliasearch-scala package.
You can add this package to your build.sbt file:
build.sbt
// For Scala 3:libraryDependencies += "com.algolia" %% "algoliasearch-scala_3" % "2.27.0"// For Scala 2:libraryDependencies += "com.algolia" %% "algoliasearch-scala_2" % "2.27.0"
To use the Insights client, add these imports to your files:
val client = InsightsClient( appId = "ALGOLIA_APPLICATION_ID", apiKey = "ALGOLIA_API_KEY", region = Option("ALGOLIA_APPLICATION_REGION"))
Replace ALGOLIA_APPLICATION_ID_REGION with your Algolia application’s analytics region: us for the United States or de for Europe.
You can check your analytics region in the Infrastructure > Analytics section of the Algolia dashboard.
The Insights API client is part of the algoliasearch-client-swift package.
You can add this package to your Package.swift file:
Package.swift
// swift-tools-version: 5.10// The swift-tools-version declares the minimum version of Swift required to build this package.import PackageDescriptionlet package = Package( name: "Algolia API clients", platforms: [ .macOS(.v11) ], dependencies: [ .package( url: "https://github.com/algolia/algoliasearch-client-swift.git", from: "9.28.0") ], targets: [ .executableTarget( name: "Algolia API clients", dependencies: [ .product(name: "Insights", package: "algoliasearch-client-swift") ] ) ])
To use the Insights client, add this import to your files:
Swift
import Insights
To create an instance of the client:
Swift
let client = try InsightsClient(appID: "ALGOLIA_APPLICATION_ID", apiKey: "ALGOLIA_API_KEY", region: .us)
Make sure to use the region that matches your Algolia application’s analytics region:
region.us for the United States and region.de for Europe.
You can check your analytics region in the Infrastructure > Analytics section of the Algolia dashboard.
The Insights API client requires specifying your Algolia application’s analytics region to properly route requests to the correct data center.Replace ALGOLIA_APPLICATION_REGION with your application’s analytics region:
{"docsConfig":{"theme":"aspen","$schema":"https://mintlify.com/docs.json","name":"Algolia","description":"Build search, discovery, and AI experiences with Algolia. Guides, API references, libraries, UI components, and integrations for your stack.","colors":{"primary":"#3970ff","light":"#3970ff","dark":"#003DFF"},"logo":{"light":"https://mintcdn.com/algolia/kiecJp3hu-WXhj-3/logo/light.svg?fit=max\u0026auto=format\u0026n=kiecJp3hu-WXhj-3\u0026q=85\u0026s=bf613e260ca94c0eb23384e6c0d5c77f","dark":"https://mintcdn.com/algolia/kiecJp3hu-WXhj-3/logo/dark.svg?fit=max\u0026auto=format\u0026n=kiecJp3hu-WXhj-3\u0026q=85\u0026s=31a97f60063c111253c518bc0c638e70","href":"/doc"},"favicon":"https://mintcdn.com/algolia/ApgdWRCFtd9v2oPX/favicon.png?fit=max\u0026auto=format\u0026n=ApgdWRCFtd9v2oPX\u0026q=85\u0026s=91df7c93abadfb122ffc8e0f78cc2dc8","api":{"playground":{"display":"simple"},"examples":{"languages":["curl","csharp","dart","go","java","javascript","kotlin","php","python","ruby","scala","swift"],"autogenerate":false}},"navbar":{"links":[{"href":"https://dashboard.algolia.com/users/sign_in","label":"Log in"}],"primary":{"type":"button","label":"Create account","href":"https://www.algolia.com/users/sign_up"}},"footer":{"socials":{"linkedin":"https://www.linkedin.com/company/algolia","x":"https://twitter.com/algolia","discord":"https://alg.li/discord","youtube":"https://www.youtube.com/channel/UCTNkiq-SO8hay1PRx-it9Cw","website":"https://www.algolia.com"},"links":[{"items":[{"label":"Support","href":"https://support.algolia.com/hc/en-us"},{"label":"Glossary","href":"/doc/glossary"},{"label":"Privacy policy","href":"https://www.algolia.com/policies/privacy"},{"label":"Cookie settings","href":"https://www.algolia.com"}]}]},"seo":{"metatags":{"canonical":"https://www.algolia.com"},"organization":{"id":"https://www.algolia.com/#organization","name":"Algolia","url":"https://www.algolia.com","sameAs":["https://www.linkedin.com/company/algolia/","https://github.com/algolia","https://x.com/algolia","https://www.youtube.com/channel/UCTNkiq-SO8hay1PRx-it9Cw"]}},"fonts":{"heading":{"family":"Sora"}},"icons":{"library":"lucide"},"styling":{"eyebrows":"section","codeblocks":"system","latex":true},"integrations":{"segment":{"key":"cKQbv9nMHIUgdWswDLG0c3UdiUgBaUmA"}},"contextual":{"options":["copy","view","chatgpt","claude","perplexity"],"display":"header"},"metadata":{"timestamp":true},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"algolia","hasAudioNarration":false,"actualSubdomain":"algolia","customDomains":["www.algolia.com"],"gitSource":{"type":"github","owner":"algolia","repo":"docs-new","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"feedback":{"thumbs":true,"edits":true,"issues":true,"agentFeedback":false},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"REMOVE_BRANDING":{"status":"ENABLED"},"CONTEXTUAL_FEEDBACK":{"status":"ENABLED"},"CODE_SNIPPET_FEEDBACK":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6aedffff2f3197cf5b96845b","clientVersion":"0.0.4087","searchFilterCounts":[{"language":"default","tag":"Libraries and tools","count":629},{"language":"default","tag":"Guides","count":585},{"language":"default","tag":"API clients","count":418},{"language":"default","tag":"Search and Discovery platform","count":408},{"language":"default","tag":"API reference","count":400},{"language":"default","tag":"Reference","count":293},{"language":"default","tag":"UI libraries","count":290},{"language":"default","tag":"Build Search UI","count":235},{"language":"default","tag":"Search","count":187},{"language":"default","tag":"React InstantSearch","count":169}]},"assistantConfig":{},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"comment-mode","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":true},"customCss":[{"filePath":"style.css","content":":root{--radius: 0.5rem;--rounded-2xl: var(--radius);--rounded-xl: var(--radius);--rounded-lg: var(--radius);--rounded-md: var(--radius);--rounded-full: var(--radius);--icon-stroke: #000000;--border-color: rgb(var(--gray-200) / 0.5);--font-weight-headings-custom: 700;--docsearch-background-color: #f5f6f7;--filters-token-string-color: #b46900;--filters-token-error-color: #d7263d;--filters-token-paren-color: #005cc5;--filters-token-num-color: #6f42c1;--filters-token-operator-color: #22863a;--docsearch-sidepanel-border: var(--border-color);--docsearch-sidepanel-background: rgb(244, 246, 250);--docsearch-sidepanel-background-dark: #fff;--docsearch-hit-background-muted: rgb(247, 247, 248);--docsearch-searchbox-focus-background: #fff}:root.dark,html[data-theme=dark]{--icon-stroke: #ffffff;--border-color: rgb(var(--gray-900) / 0.8);--docsearch-background-color: #0a0b11 !important;--docsearch-dropdown-menu-background: #10121e;--docsearch-dropdown-menu-item-hover-background: #0a0b11;--docsearch-hit-color: #e5e7eb;--filters-token-string-color: #ffa657;--filters-token-error-color: #ff6b6b;--filters-token-paren-color: #79c0ff;--filters-token-num-color: #d2a8ff;--filters-token-operator-color: #7ee787;--docsearch-sidepanel-background: rgb(15, 17, 23);--docsearch-sidepanel-background-dark: rgba(11, 13, 17, 1);--docsearch-hit-background-muted: rgb(14, 17, 23);--docsearch-modal-background: #0a0b11;--docsearch-hit-focus-background: rgb(var(--gray-900))}.rounded-\\[0\\.85rem\\]{border-radius:var(--radius)}#banner{background-color:#23263b}#banner a{color:inherit}#background-div{background-color:#f6f6fa}.dark #background-div{background-color:#ffffff;opacity:0.03}#pagination{display:none}.background-lines{fill:#c5c9e0}.dark .background-lines{fill:#ffffff;fill-opacity:0.15}th{text-align:left}.tooltip{user-select:text}.prose a{font-weight:inherit}.prose a strong{font-weight:600}.katex-display>.katex{overflow-y:hidden}.prose a.link[href^=\"http\"]:not([href^=\"https://www.algolia.com/doc\"]){white-space:nowrap}.prose a.link[href^=\"http\"]:not([href^=\"https://www.algolia.com/doc\"])::after{display:inline-block;width:14px;height:14px;margin-left:4px;vertical-align:-2px;content:\"\";background-color:currentColor;-webkit-mask:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E\u003cpath d='M15 3h6v6'/%3E\u003cpath d='M10 14 21 3'/%3E\u003cpath d='M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6'/%3E%3C/svg%3E\") center / contain no-repeat;mask:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E\u003cpath d='M15 3h6v6'/%3E\u003cpath d='M10 14 21 3'/%3E\u003cpath d='M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6'/%3E%3C/svg%3E\") center / contain no-repeat}.prose h2 code,.prose h3 code,.prose h4 code{font-weight:700}.prose table a code{word-break:keep-all}[data-component-part=\"field-content\"]{margin-left:1.5rem}[data-component-part=\"code-block-root\"]{border-radius:var(--radius)}#content-area img{margin-inline:auto;background:transparent!important}#content-area img:not(.no-shadow){box-shadow:0 10px 15px -3px rgb(0 0 0 / 0.1),\n 0 4px 6px -4px rgb(0 0 0 / 0.1)}#content-area video{margin-inline:auto}.video-embed{display:block;width:100%;min-width:0;max-width:var(--video-embed-max-width, 644px);aspect-ratio:16 / 9;height:auto;margin-inline:auto}button+div[aria-hidden=\"true\"]{background-color:#23263b;border-radius:var(--radius);box-shadow:0 0 0 1px #23263b0d, 0 4px 8px -2px #23263b40;color:#fff;padding:.5rem .75rem}#feedback-toolbar button{border-radius:var(--radius)}html.no-overflow{overflow:hidden}body.DocSearch--active{overflow:initial!important}.DocSearch-Container{visibility:hidden;opacity:0;transition:opacity 120ms ease;padding-top:5vh;position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0, 0, 0, 0.1);display:flex;align-items:flex-start;justify-content:center;z-index:200;cursor:initial}.DocSearch-Container.docsearch-ready{visibility:visible;opacity:1}.dark .DocSearch-Form,.dark .DocSearch-SearchBar{background-color:transparent!important}.DocSearch-Dropdown{border-top:1px solid var(--docsearch-subtle-color);scrollbar-color:#9698c3 #f5f6f7;scrollbar-width:thin}.dark .DocSearch-Container{--docsearch-text-color: #c4c7dc}.dark .DocSearch-Dropdown{scrollbar-color:#7f8497 #15172a}.dark .DocSearch-Close{color:#5172FF}.dark .DocSearch-Close svg{color:#5172FF}.dark .DocSearch-MagnifierLabel svg{color:#5172FF}.DocSearch-SidepanelButton.floating{display:none}.dark .DocSearch-Dropdown{border-color:#212139}.dark .DocSearch-Divider{border-color:#212139}.dark .DocSearch-Input{color:white;caret-color:white}.dark .DocSearch-Container{background-color:rgba(0, 0, 0, 0.6)!important}.dark .DocSearch-SearchBar,.dark .DocSearch-Form,.dark .DocSearch-Input{color:#ffffff!important}.dark .DocSearch-Input::placeholder{color:#ffffff!important;opacity:0.9}.dark .DocSearch-Reset,.dark .DocSearch-Reset span,.dark .DocSearch-Reset svg,.dark .DocSearch-Close,.dark .DocSearch-Close svg{color:#5172ff!important;fill:#5172ff!important;stroke:#5172ff!important}.dark .DocSearch-Cancel,.dark .DocSearch-Cancel svg{color:#ffffff!important;fill:#ffffff!important;stroke:#ffffff!important}.dark .DocSearch-MagnifierLabel,.dark .DocSearch-MagnifierLabel svg{color:#5172ff!important;fill:#5172ff!important;stroke:#5172ff!important}.dark .DocSearch-Dropdown{background-color:#0a0b11!important}.dark .DocSearch-Hits mark{background-color:transparent!important;color:#7aa2ff!important}.dark .DocSearch-Hit a{color:#e5e7eb!important;border-color:#1b1e29!important}.dark .DocSearch-Hit[aria-selected=true] .DocSearch-Hit-action,.dark .DocSearch-Hit[aria-selected=true] .DocSearch-Hit-icon{color:#7aa2ff}.dark .DocSearch-Title,.dark .DocSearch-Label{background-color:#0f1117!important}.dark .DocSearch-Title,.dark .DocSearch-Label,.dark .DocSearch-Hit-source{color:#e5e7eb!important}.dark .DocSearch-Footer{background-color:#0f1117!important;border-top:1px solid #1b1e29!important;color:#cbd5e1!important}.DocSearch-Hit--AskAI .DocSearch-AskAiScreen-Response .DocSearch-AskAiScreen-RelatedSources-Item-Link{background:var(--docsearch-hit-background-muted)!important}.DocSearch-Hit-AskAIButton-title-query{color:var(--docsearch-highlight-color)}.dark .DocSearch-Hit-AskAIButton-title-query{color:#7aa2ff!important}.dark .DocSearch-AskAiScreen-Response{color:#f5f6f7!important}.dark .DocSearch-Markdown-Content,.dark .DocSearch-Markdown-Content li{color:#cbd5e1!important}.dark .DocSearch-Markdown-Content a{color:#7aa2ff!important}.dark .DocSearch-AskAiScreen-RelatedSources-Item-Link{color:#cbd5e1}.dark .DocSearch-AskAiScreen-Response .DocSearch-CodeSnippet .DocSearch-CodeSnippet-CopyButton{background-color:#0f1117!important;color:#cbd5e1!important}.dark .DocSearch-AskAiScreen-Response .DocSearch-CodeSnippet pre{background-color:#0f1117!important;color:#e5e7eb!important}.dark .DocSearch-AskAiScreen-Response .DocSearch-CodeSnippet pre code{background-color:transparent!important;color:inherit!important}.DocSearch-Modal{position:relative;overflow:hidden;width:700px;max-width:90vw;border-radius:var(--radius);box-shadow:0 4px 12px rgba(0, 0, 0, 0.15)}.docsearch-expanded .DocSearch-Modal{max-height:auto;border-radius:var(--radius);box-shadow:0 25px 50px -12px rgba(0, 0, 0, 0.25)}@media (max-width: 768px){.DocSearch-Container{padding-top:0}.DocSearch-Modal{width:100vw;max-width:100vw;border-radius:var(--radius)}.docsearch-expanded .DocSearch-Modal{max-height:100vh;border-radius:var(--radius)}.DocSearch-Dropdown{height:calc(100vh - var(--docsearch-footer-height) - var(--docsearch-searchbox-height, var(--docsearch-searchbox-initial-height)))}.docsearch-sidepanel-toggle .docsearch-sidepanel-label,.docsearch-sidepanel-toggle .docsearch-sidepanel-shortcut{display:none}.docsearch-sidepanel-toggle{padding:0 0.5rem}}@media (min-width: 769px){.docsearch-sidepanel-toggle{border:1px solid transparent;box-shadow:0 0 0 1px rgba(156, 163, 175, 0.3)}.docsearch-sidepanel-toggle:hover{box-shadow:0 0 0 1px rgba(75, 85, 99, 0.3)}html.dark .docsearch-sidepanel-toggle{box-shadow:0 0 0 1px rgba(75, 85, 99, 0.3)}html.dark .docsearch-sidepanel-toggle:hover{box-shadow:0 0 0 1px rgba(107, 114, 128, 0.3)}}.DocSearch-Sidepanel-Header{height:3.0rem}.DocSearch-Sidepanel-Container.inline.side-right{border-bottom-left-radius:0;border-left:1px solid var(--docsearch-sidepanel-border);border-top-left-radius:0}.DocSearch-Sidepanel-Container{box-shadow:none}.DocSearch-MCP-Callout{font-size:0.875em;display:flex;align-items:center;gap:0.25rem;color:var(--docsearch-text-color);padding-inline:0.25rem 0.5rem;padding-block:0.25rem;border-radius:var(--docsearch-border-radius);background-color:var(--docsearch-hit-focus-background);min-block-size:1.5rem}.DocSearch-MCP-Callout:hover,.DocSearch-MCP-Callout:focus-visible{outline:2px solid var(--docsearch-highlight-color)}.DocSearch-MCP-Callout svg{height:1rem;width:1rem;color:var(--docsearch-highlight-color);margin-block-start:1px}html.dark #filter-validator{background-color:var(--shiki-dark-bg)}#filter-validator{.Token_EOF {\n color: transparent;\n }\n\n .Token_Empty_Str,\n .Token_Incomplete_Str,\n .Token_String,\n .Token_Term {\n color: var(--filters-token-string-color);\n }\n\n .Token_Error {\n color: var(--filters-token-error-color);\n }\n\n .Token_Open_Paren,\n .Token_Close_Paren,\n .Token_Open_Angled_Bracket,\n .Token_Close_Angled_Bracket,\n .Token_Comma,\n .Token_Facet_Separator {\n color: var(--filters-token-paren-color);\n }\n\n .Token_Num {\n color: var(--filters-token-num-color);\n }\n\n .Token_OR,\n .Token_AND,\n .Token_NOT,\n .Token_Operator,\n .Token_Range {\n color: var(--filters-token-operator-color);\n }}.nav-tag-pill-text{text-transform:uppercase;letter-spacing:1px}[data-group-tag]>button>div{display:flex;align-items:center;gap:0.5rem}.steps .step .prose ol{list-style-type:lower-alpha}.no-bullets ul{margin-top:1rem;padding-left:0;margin-left:0;list-style:none}@layer components{.prose .no-bullets li{margin:0.5rem 0;margin-left:0!important;padding-left:0!important;list-style:none}}.no-bullets a.link{border-bottom-color:transparent}.no-bullets a.link:hover,.no-bullets a.link:focus-visible{border-bottom-color:rgb(57, 112, 255)}.no-bullets li::before{content:none!important}.homepage-hero{background-color:#23263b;background-image:linear-gradient(\n 90deg,\n rgba(12, 30, 69, 0.82) 0%,\n rgba(12, 30, 69, 0.72) 34%,\n rgba(12, 30, 69, 0.58) 58%,\n rgba(12, 30, 69, 0.44) 100%\n ),\n url(\"/mintlify-assets/hero.png\");background-position:center, 72% center;background-repeat:no-repeat;background-size:cover}@supports (background-image: image-set(url(\"/mintlify-assets/hero.webp\") type(\"image/webp\") 1x)){.homepage-hero{background-image:linear-gradient(\n 90deg,\n rgba(12, 30, 69, 0.82) 0%,\n rgba(12, 30, 69, 0.72) 34%,\n rgba(12, 30, 69, 0.58) 58%,\n rgba(12, 30, 69, 0.44) 100%\n ),\n image-set(\n url(\"/mintlify-assets/hero.webp\") type(\"image/webp\") 1x,\n url(\"/mintlify-assets/hero.png\") type(\"image/png\") 1x\n )}}@supports (background-image: -webkit-image-set(url(\"/mintlify-assets/hero.webp\") type(\"image/webp\") 1x)){.homepage-hero{background-image:linear-gradient(\n 90deg,\n rgba(12, 30, 69, 0.82) 0%,\n rgba(12, 30, 69, 0.72) 34%,\n rgba(12, 30, 69, 0.58) 58%,\n rgba(12, 30, 69, 0.44) 100%\n ),\n -webkit-image-set(\n url(\"/mintlify-assets/hero.webp\") type(\"image/webp\") 1x,\n url(\"/mintlify-assets/hero.png\") type(\"image/png\") 1x\n )}}.homepage-hero-cta{display:inline-flex;align-items:center;justify-content:center;gap:0;padding:0.5rem 0.875rem;border-radius:var(--radius);background:linear-gradient(220deg, rgb(69, 122, 255) 0%, rgb(30, 89, 255) 60.16%);color:#fff!important;font-family:Sora, sans-serif;font-size:0.875rem;font-weight:700;line-height:1.5rem;letter-spacing:0.28px;text-decoration:none;transition:all 150ms ease}.homepage-hero-cta:hover{background:linear-gradient(138deg, rgba(118, 160, 255, 0.7) 0%, rgba(0, 61, 255, 0.7) 25.08%, rgba(151, 71, 255, 0.7) 56.38%, rgba(118, 160, 255, 0.7) 100%), rgb(0, 61, 255);color:#fff!important}@media (min-width: 1024px){.homepage-hero-cta{padding:0.75rem 1.25rem;font-size:1rem;letter-spacing:0.32px}}.sig-param-link{color:inherit;text-decoration:underline;text-decoration-style:dotted;text-decoration-thickness:1px;text-underline-offset:3px;text-decoration-color:color-mix(in srgb, currentColor 45%, transparent);cursor:pointer;border-radius:2px;transition:text-decoration-color 120ms ease, text-decoration-thickness 120ms ease}.sig-param-link:hover,.sig-param-link:focus-visible,.line:has(.sig-param-link:hover) .sig-param-link,.line:has(.sig-param-link:focus-visible) .sig-param-link{text-decoration-style:solid;text-decoration-thickness:2px;text-decoration-color:currentColor;outline:none}.mint-flavor-switcher-slot{min-height:2.75rem;margin:0.25rem 0 1.5rem}.mint-flavor-switcher-slot .mint-flavor-switcher{margin:0}"}],"page":{"pagePath":"doc/libraries/sdk/methods/insights","slug":"/doc/libraries/sdk/methods/insights","pageMetadata":{"title":"Insights API client","sidebarTitle":"Overview","description":"Collect events related to your search and discovery experience.","public":true,"subtype":"API","version":"Current","href":"/doc/libraries/sdk/methods/insights"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Collect events related to your search and discovery experience.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,Note,Tab,Tabs}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!Tab)_missingMdxReference(`Tab`,true);if(!Tabs)_missingMdxReference(`Tabs`,true);return _jsxs(_Fragment,{children:[_jsxs(Tabs,{children:[_jsxs(Tab,{title:`C#`,id:`c%23`,children:[_jsxs(_components.p,{children:[`The Insights API client is part of the `,_jsx(_components.code,{children:`Algolia.Search`}),` package.\nTo install this package, run:`]}),_jsx(CodeBlock,{filename:`Command line`,icon:`square-terminal`,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`dotnet`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` add`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` package`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` Algolia.Search`})]}),`\n`]})})}),_jsx(_components.p,{children:`To use the Insights client, import these namespaces:`}),_jsx(CodeBlock,{filename:`C#`,icon:`code`,numberOfLines:`3`,language:`csharp`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`csharp`,children:_jsxs(_components.code,{language:`csharp`,numberOfLines:`3`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`using`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` Algolia`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`Search`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`Clients`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`using`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` Algolia`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`Search`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`Http`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`using`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` Algolia`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`Search`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`Models`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`Insights`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`]})})}),_jsx(_components.p,{children:`To create an instance of the client:`}),_jsx(CodeBlock,{filename:`C#`,icon:`code`,numberOfLines:`3`,language:`csharp`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`csharp`,children:_jsxs(_components.code,{language:`csharp`,numberOfLines:`3`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`var`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` client`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` new`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` InsightsClient`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` new`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` InsightsConfig`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"ALGOLIA_APPLICATION_ID\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"ALGOLIA_API_KEY\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"ALGOLIA_APPLICATION_REGION\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})}),`\n`]})})})]}),_jsxs(Tab,{title:`Dart`,id:`dart`,children:[_jsxs(_components.p,{children:[`The Insights API client is part of the `,_jsx(_components.code,{children:`algoliasearch`}),` package.\nTo install this package, run:`]}),_jsx(CodeBlock,{filename:`Command line`,icon:`square-terminal`,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`dart`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` pub`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` add`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` algoliasearch`})]}),`\n`]})})}),_jsx(_components.p,{children:`To use the Insights client, add this import to your files:`}),_jsx(CodeBlock,{filename:`Dart`,icon:`code`,numberOfLines:`1`,language:`dart`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`dart`,children:_jsxs(_components.code,{language:`dart`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`import`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'package:algolia_client_insights/algolia_client_insights.dart'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`]})})}),_jsx(_components.p,{children:`To create an instance of the client:`}),_jsx(CodeBlock,{filename:`Dart`,icon:`code`,numberOfLines:`4`,language:`dart`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`dart`,children:_jsxs(_components.code,{language:`dart`,numberOfLines:`4`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`final`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` client `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` InsightsClient`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` appId`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'ALGOLIA_APPLICATION_ID'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` apiKey`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'ALGOLIA_API_KEY'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` region`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'ALGOLIA_APPLICATION_REGION'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`]})})})]}),_jsxs(Tab,{title:`Go`,id:`go`,children:[_jsxs(_components.p,{children:[`The Insights API client is part of the `,_jsx(_components.code,{children:`algoliasearch-client-go`}),` package.\nTo install it, run:`]}),_jsx(CodeBlock,{filename:`Command line`,icon:`square-terminal`,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`go`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` get`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` github.com/algolia/algoliasearch-client-go`})]}),`\n`]})})}),_jsx(_components.p,{children:`To use the Insights client, add this import to your files:`}),_jsx(CodeBlock,{filename:`Go`,icon:`code`,numberOfLines:`1`,language:`go`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`go`,children:_jsxs(_components.code,{language:`go`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#CE9178`},children:`github.com/algolia/algoliasearch-client-go/v4/algolia/insights`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`})]}),`\n`]})})}),_jsx(_components.p,{children:`To create an instance of the client:`}),_jsx(CodeBlock,{filename:`Go`,icon:`code`,numberOfLines:`5`,language:`go`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`go`,children:_jsxs(_components.code,{language:`go`,numberOfLines:`5`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`client`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`err`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` :=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` insights`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`NewClient`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"ALGOLIA_APPLICATION_ID\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"ALGOLIA_API_KEY\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`insights`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`US`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` err`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` !=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` nil`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // The client can fail to initialize if you pass an invalid parameter.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` panic`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`err`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsxs(_components.p,{children:[`Make sure to use the region that matches your Algolia application’s analytics region:\n`,_jsx(_components.code,{children:`insights.US`}),` for the United States or `,_jsx(_components.code,{children:`insights.DE`}),` for Europe.\nYou can check your analytics region in the `,_jsx(_components.a,{href:`https://dashboard.algolia.com/account/infrastructure/analytics`,children:_jsx(_components.strong,{children:`Infrastructure > Analytics`})}),` section of the Algolia dashboard.`]})]}),_jsxs(Tab,{title:`Java`,id:`java`,children:[_jsxs(_components.p,{children:[`The Insights API client is part of the `,_jsx(_components.code,{children:`algoliasearch`}),` package.\nYou can add this package to your `,_jsx(_components.code,{children:`pom.xml`}),` file for `,_jsx(_components.strong,{children:`Maven`}),`:`]}),_jsx(CodeBlock,{filename:`pom.xml`,icon:`code-xml`,numberOfLines:`5`,language:`xml`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`xml`,children:_jsxs(_components.code,{language:`xml`,numberOfLines:`5`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`dependency`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:` \u003c`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`groupId`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`com.algolia`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`\u003c/`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`groupId`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:` \u003c`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`artifactId`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`algoliasearch`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`\u003c/`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`artifactId`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:` \u003c`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`version`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`4.25.0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`\u003c/`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`version`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`\u003c/`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`dependency`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`]})})}),_jsxs(_components.p,{children:[`or to your `,_jsx(_components.code,{children:`build.gradle`}),` file for `,_jsx(_components.strong,{children:`Gradle`}),`:`]}),_jsx(CodeBlock,{filename:`build.gradle`,icon:`braces`,numberOfLines:`1`,language:`groovy`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`groovy`,children:_jsxs(_components.code,{language:`groovy`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`implementation `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'com.algolia:algoliasearch:4.25.0'`})]}),`\n`]})})}),_jsx(_components.p,{children:`To use the Insights client, add these imports to your files:`}),_jsx(CodeBlock,{filename:`Java`,icon:`code`,numberOfLines:`2`,language:`java`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`java`,children:_jsxs(_components.code,{language:`java`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` com.algolia.api.InsightsClient;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` com.algolia.config.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`*`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`]})})}),_jsx(_components.p,{children:`To create an instance of the client:`}),_jsx(CodeBlock,{filename:`Java`,icon:`code`,numberOfLines:`1`,language:`java`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`java`,children:_jsxs(_components.code,{language:`java`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#4EC9B0`},children:`InsightsClient`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` client`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` new`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` InsightsClient`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"ALGOLIA_APPLICATION_ID\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"ALGOLIA_API_KEY\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"ALGOLIA_APPLICATION_REGION\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`]})})}),_jsxs(_components.p,{children:[`Replace `,_jsx(_components.code,{children:`ALGOLIA_APPLICATION_ID_REGION`}),` with your Algolia application’s analytics region: `,_jsx(_components.code,{children:`us`}),` for the United States or `,_jsx(_components.code,{children:`de`}),` for Europe.\nYou can check your analytics region in the `,_jsx(_components.a,{href:`https://dashboard.algolia.com/account/infrastructure/analytics`,children:_jsx(_components.strong,{children:`Infrastructure > Analytics`})}),` section of the Algolia dashboard.`]})]}),_jsxs(Tab,{title:`JavaScript`,id:`javascript`,children:[_jsxs(_components.p,{children:[`The Insights API client is part of the `,_jsx(_components.code,{children:`@algolia/client-insights`}),` package.\nTo install this package, run:`]}),_jsx(CodeBlock,{filename:`Command line`,icon:`square-terminal`,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`npm`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` install`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` @algolia/client-insights`})]}),`\n`]})})}),_jsx(_components.p,{children:`To use this client, run:`}),_jsx(CodeBlock,{filename:`JavaScript`,icon:`code`,numberOfLines:`3`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`3`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`insightsClient`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"@algolia/client-insights\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` client`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` insightsClient`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"ALGOLIA_APPLICATION_ID\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"ALGOLIA_API_KEY\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`]})})}),_jsx(Note,{children:_jsxs(_components.p,{children:[`To send events from your front- or backend,\nconsider using the `,_jsx(_components.a,{href:`/doc/libraries/search-insights`,children:_jsx(_components.code,{children:`search-insights`})}),` library instead.\nIt comes with many helper methods for sending specific event types\nand managing the user token.`]})})]}),_jsxs(Tab,{title:`Kotlin`,id:`kotlin`,children:[_jsxs(_components.p,{children:[`The Insights API client is part of the `,_jsx(_components.code,{children:`algoliasearch-scala`}),` package.\nYou can add this package to your `,_jsx(_components.code,{children:`build.gradle.kts`}),` file:`]}),_jsx(CodeBlock,{filename:`build.gradle.kts`,icon:`braces`,numberOfLines:`3`,language:`kotlin`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`kotlin`,children:_jsxs(_components.code,{language:`kotlin`,numberOfLines:`3`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`implementation`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"com.algolia:algoliasearch-client-kotlin:3.28.0\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// You also need to add a KTOR engine as dependency, for example:`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`implementation`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"io.ktor:ktor-client-java:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:`$ktor_version`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`]})})}),_jsx(_components.p,{children:`To use the Insights client, add this import to your files:`}),_jsx(CodeBlock,{filename:`Kotlin`,icon:`code`,numberOfLines:`3`,language:`kotlin`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`kotlin`,children:_jsxs(_components.code,{language:`kotlin`,numberOfLines:`3`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`import`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#D4D4D4`},children:` com.algolia.client.api.InsightsClient`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`import`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#D4D4D4`},children:` com.algolia.client.configuration.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`*`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`import`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#D4D4D4`},children:` com.algolia.client.transport.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`*`})]}),`\n`]})})}),_jsx(_components.p,{children:`To create an instance of the client:`}),_jsx(CodeBlock,{filename:`Kotlin`,icon:`code`,numberOfLines:`1`,language:`kotlin`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`kotlin`,children:_jsxs(_components.code,{language:`kotlin`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`val`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` client `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` InsightsClient`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(appId `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"ALGOLIA_APPLICATION_ID\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, apiKey `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"ALGOLIA_API_KEY\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, region `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"ALGOLIA_APPLICATION_REGION\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`]})})}),_jsxs(_components.p,{children:[`Replace `,_jsx(_components.code,{children:`ALGOLIA_APPLICATION_ID_REGION`}),` with your Algolia application’s analytics region: `,_jsx(_components.code,{children:`us`}),` for the United States or `,_jsx(_components.code,{children:`de`}),` for Europe.\nYou can check your analytics region in the `,_jsx(_components.a,{href:`https://dashboard.algolia.com/account/infrastructure/analytics`,children:_jsx(_components.strong,{children:`Infrastructure > Analytics`})}),` section of the Algolia dashboard.`]})]}),_jsxs(Tab,{title:`PHP`,id:`php`,children:[_jsxs(_components.p,{children:[`The Insights API client is part of the `,_jsx(_components.code,{children:`algoliasearch-client-php`}),` package.\nTo install this package, run:`]}),_jsx(CodeBlock,{filename:`Command line`,icon:`square-terminal`,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`composer`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` require`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` algolia/algoliasearch-client-php`})]}),`\n`]})})}),_jsx(_components.p,{children:`To use the Insights client, add this import to your files:`}),_jsx(CodeBlock,{filename:`PHP`,icon:`code`,numberOfLines:`1`,language:`php`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`php`,children:_jsxs(_components.code,{language:`php`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`use`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:` Algolia\\\\AlgoliaSearch\\\\Api\\\\`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`InsightsClient`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`]})})}),_jsx(_components.p,{children:`To create an instance of the client:`}),_jsx(CodeBlock,{filename:`PHP`,icon:`code`,numberOfLines:`1`,language:`php`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`php`,children:_jsxs(_components.code,{language:`php`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$client`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` InsightsClient`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`::`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`create`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'ALGOLIA_APPLICATION_ID'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'ALGOLIA_API_KEY'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'ALGOLIA_APPLICATION_REGION'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`]})})}),_jsxs(_components.p,{children:[`Replace `,_jsx(_components.code,{children:`ALGOLIA_APPLICATION_ID_REGION`}),` with your Algolia application’s analytics region: `,_jsx(_components.code,{children:`us`}),` for the United States or `,_jsx(_components.code,{children:`de`}),` for Europe.\nYou can check your analytics region in the `,_jsx(_components.a,{href:`https://dashboard.algolia.com/account/infrastructure/analytics`,children:_jsx(_components.strong,{children:`Infrastructure > Analytics`})}),` section of the Algolia dashboard.`]})]}),_jsxs(Tab,{title:`Python`,id:`python`,\"data-child-heading-ids\":`[\"async-code\"]`,children:[_jsxs(_components.p,{children:[`The Insights API client is part of the `,_jsx(_components.code,{children:`algoliasearch`}),` package.\nYou can install this package with `,_jsx(_components.code,{children:`pip`}),`:`]}),_jsx(CodeBlock,{filename:`Command line`,icon:`square-terminal`,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`pip`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` install`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'algoliasearch>=4,\u003c5'`})]}),`\n`]})})}),_jsx(_components.p,{children:`To use the Insights client, add this import to your files:`}),_jsx(CodeBlock,{filename:`Python`,icon:`code`,numberOfLines:`2`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` algoliasearch.insights.client `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` InsightsClientSync`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` json `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` loads`})]}),`\n`]})})}),_jsx(_components.p,{children:`To create an instance of the client:`}),_jsx(CodeBlock,{filename:`Python`,icon:`code`,numberOfLines:`4`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`4`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# In an asynchronous context, you can use InsightsClient instead, which exposes the exact same methods.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`client `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` InsightsClientSync(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"ALGOLIA_APPLICATION_ID\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"ALGOLIA_API_KEY\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"ALGOLIA_APPLICATION_REGION\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`]})})}),_jsxs(_components.p,{children:[`Replace `,_jsx(_components.code,{children:`ALGOLIA_APPLICATION_ID_REGION`}),` with your Algolia application’s analytics region: `,_jsx(_components.code,{children:`us`}),` for the United States or `,_jsx(_components.code,{children:`de`}),` for Europe.\nYou can check your analytics region in the `,_jsx(_components.a,{href:`https://dashboard.algolia.com/account/infrastructure/analytics`,children:_jsx(_components.strong,{children:`Infrastructure > Analytics`})}),` section of the Algolia dashboard.`]}),_jsx(Heading,{level:`2`,id:`async-code`,children:`Async code`}),_jsxs(_components.p,{children:[`To use the Insights client in `,_jsx(_components.strong,{children:`async`}),` environments,\nadd these imports instead:`]}),_jsx(CodeBlock,{filename:`Python`,icon:`code`,numberOfLines:`2`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` asyncio`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` algoliasearch.insights.client `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` InsightsClient`})]}),`\n`]})})}),_jsxs(_components.p,{children:[`The client supports the `,_jsx(_components.a,{href:`https://peps.python.org/pep-0492/#asynchronous-context-managers-and-async-with`,children:_jsx(_components.code,{children:`async with`})}),` statement to automatically close open connections.`]}),_jsx(CodeBlock,{filename:`Python`,icon:`code`,numberOfLines:`3`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`3`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`async`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` def`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` run`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`():`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` async`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` with`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` InsightsClient(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`ALGOLIA_APPLICATION_ID`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`ALGOLIA_API_KEY`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`as`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` client:`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # client.search(...)`})}),`\n`]})})}),_jsx(_components.p,{children:`The method names are the same for synchronous and asynchronous methods.`})]}),_jsxs(Tab,{title:`Ruby`,id:`ruby`,children:[_jsxs(_components.p,{children:[`The Insights API client is part of the `,_jsx(_components.code,{children:`algolia`}),` gem.\nTo install this gem, run:`]}),_jsx(CodeBlock,{filename:`Command line`,icon:`square-terminal`,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`gem`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` install`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` algolia`})]}),`\n`]})})}),_jsx(_components.p,{children:`To use the Insights client, add this import to your files:`}),_jsx(CodeBlock,{filename:`Ruby`,icon:`code`,numberOfLines:`1`,language:`ruby`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`ruby`,children:_jsxs(_components.code,{language:`ruby`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`require`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"algolia\"`})]}),`\n`]})})}),_jsx(_components.p,{children:`To create an instance of the client:`}),_jsx(CodeBlock,{filename:`Ruby`,icon:`code`,numberOfLines:`1`,language:`ruby`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`ruby`,children:_jsxs(_components.code,{language:`ruby`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`client`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` Algolia`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#4EC9B0`},children:`::`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`InsightsClient`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`create`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"ALGOLIA_APPLICATION_ID\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"ALGOLIA_API_KEY\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"ALGOLIA_APPLICATION_REGION\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`]})})}),_jsxs(_components.p,{children:[`Replace `,_jsx(_components.code,{children:`ALGOLIA_APPLICATION_ID_REGION`}),` with your Algolia application’s analytics region: `,_jsx(_components.code,{children:`us`}),` for the United States or `,_jsx(_components.code,{children:`de`}),` for Europe.\nYou can check your analytics region in the `,_jsx(_components.a,{href:`https://dashboard.algolia.com/account/infrastructure/analytics`,children:_jsx(_components.strong,{children:`Infrastructure > Analytics`})}),` section of the Algolia dashboard.`]})]}),_jsxs(Tab,{title:`Scala`,id:`scala`,children:[_jsxs(_components.p,{children:[`The Insights API client is part of the `,_jsx(_components.code,{children:`algoliasearch-scala`}),` package.\nYou can add this package to your `,_jsx(_components.code,{children:`build.sbt`}),` file:`]}),_jsx(CodeBlock,{filename:`build.sbt`,icon:`braces`,numberOfLines:`5`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`5`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`// For Scala 3:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`libraryDependencies += \"com.algolia\" %% \"algoliasearch-scala_3\" % \"2.27.0\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`// For Scala 2:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`libraryDependencies += \"com.algolia\" %% \"algoliasearch-scala_2\" % \"2.27.0\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),_jsx(_components.p,{children:`To use the Insights client, add these imports to your files:`}),_jsx(CodeBlock,{filename:`Scala`,icon:`code`,numberOfLines:`2`,language:`scala`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`scala`,children:_jsxs(_components.code,{language:`scala`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`import`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#D4D4D4`},children:` algoliasearch`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#D4D4D4`},children:`api`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`InsightsClient`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`import`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#D4D4D4`},children:` algoliasearch`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#D4D4D4`},children:`config`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#D4D4D4`},children:`*`})]}),`\n`]})})}),_jsx(_components.p,{children:`To create an instance of the client:`}),_jsx(CodeBlock,{filename:`Scala`,icon:`code`,numberOfLines:`5`,language:`scala`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`scala`,children:_jsxs(_components.code,{language:`scala`,numberOfLines:`5`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`val`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` client`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` InsightsClient`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` appId `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"ALGOLIA_APPLICATION_ID\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` apiKey `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"ALGOLIA_API_KEY\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` region `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` Option`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"ALGOLIA_APPLICATION_REGION\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`]})})}),_jsxs(_components.p,{children:[`Replace `,_jsx(_components.code,{children:`ALGOLIA_APPLICATION_ID_REGION`}),` with your Algolia application’s analytics region: `,_jsx(_components.code,{children:`us`}),` for the United States or `,_jsx(_components.code,{children:`de`}),` for Europe.\nYou can check your analytics region in the `,_jsx(_components.a,{href:`https://dashboard.algolia.com/account/infrastructure/analytics`,children:_jsx(_components.strong,{children:`Infrastructure > Analytics`})}),` section of the Algolia dashboard.`]})]}),_jsxs(Tab,{title:`Swift`,id:`swift`,children:[_jsxs(_components.p,{children:[`The Insights API client is part of the `,_jsx(_components.code,{children:`algoliasearch-client-swift`}),` package.\nYou can add this package to your `,_jsx(_components.code,{children:`Package.swift`}),` file:`]}),_jsx(CodeBlock,{filename:`Package.swift`,icon:`braces`,numberOfLines:`23`,language:`swift`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`swift`,children:_jsxs(_components.code,{language:`swift`,numberOfLines:`23`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// swift-tools-version: 5.10`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// The swift-tools-version declares the minimum version of Swift required to build this package.`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` PackageDescription`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`let`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` package`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` Package`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` name`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Algolia API clients\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` platforms`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` .`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`macOS`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`v11`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` dependencies`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` .`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`package`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` url`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://github.com/algolia/algoliasearch-client-swift.git\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"9.28.0\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` targets`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` .`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`executableTarget`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` name`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Algolia API clients\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` dependencies`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` .`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`product`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`name`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Insights\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`package`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"algoliasearch-client-swift\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` )`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`]})})}),_jsx(_components.p,{children:`To use the Insights client, add this import to your files:`}),_jsx(CodeBlock,{filename:`Swift`,icon:`code`,numberOfLines:`1`,language:`swift`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`swift`,children:_jsxs(_components.code,{language:`swift`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` Insights`})]}),`\n`]})})}),_jsx(_components.p,{children:`To create an instance of the client:`}),_jsx(CodeBlock,{filename:`Swift`,icon:`code`,numberOfLines:`1`,language:`swift`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`swift`,children:_jsxs(_components.code,{language:`swift`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`let`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` client `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` try`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` InsightsClient`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`appID`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"ALGOLIA_APPLICATION_ID\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`apiKey`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"ALGOLIA_API_KEY\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`region`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: .`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`us`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`]})})}),_jsxs(_components.p,{children:[`Make sure to use the region that matches your Algolia application’s analytics region:\n`,_jsx(_components.code,{children:`region.us`}),` for the United States and `,_jsx(_components.code,{children:`region.de`}),` for Europe.\nYou can check your analytics region in the `,_jsx(_components.a,{href:`https://dashboard.algolia.com/account/infrastructure/analytics`,children:_jsx(_components.strong,{children:`Infrastructure > Analytics`})}),` section of the Algolia dashboard.`]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`analytics-region`,children:`Analytics region`}),`\n`,_jsx(_components.p,{children:`The Insights API client requires specifying your Algolia application’s analytics region to properly route requests to the correct data center.`}),`\n`,_jsxs(_components.p,{children:[`Replace `,_jsx(_components.code,{children:`ALGOLIA_APPLICATION_REGION`}),` with your application’s analytics region:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`us`}),` for the United States`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`de`}),` for Europe`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`You can check your analytics region in the `,_jsx(_components.a,{href:`https://dashboard.algolia.com/account/infrastructure/analytics`,children:_jsx(_components.strong,{children:`Infrastructure > Analytics`})}),` section of the Algolia dashboard.`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"codeStyling":"system","config":{},"pageMetadata":{"title":"Insights API client","sidebarTitle":"Overview","description":"Collect events related to your search and discovery experience.","public":true,"subtype":"API","version":"Current","href":"/doc/libraries/sdk/methods/insights"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Async code","slug":"async-code","depth":2,"children":[],"tabId":"python"},{"title":"Analytics region","slug":"analytics-region","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":["/_mintlify/custom/algolia/34bdaaeaccaa769c/docsearch.js","/_mintlify/custom/algolia/e18afef8ba6306ba/one-trust.js","/_mintlify/custom/algolia/5a5e6ade8ff45aec/utm-attribution.js","/_mintlify/custom/algolia/a4b9f2f416e55759/iframe-resize.js","/_mintlify/custom/algolia/dbca34a8de6b147e/instantsearch-api-signature-links.js","/_mintlify/custom/algolia/4e6ff31277aab3f2/segment-analytics.js","/_mintlify/custom/algolia/ae5f1d742fc727f6/optinmonster.js"],"subdomain":"algolia","siteName":"Algolia","title":"Insights API client - Algolia","navMaps":{"firstHrefInVersion":{"current":{"href":"/doc/libraries/sdk/methods/insights","matchLevel":0},"legacy":{"href":"/doc/libraries/sdk/v1/install","matchLevel":3}},"firstHrefInLanguage":{}},"lastModified":"2026-03-23T18:23:15.038Z","gitLastModified":"2026-04-28T12:49:59.000Z","originalFileLocation":"doc/libraries/sdk/methods/insights.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Collect events related to your search and discovery experience.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Algolia\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/algolia/pODf0GWwkpqTo2Wx/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/algolia/pODf0GWwkpqTo2Wx/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/algolia/pODf0GWwkpqTo2Wx/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/algolia/pODf0GWwkpqTo2Wx/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/algolia/pODf0GWwkpqTo2Wx/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/algolia/pODf0GWwkpqTo2Wx/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/algolia/pODf0GWwkpqTo2Wx/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/algolia/pODf0GWwkpqTo2Wx/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/algolia/pODf0GWwkpqTo2Wx/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Insights API client - Algolia\">\u003cmeta data-mint-head property=\"og:description\" content=\"Collect events related to your search and discovery experience.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Algolia\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://www.algolia.com/doc/libraries/sdk/methods/insights\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://algolia.mintlify.site/_mintlify/api/og/v2?division=Insights+API+client\u0026amp;title=Insights+API+client\u0026amp;description=Collect+events+related+to+your+search+and+discovery+experience.\u0026amp;theme=174d56e14f330de525287b70\u0026amp;signature=737fc3faf094868078682f7def8dd6540b98c149ce3b9718366c3002ab5c7cf5\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Insights API client - Algolia\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Collect events related to your search and discovery experience.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://algolia.mintlify.site/_mintlify/api/og/v2?division=Insights+API+client\u0026amp;title=Insights+API+client\u0026amp;description=Collect+events+related+to+your+search+and+discovery+experience.\u0026amp;theme=174d56e14f330de525287b70\u0026amp;signature=737fc3faf094868078682f7def8dd6540b98c149ce3b9718366c3002ab5c7cf5\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/algolia/pODf0GWwkpqTo2Wx/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Algolia\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#3970ff\">\u003clink data-mint-head rel=\"canonical\" href=\"https://www.algolia.com/doc/libraries/sdk/methods/insights\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/doc/libraries/sdk/methods/insights.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://www.algolia.com/#organization\",\"name\":\"Algolia\",\"url\":\"https://www.algolia.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/algolia/kiecJp3hu-WXhj-3/logo/light.svg?fit=max\u0026auto=format\u0026n=kiecJp3hu-WXhj-3\u0026q=85\u0026s=bf613e260ca94c0eb23384e6c0d5c77f\"},\"sameAs\":[\"https://www.linkedin.com/company/algolia/\",\"https://github.com/algolia\",\"https://x.com/algolia\",\"https://www.youtube.com/channel/UCTNkiq-SO8hay1PRx-it9Cw\"]},{\"@type\":\"WebSite\",\"@id\":\"https://www.algolia.com#website\",\"name\":\"Algolia\",\"url\":\"https://www.algolia.com\",\"publisher\":{\"@id\":\"https://www.algolia.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://www.algolia.com/doc/libraries/sdk/methods/insights#webpage\",\"url\":\"https://www.algolia.com/doc/libraries/sdk/methods/insights\",\"name\":\"Insights API client\",\"description\":\"Collect events related to your search and discovery experience.\",\"dateModified\":\"2026-04-28T12:49:59.000Z\",\"isPartOf\":{\"@id\":\"https://www.algolia.com#website\"},\"breadcrumb\":{\"@id\":\"https://www.algolia.com/doc/libraries/sdk/methods/insights#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://www.algolia.com/doc/libraries/sdk/methods/insights#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Reference\",\"item\":\"https://www.algolia.com/doc/libraries/sdk/methods/search\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Insights API client\",\"item\":\"https://www.algolia.com/doc/libraries/sdk/methods/insights\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://www.algolia.com/doc/libraries/sdk/methods/insights#article\",\"headline\":\"Insights API client\",\"name\":\"Insights API client\",\"description\":\"Collect events related to your search and discovery experience.\",\"url\":\"https://www.algolia.com/doc/libraries/sdk/methods/insights\",\"mainEntityOfPage\":{\"@id\":\"https://www.algolia.com/doc/libraries/sdk/methods/insights#webpage\"},\"dateModified\":\"2026-04-28T12:49:59.000Z\",\"publisher\":{\"@id\":\"https://www.algolia.com/#organization\"},\"isPartOf\":{\"@id\":\"https://www.algolia.com#website\"}}]}\u003c/script>","siteName":"Algolia","nav":{"global":null,"tabs":[{"tab":"Guides","icon":"book-text","pages":[{"title":"Guides","href":"/doc/guides/get-started"}]},{"tab":"Libraries and tools","icon":"wrench","menu":[{"item":"API clients","versions":[{"version":"current","groups":[{"group":"API clients (current)","root":{"title":"API clients","href":"/doc/libraries/sdk"},"pages":[{"title":"Install the API clients","sidebarTitle":"Install","version":"Current","href":"/doc/libraries/sdk/install"},{"group":"Upgrade","pages":[{"title":"Upgrade the C# API client to version 7","sidebarTitle":"C# version 7","href":"/doc/libraries/sdk/upgrade/csharp"},{"title":"Upgrade the Go API client to version 4","sidebarTitle":"Go version 4","href":"/doc/libraries/sdk/upgrade/go"},{"title":"Upgrade the Java API client to version 4","sidebarTitle":"Java version 4","href":"/doc/libraries/sdk/upgrade/java"},{"title":"Upgrade the JavaScript API client to version 5","sidebarTitle":"JavaScript version 5","href":"/doc/libraries/sdk/upgrade/javascript"},{"title":"Upgrade the Kotlin API client to version 3","sidebarTitle":"Kotlin version 3","href":"/doc/libraries/sdk/upgrade/kotlin"},{"title":"Upgrade the PHP API client to version 4","sidebarTitle":"PHP version 4","href":"/doc/libraries/sdk/upgrade/php"},{"title":"Upgrade the Python API client to version 4","sidebarTitle":"Python version 4","href":"/doc/libraries/sdk/upgrade/python"},{"title":"Upgrade the Ruby API client to version 3","sidebarTitle":"Ruby version 3","href":"/doc/libraries/sdk/upgrade/ruby"},{"title":"Upgrade the Scala API client to version 2","sidebarTitle":"Scala version 2","href":"/doc/libraries/sdk/upgrade/scala"},{"title":"Upgrade the Swift API client to version 9","sidebarTitle":"Swift version 9","href":"/doc/libraries/sdk/upgrade/swift"}]},{"group":"Changelog","pages":[{"title":"C# API client changelog","sidebarTitle":"C#","href":"/doc/libraries/sdk/changelog/csharp"},{"title":"Go API client changelog","sidebarTitle":"Go","href":"/doc/libraries/sdk/changelog/go"},{"title":"Java API client changelog","sidebarTitle":"Java","href":"/doc/libraries/sdk/changelog/java"},{"title":"JavaScript API client changelog","sidebarTitle":"JavaScript","href":"/doc/libraries/sdk/changelog/javascript"},{"title":"Kotlin API client changelog","sidebarTitle":"Kotlin","href":"/doc/libraries/sdk/changelog/kotlin"},{"title":"PHP API client changelog","sidebarTitle":"PHP","href":"/doc/libraries/sdk/changelog/php"},{"title":"Python API client changelog","sidebarTitle":"Python","href":"/doc/libraries/sdk/changelog/python"},{"title":"Ruby API client changelog","sidebarTitle":"Ruby","href":"/doc/libraries/sdk/changelog/ruby"},{"title":"Scala API client changelog","sidebarTitle":"Scala","href":"/doc/libraries/sdk/changelog/scala"},{"title":"Swift API client changelog","sidebarTitle":"Swift","href":"/doc/libraries/sdk/changelog/swift"}]},{"title":"Customize requests with request options","sidebarTitle":"Request options","href":"/doc/libraries/sdk/request-options"},{"title":"Customize the API clients","sidebarTitle":"Customize","href":"/doc/libraries/sdk/customize"},{"title":"Caching (JavaScript)","version":"Current","href":"/doc/libraries/sdk/caching"},{"title":"Performance in ASP.NET apps","sidebarTitle":"Performance (C#)","href":"/doc/libraries/sdk/performance"},{"title":"Algolia API client versions","sidebarTitle":"Library versions","href":"/doc/libraries/sdk/versions"}]},{"group":"Reference","pages":[{"group":"Search API client","pages":[{"title":"Search API client","sidebarTitle":"Overview","version":"Current","href":"/doc/libraries/sdk/methods/search"},{"title":"Helper methods in the Search API clients","sidebarTitle":"Helper methods","href":"/doc/libraries/sdk/helpers"},{"group":"Search","pages":[{"title":"Search an index","href":"/doc/libraries/sdk/methods/search/search-single-index"},{"title":"Search multiple queries","href":"/doc/libraries/sdk/methods/search/search"},{"title":"Search for facet values","href":"/doc/libraries/sdk/methods/search/search-for-facet-values"},{"title":"Browse for records","href":"/doc/libraries/sdk/methods/search/browse"},{"title":"Browse all records","href":"/doc/libraries/sdk/methods/search/browse-objects"}]},{"group":"Records","pages":[{"title":"Retrieve a record","href":"/doc/libraries/sdk/methods/search/get-object"},{"title":"Retrieve records","href":"/doc/libraries/sdk/methods/search/get-objects"},{"title":"Add a new record (with auto-generated object ID)","href":"/doc/libraries/sdk/methods/search/save-object"},{"title":"Save records","href":"/doc/libraries/sdk/methods/search/save-objects"},{"title":"Save records with transformation","href":"/doc/libraries/sdk/methods/search/save-objects-with-transformation"},{"title":"Add or replace a record","href":"/doc/libraries/sdk/methods/search/add-or-update-object"},{"title":"Add or update attributes","href":"/doc/libraries/sdk/methods/search/partial-update-object"},{"title":"Add or update attributes of multiple records","href":"/doc/libraries/sdk/methods/search/partial-update-objects"},{"title":"Add or update attributes of multiple records with transformation","href":"/doc/libraries/sdk/methods/search/partial-update-objects-with-transformation"},{"title":"Replace all records","href":"/doc/libraries/sdk/methods/search/replace-all-objects"},{"title":"Replace all records with transformation","href":"/doc/libraries/sdk/methods/search/replace-all-objects-with-transformation"},{"title":"Batch indexing operations on one index","href":"/doc/libraries/sdk/methods/search/batch"},{"title":"Batch indexing operations on multiple indices","href":"/doc/libraries/sdk/methods/search/multiple-batch"},{"title":"Delete a record","href":"/doc/libraries/sdk/methods/search/delete-object"},{"title":"Delete records","href":"/doc/libraries/sdk/methods/search/delete-objects"},{"title":"Delete records matching a filter","href":"/doc/libraries/sdk/methods/search/delete-by"},{"title":"Delete all records from an index","href":"/doc/libraries/sdk/methods/search/clear-objects"}]},{"group":"Indices","pages":[{"title":"List indices","href":"/doc/libraries/sdk/methods/search/list-indices"},{"title":"Check if index exists","href":"/doc/libraries/sdk/methods/search/index-exists"},{"title":"Retrieve index settings","href":"/doc/libraries/sdk/methods/search/get-settings"},{"title":"Update index settings","href":"/doc/libraries/sdk/methods/search/set-settings"},{"title":"Check task status","href":"/doc/libraries/sdk/methods/search/get-task"},{"title":"Wait for task","href":"/doc/libraries/sdk/methods/search/wait-for-task"},{"title":"Copy or move an index","href":"/doc/libraries/sdk/methods/search/operation-index"},{"title":"Copy index between applications","href":"/doc/libraries/sdk/methods/search/copy-index-between-applications"},{"title":"Delete an index","href":"/doc/libraries/sdk/methods/search/delete-index"}]},{"group":"API keys","pages":[{"title":"List API keys","href":"/doc/libraries/sdk/methods/search/list-api-keys"},{"title":"Retrieve API key permissions","href":"/doc/libraries/sdk/methods/search/get-api-key"},{"title":"Create an API key","href":"/doc/libraries/sdk/methods/search/add-api-key"},{"title":"Generate secured API key","href":"/doc/libraries/sdk/methods/search/generate-secured-api-key"},{"title":"Retrieve remaining validity for secured API key","sidebarTitle":"Get API key's remaining validity","href":"/doc/libraries/sdk/methods/search/get-remaining-validity"},{"title":"Update an API key","href":"/doc/libraries/sdk/methods/search/update-api-key"},{"title":"Delete an API key","href":"/doc/libraries/sdk/methods/search/delete-api-key"},{"title":"Restore an API key","href":"/doc/libraries/sdk/methods/search/restore-api-key"},{"title":"Wait for API key operation","href":"/doc/libraries/sdk/methods/search/wait-for-api-key"}]},{"group":"Synonyms","pages":[{"title":"Retrieve a synonym","href":"/doc/libraries/sdk/methods/search/get-synonym"},{"title":"Search for synonyms","href":"/doc/libraries/sdk/methods/search/search-synonyms"},{"title":"Browse all synonyms","href":"/doc/libraries/sdk/methods/search/browse-synonyms"},{"title":"Create or replace a synonym","href":"/doc/libraries/sdk/methods/search/save-synonym"},{"title":"Create or replace synonyms","href":"/doc/libraries/sdk/methods/search/save-synonyms"},{"title":"Delete a synonym","href":"/doc/libraries/sdk/methods/search/delete-synonym"},{"title":"Delete all synonyms","href":"/doc/libraries/sdk/methods/search/clear-synonyms"}]},{"group":"Rules","pages":[{"title":"Retrieve a rule","href":"/doc/libraries/sdk/methods/search/get-rule"},{"title":"Search for rules","href":"/doc/libraries/sdk/methods/search/search-rules"},{"title":"Browse all rules","href":"/doc/libraries/sdk/methods/search/browse-rules"},{"title":"Create or replace a rule","href":"/doc/libraries/sdk/methods/search/save-rule"},{"title":"Create or update rules","href":"/doc/libraries/sdk/methods/search/save-rules"},{"title":"Delete a rule","href":"/doc/libraries/sdk/methods/search/delete-rule"},{"title":"Delete all rules","href":"/doc/libraries/sdk/methods/search/clear-rules"}]},{"group":"Dictionaries","pages":[{"title":"Add or delete dictionary entries","href":"/doc/libraries/sdk/methods/search/batch-dictionary-entries"},{"title":"Search dictionary entries","href":"/doc/libraries/sdk/methods/search/search-dictionary-entries"},{"title":"Retrieve dictionary settings","href":"/doc/libraries/sdk/methods/search/get-dictionary-settings"},{"title":"Update dictionary settings","href":"/doc/libraries/sdk/methods/search/set-dictionary-settings"},{"title":"List available languages","href":"/doc/libraries/sdk/methods/search/get-dictionary-languages"}]},{"group":"Vault","pages":[{"title":"List allowed sources","href":"/doc/libraries/sdk/methods/search/get-sources"},{"title":"Replace allowed sources","href":"/doc/libraries/sdk/methods/search/replace-sources"},{"title":"Add a source","href":"/doc/libraries/sdk/methods/search/append-source"},{"title":"Delete a source","href":"/doc/libraries/sdk/methods/search/delete-source"}]},{"group":"Advanced","pages":[{"title":"Retrieve log entries","href":"/doc/libraries/sdk/methods/search/get-logs"},{"title":"Check application task status","href":"/doc/libraries/sdk/methods/search/get-app-task"},{"title":"Wait for application task","href":"/doc/libraries/sdk/methods/search/wait-for-app-task"}]},{"group":" ","hidden":true,"searchable":true,"pages":[{"title":"Assign or move a user ID","href":"/doc/libraries/sdk/methods/search/assign-user-id"},{"title":"Assign multiple userIDs","href":"/doc/libraries/sdk/methods/search/batch-assign-user-ids"},{"title":"Get top user IDs","href":"/doc/libraries/sdk/methods/search/get-top-user-ids"},{"title":"Retrieve user ID","href":"/doc/libraries/sdk/methods/search/get-user-id"},{"title":"Get migration and user mapping status","href":"/doc/libraries/sdk/methods/search/has-pending-mappings"},{"title":"List clusters","href":"/doc/libraries/sdk/methods/search/list-clusters"},{"title":"List user IDs","href":"/doc/libraries/sdk/methods/search/list-user-ids"},{"title":"Delete user ID","href":"/doc/libraries/sdk/methods/search/remove-user-id"},{"title":"Search for user IDs","href":"/doc/libraries/sdk/methods/search/search-user-ids"}]}]},{"group":"Recommend API client","pages":[{"title":"Recommend API client","sidebarTitle":"Overview","href":"/doc/libraries/sdk/methods/recommend"},{"group":"Recommendations","pages":[{"title":"Retrieve recommendations","href":"/doc/libraries/sdk/methods/recommend/get-recommendations"}]},{"group":"Recommend rules","pages":[{"title":"Retrieve a rule","href":"/doc/libraries/sdk/methods/recommend/get-recommend-rule"},{"title":"Check task status","href":"/doc/libraries/sdk/methods/recommend/get-recommend-status"},{"title":"Search for rules","href":"/doc/libraries/sdk/methods/recommend/search-recommend-rules"},{"title":"Create or update a batch of Recommend Rules","href":"/doc/libraries/sdk/methods/recommend/batch-recommend-rules"},{"title":"Delete a rule","href":"/doc/libraries/sdk/methods/recommend/delete-recommend-rule"}]}]},{"group":"Composition API client","pages":[{"title":"Composition API client","sidebarTitle":"Overview","href":"/doc/libraries/sdk/methods/composition"},{"group":"Search","pages":[{"title":"Run a Composition","href":"/doc/libraries/sdk/methods/composition/search"},{"title":"Search for facet values","href":"/doc/libraries/sdk/methods/composition/search-for-facet-values"}]},{"group":"Composition","pages":[{"title":"List compositions","href":"/doc/libraries/sdk/methods/composition/list-compositions"},{"title":"Retrieve a composition","href":"/doc/libraries/sdk/methods/composition/get-composition"},{"title":"Update and insert (upsert) a composition","href":"/doc/libraries/sdk/methods/composition/put-composition"},{"title":"Delete a composition","href":"/doc/libraries/sdk/methods/composition/delete-composition"},{"title":"Set or update the \"sortingStrategy\" configuration for an existing composition","href":"/doc/libraries/sdk/methods/composition/update-sorting-strategy-composition"},{"title":"Batch action to multiple compositions","href":"/doc/libraries/sdk/methods/composition/multiple-batch"}]},{"group":"Composition Rules","pages":[{"title":"Retrieve a rule","href":"/doc/libraries/sdk/methods/composition/get-rule"},{"title":"Add or update a composition rule","href":"/doc/libraries/sdk/methods/composition/put-composition-rule"},{"title":"Delete a Composition Rule","href":"/doc/libraries/sdk/methods/composition/delete-composition-rule"},{"title":"Create or update or delete composition rules","href":"/doc/libraries/sdk/methods/composition/save-rules"},{"title":"Search for composition rules","href":"/doc/libraries/sdk/methods/composition/search-composition-rules"}]},{"group":"Advanced","pages":[{"title":"Check task status","description":"Checks the status of a given task.","href":"/doc/libraries/sdk/methods/composition/get-task"}]}]},{"group":"Insights API client","pages":[{"title":"Insights API client","sidebarTitle":"Overview","version":"Current","href":"/doc/libraries/sdk/methods/insights"},{"title":"Send events","description":"Sends a list of events to the Insights API.","href":"/doc/libraries/sdk/methods/insights/push-events"},{"title":"Delete user token events","href":"/doc/libraries/sdk/methods/insights/delete-user-token"}]},{"group":"Search Insights JS","pages":[{"title":"Search Insights JavaScript library","sidebarTitle":"Overview","href":"/doc/libraries/search-insights"},{"title":"Init","href":"/doc/libraries/search-insights/init"},{"title":"Send events","href":"/doc/libraries/search-insights/send-events"},{"title":"Add user agent","href":"/doc/libraries/search-insights/add-user-agent"},{"title":"Get authenticated user token","href":"/doc/libraries/search-insights/get-authenticated-user-token"},{"title":"Get user token","href":"/doc/libraries/search-insights/get-user-token"},{"title":"Set anonymous user token","href":"/doc/libraries/search-insights/set-anonymous-user-token"},{"title":"Set authenticated user token","href":"/doc/libraries/search-insights/set-authenticated-user-token"},{"title":"Set user token","href":"/doc/libraries/search-insights/set-user-token"},{"title":"Clicked object IDs after search","href":"/doc/libraries/search-insights/clicked-object-ids-after-search"},{"title":"Added to cart object IDs after search","href":"/doc/libraries/search-insights/added-to-cart-object-ids-after-search"},{"title":"Purchased object IDs after search","href":"/doc/libraries/search-insights/purchased-object-ids-after-search"},{"title":"Converted object IDs after search","href":"/doc/libraries/search-insights/converted-object-ids-after-search"},{"title":"Clicked object IDs","href":"/doc/libraries/search-insights/clicked-object-ids"},{"title":"Added to cart object IDs","href":"/doc/libraries/search-insights/added-to-cart-object-ids"},{"title":"Purchased object IDs","href":"/doc/libraries/search-insights/purchased-object-ids"},{"title":"Converted object IDs","href":"/doc/libraries/search-insights/converted-object-ids"},{"title":"Viewed object IDs","href":"/doc/libraries/search-insights/viewed-object-ids"},{"title":"Clicked filters","href":"/doc/libraries/search-insights/clicked-filters"},{"title":"Converted filters","href":"/doc/libraries/search-insights/converted-filters"},{"title":"Viewed filters","href":"/doc/libraries/search-insights/viewed-filters"}]},{"group":"Analytics API client","pages":[{"title":"Analytics API client","sidebarTitle":"Overview","href":"/doc/libraries/sdk/methods/analytics"},{"group":"Searches","pages":[{"title":"Retrieve top searches","href":"/doc/libraries/sdk/methods/analytics/get-top-searches"},{"title":"Retrieve number of searches","href":"/doc/libraries/sdk/methods/analytics/get-searches-count"},{"title":"Retrieve the most frequent searches without results","href":"/doc/libraries/sdk/methods/analytics/get-searches-no-results"},{"title":"Retrieve no results rate","href":"/doc/libraries/sdk/methods/analytics/get-no-results-rate"},{"title":"Retrieve top search results","href":"/doc/libraries/sdk/methods/analytics/get-top-hits"}]},{"group":"Clicks","pages":[{"title":"Retrieve top searches without clicks","href":"/doc/libraries/sdk/methods/analytics/get-searches-no-clicks"},{"title":"Retrieve no click rate","href":"/doc/libraries/sdk/methods/analytics/get-no-click-rate"},{"title":"Retrieve average click position","href":"/doc/libraries/sdk/methods/analytics/get-average-click-position"},{"title":"Retrieve click positions","href":"/doc/libraries/sdk/methods/analytics/get-click-positions"},{"title":"Retrieve click-through rate","href":"/doc/libraries/sdk/methods/analytics/get-click-through-rate"},{"title":"Retrieve conversion rate","href":"/doc/libraries/sdk/methods/analytics/get-conversion-rate"},{"title":"Retrieve add-to-cart rate","href":"/doc/libraries/sdk/methods/analytics/get-add-to-cart-rate"},{"title":"Retrieve purchase rate","href":"/doc/libraries/sdk/methods/analytics/get-purchase-rate"}]},{"group":"Users","pages":[{"title":"Retrieve number of users","href":"/doc/libraries/sdk/methods/analytics/get-users-count"},{"title":"Retrieve top countries","href":"/doc/libraries/sdk/methods/analytics/get-top-countries"}]},{"group":"Filters","pages":[{"title":"Retrieve top filters","href":"/doc/libraries/sdk/methods/analytics/get-top-filter-attributes"},{"title":"Retrieve top filter values","href":"/doc/libraries/sdk/methods/analytics/get-top-filter-for-attribute"},{"title":"Retrieve top filters for a search without results","href":"/doc/libraries/sdk/methods/analytics/get-top-filters-no-results"}]},{"group":"Revenue","pages":[{"title":"Retrieve revenue data","href":"/doc/libraries/sdk/methods/analytics/get-revenue"}]},{"group":"Patterns","tag":"beta","pages":[{"title":"Retrieve the field catalog","href":"/doc/libraries/sdk/methods/analytics/get-patterns-fields"},{"title":"Query a metrics time series","href":"/doc/libraries/sdk/methods/analytics/query-patterns-timeseries"},{"title":"Query single-row aggregates","href":"/doc/libraries/sdk/methods/analytics/query-patterns-scalar"},{"title":"Query a grouped table","href":"/doc/libraries/sdk/methods/analytics/query-patterns-table"},{"title":"Query a numeric distribution","href":"/doc/libraries/sdk/methods/analytics/query-patterns-distribution"}]},{"group":"Status","pages":[{"title":"Retrieve update status","href":"/doc/libraries/sdk/methods/analytics/get-status"}]}]},{"group":"A/B testing API client","pages":[{"group":"v3","pages":[{"title":"A/B testing API client (v3)","sidebarTitle":"Overview","href":"/doc/libraries/sdk/methods/abtesting-v3"},{"title":"List all A/B tests","href":"/doc/libraries/sdk/methods/abtesting-v3/list-ab-tests"},{"title":"Create an A/B test","href":"/doc/libraries/sdk/methods/abtesting-v3/add-ab-tests"},{"title":"Retrieve A/B test details","href":"/doc/libraries/sdk/methods/abtesting-v3/get-ab-test"},{"title":"Delete an A/B test","href":"/doc/libraries/sdk/methods/abtesting-v3/delete-ab-test"},{"title":"Stop an A/B test","href":"/doc/libraries/sdk/methods/abtesting-v3/stop-ab-test"},{"title":"Estimate the sample size and duration of an A/B test","href":"/doc/libraries/sdk/methods/abtesting-v3/estimate-ab-test"},{"title":"Retrieve timeseries of an A/B test","href":"/doc/libraries/sdk/methods/abtesting-v3/get-timeseries"},{"title":"Retrieve captured A/B test settings","href":"/doc/libraries/sdk/methods/abtesting-v3/get-ab-test-settings"},{"title":"Capture a variant's settings and stop the A/B test","href":"/doc/libraries/sdk/methods/abtesting-v3/save-variant-settings"},{"title":"Apply a variant's captured settings to the control index","href":"/doc/libraries/sdk/methods/abtesting-v3/apply-variant-settings"}]},{"group":"v2","pages":[{"title":"A/B testing API client (v2)","sidebarTitle":"Overview","href":"/doc/libraries/sdk/methods/abtesting"},{"title":"List all A/B tests","href":"/doc/libraries/sdk/methods/abtesting/list-ab-tests"},{"title":"Create an A/B test","href":"/doc/libraries/sdk/methods/abtesting/add-ab-tests"},{"title":"Retrieve A/B test details","href":"/doc/libraries/sdk/methods/abtesting/get-ab-test"},{"title":"Delete an A/B test","href":"/doc/libraries/sdk/methods/abtesting/delete-ab-test"},{"title":"Stop an A/B test","href":"/doc/libraries/sdk/methods/abtesting/stop-ab-test"},{"title":"Estimate the sample size and duration of an A/B test","href":"/doc/libraries/sdk/methods/abtesting/estimate-ab-test"}]}]},{"group":"Ingestion API client","pages":[{"title":"Ingestion API client","sidebarTitle":"Overview","href":"/doc/libraries/sdk/methods/ingestion"},{"group":"Authentications","pages":[{"title":"List authentication resources","href":"/doc/libraries/sdk/methods/ingestion/list-authentications"},{"title":"Create an authentication resource","href":"/doc/libraries/sdk/methods/ingestion/create-authentication"},{"title":"Search for authentication resources","href":"/doc/libraries/sdk/methods/ingestion/search-authentications"},{"title":"Retrieve an authentication resource","href":"/doc/libraries/sdk/methods/ingestion/get-authentication"},{"title":"Update an authentication resource","href":"/doc/libraries/sdk/methods/ingestion/update-authentication"},{"title":"Delete an authentication resource","href":"/doc/libraries/sdk/methods/ingestion/delete-authentication"}]},{"group":"Sources","pages":[{"title":"List sources","href":"/doc/libraries/sdk/methods/ingestion/list-sources"},{"title":"Create a source","href":"/doc/libraries/sdk/methods/ingestion/create-source"},{"title":"Validate a source payload","href":"/doc/libraries/sdk/methods/ingestion/validate-source"},{"title":"Search for sources","href":"/doc/libraries/sdk/methods/ingestion/search-sources"},{"title":"Retrieve a source","href":"/doc/libraries/sdk/methods/ingestion/get-source"},{"title":"Update a source","href":"/doc/libraries/sdk/methods/ingestion/update-source"},{"title":"Delete a source","href":"/doc/libraries/sdk/methods/ingestion/delete-source"},{"title":"Validate an update of a source payload","href":"/doc/libraries/sdk/methods/ingestion/validate-source-before-update"},{"title":"Trigger a stream-listing request","href":"/doc/libraries/sdk/methods/ingestion/trigger-docker-source-discover"},{"title":"Run all tasks linked to a source","href":"/doc/libraries/sdk/methods/ingestion/run-source"}]},{"group":"Transformations","pages":[{"title":"List transformations","href":"/doc/libraries/sdk/methods/ingestion/list-transformations"},{"title":"Retrieve a transformation","href":"/doc/libraries/sdk/methods/ingestion/get-transformation"},{"title":"Search for transformations","href":"/doc/libraries/sdk/methods/ingestion/search-transformations"},{"title":"Try a transformation before creating it","href":"/doc/libraries/sdk/methods/ingestion/try-transformation"},{"title":"Create a transformation","href":"/doc/libraries/sdk/methods/ingestion/create-transformation"},{"title":"Try a transformation before updating it","href":"/doc/libraries/sdk/methods/ingestion/try-transformation-before-update"},{"title":"Update a transformation","href":"/doc/libraries/sdk/methods/ingestion/update-transformation"},{"title":"Delete a transformation","href":"/doc/libraries/sdk/methods/ingestion/delete-transformation"}]},{"group":"Destinations","pages":[{"title":"List destinations","href":"/doc/libraries/sdk/methods/ingestion/list-destinations"},{"title":"Create a destination","href":"/doc/libraries/sdk/methods/ingestion/create-destination"},{"title":"Search for destinations","href":"/doc/libraries/sdk/methods/ingestion/search-destinations"},{"title":"Retrieve a destination","href":"/doc/libraries/sdk/methods/ingestion/get-destination"},{"title":"Update a destination","href":"/doc/libraries/sdk/methods/ingestion/update-destination"},{"title":"Delete a destination","href":"/doc/libraries/sdk/methods/ingestion/delete-destination"}]},{"group":"Tasks","pages":[{"title":"Push records in batches","href":"/doc/libraries/sdk/methods/ingestion/chunked-push"},{"title":"Push records by indexName","href":"/doc/libraries/sdk/methods/ingestion/push"},{"title":"List tasks","href":"/doc/libraries/sdk/methods/ingestion/list-tasks"},{"title":"Create a task","href":"/doc/libraries/sdk/methods/ingestion/create-task"},{"title":"Search for tasks","href":"/doc/libraries/sdk/methods/ingestion/search-tasks"},{"title":"Retrieve a task","href":"/doc/libraries/sdk/methods/ingestion/get-task"},{"title":"Fully update a task","href":"/doc/libraries/sdk/methods/ingestion/replace-task"},{"title":"Partially update a task","href":"/doc/libraries/sdk/methods/ingestion/update-task"},{"title":"Delete a task","href":"/doc/libraries/sdk/methods/ingestion/delete-task"},{"title":"Run a task","href":"/doc/libraries/sdk/methods/ingestion/run-task"},{"title":"Push records by task ID","href":"/doc/libraries/sdk/methods/ingestion/push-task"},{"title":"Enable a task","href":"/doc/libraries/sdk/methods/ingestion/enable-task"},{"title":"Disable a task","href":"/doc/libraries/sdk/methods/ingestion/disable-task"}]},{"group":"Observability","pages":[{"title":"List task runs","href":"/doc/libraries/sdk/methods/ingestion/list-runs"},{"title":"Retrieve a task run","href":"/doc/libraries/sdk/methods/ingestion/get-run"},{"title":"List task run events","href":"/doc/libraries/sdk/methods/ingestion/list-events"},{"title":"Retrieve a task run event","href":"/doc/libraries/sdk/methods/ingestion/get-event"}]},{"group":"Tasks v1 (deprecated)","pages":[{"title":"List tasks V1","href":"/doc/libraries/sdk/methods/ingestion/list-tasks-v1"},{"title":"Create a task V1","href":"/doc/libraries/sdk/methods/ingestion/create-task-v1"},{"title":"Search for tasks V1","href":"/doc/libraries/sdk/methods/ingestion/search-tasks-v1"},{"title":"Retrieve a task V1","href":"/doc/libraries/sdk/methods/ingestion/get-task-v1"},{"title":"Update a task V1","href":"/doc/libraries/sdk/methods/ingestion/update-task-v1"},{"title":"Delete a task","href":"/doc/libraries/sdk/methods/ingestion/delete-task-v1"},{"title":"Run a task V1","href":"/doc/libraries/sdk/methods/ingestion/run-task-v1"},{"title":"Enable a task V1","href":"/doc/libraries/sdk/methods/ingestion/enable-task-v1"},{"title":"Disable a task V1","href":"/doc/libraries/sdk/methods/ingestion/disable-task-v1"}]}]},{"group":"Monitoring API client","pages":[{"title":"Monitoring API client","sidebarTitle":"Overview","href":"/doc/libraries/sdk/methods/monitoring"},{"group":"Status","pages":[{"title":"Retrieve status of all clusters","href":"/doc/libraries/sdk/methods/monitoring/get-status"},{"title":"Retrieve cluster status","href":"/doc/libraries/sdk/methods/monitoring/get-cluster-status"}]},{"group":"Incidents","pages":[{"title":"Retrieve all incidents","href":"/doc/libraries/sdk/methods/monitoring/get-incidents"},{"title":"Retrieve cluster incidents","href":"/doc/libraries/sdk/methods/monitoring/get-cluster-incidents"}]},{"group":"Monitoring","pages":[{"title":"Retrieve servers","href":"/doc/libraries/sdk/methods/monitoring/get-servers"},{"title":"Retrieve search latency times","href":"/doc/libraries/sdk/methods/monitoring/get-latency"},{"title":"Retrieve indexing monitoring latency","href":"/doc/libraries/sdk/methods/monitoring/get-indexing-time"},{"title":"Test the reachability of clusters","href":"/doc/libraries/sdk/methods/monitoring/get-reachability"}]},{"group":"Infrastructure","pages":[{"title":"Retrieve metrics","href":"/doc/libraries/sdk/methods/monitoring/get-metrics"}]}]},{"group":"Classic Personalization API client","pages":[{"title":"Personalization API client","sidebarTitle":"Overview","href":"/doc/libraries/sdk/methods/personalization"},{"group":"Profiles","pages":[{"title":"Retrieve a user profile","href":"/doc/libraries/sdk/methods/personalization/get-user-token-profile"},{"title":"Delete a user profile","href":"/doc/libraries/sdk/methods/personalization/delete-user-profile"}]},{"group":"Strategies","pages":[{"title":"Retrieve the personalization strategy","href":"/doc/libraries/sdk/methods/personalization/get-personalization-strategy"},{"title":"Define the personalization strategy","href":"/doc/libraries/sdk/methods/personalization/set-personalization-strategy"}]}]},{"group":"Query Suggestions API client","pages":[{"title":"Query Suggestions API client","sidebarTitle":"Overview","href":"/doc/libraries/sdk/methods/query-suggestions"},{"title":"List configurations","href":"/doc/libraries/sdk/methods/query-suggestions/get-all-configs"},{"title":"Create a configuration","href":"/doc/libraries/sdk/methods/query-suggestions/create-config"},{"title":"Retrieve a configuration","href":"/doc/libraries/sdk/methods/query-suggestions/get-config"},{"title":"Update a configuration","href":"/doc/libraries/sdk/methods/query-suggestions/update-config"},{"title":"Delete a configuration","href":"/doc/libraries/sdk/methods/query-suggestions/delete-config"},{"title":"Retrieve configuration status","href":"/doc/libraries/sdk/methods/query-suggestions/get-config-status"},{"title":"Retrieve logs","href":"/doc/libraries/sdk/methods/query-suggestions/get-log-file"}]},{"group":"Agent Studio API client","pages":[{"title":"Agent Studio API client","sidebarTitle":"Overview","href":"/doc/libraries/sdk/methods/agent-studio"},{"title":"Helper methods in the Agent Studio API client","sidebarTitle":"Helper methods","href":"/doc/libraries/sdk/methods/agent-studio/helpers"},{"title":"Streaming agent completions","sidebarTitle":"Streaming","href":"/doc/libraries/sdk/methods/agent-studio/streaming"},{"group":"Agents","pages":[{"title":"List Agents","href":"/doc/libraries/sdk/methods/agent-studio/list-agents"},{"title":"Create Agent","href":"/doc/libraries/sdk/methods/agent-studio/create-agent"},{"title":"Get Agent","href":"/doc/libraries/sdk/methods/agent-studio/get-agent"},{"title":"Update Agent","href":"/doc/libraries/sdk/methods/agent-studio/update-agent"},{"title":"Delete Agent","href":"/doc/libraries/sdk/methods/agent-studio/delete-agent"},{"title":"Publish Agent","href":"/doc/libraries/sdk/methods/agent-studio/publish-agent"},{"title":"Unpublish Agent","href":"/doc/libraries/sdk/methods/agent-studio/unpublish-agent"}]},{"group":"Completions","pages":[{"title":"Create Completion","href":"/doc/libraries/sdk/methods/agent-studio/create-agent-completion"}]},{"group":"Tasks","pages":[{"title":"Run Task","href":"/doc/libraries/sdk/methods/agent-studio/create-agent-task"}]},{"group":"Conversations","pages":[{"title":"List Conversations","href":"/doc/libraries/sdk/methods/agent-studio/list-agent-conversations"},{"title":"Get Conversation","href":"/doc/libraries/sdk/methods/agent-studio/get-conversation"},{"title":"Export Conversations","href":"/doc/libraries/sdk/methods/agent-studio/export-conversations"},{"title":"Delete Conversations","href":"/doc/libraries/sdk/methods/agent-studio/delete-agent-conversations"},{"title":"Delete Conversation","href":"/doc/libraries/sdk/methods/agent-studio/delete-conversation"}]},{"group":"Feedback","pages":[{"title":"Create Feedback","href":"/doc/libraries/sdk/methods/agent-studio/create-feedback"},{"title":"Update Feedback","href":"/doc/libraries/sdk/methods/agent-studio/update-feedback"}]},{"group":"Context","pages":[{"title":"Compact Context","href":"/doc/libraries/sdk/methods/agent-studio/compact-context"},{"title":"Trim Context","href":"/doc/libraries/sdk/methods/agent-studio/trim-context"}]},{"group":"Providers","pages":[{"title":"List Providers","href":"/doc/libraries/sdk/methods/agent-studio/list-providers"},{"title":"Create Provider","href":"/doc/libraries/sdk/methods/agent-studio/create-provider"},{"title":"Get Provider","href":"/doc/libraries/sdk/methods/agent-studio/get-provider"},{"title":"Update Provider","href":"/doc/libraries/sdk/methods/agent-studio/update-provider"},{"title":"Delete Provider","href":"/doc/libraries/sdk/methods/agent-studio/delete-provider"},{"title":"Get Provider Models","href":"/doc/libraries/sdk/methods/agent-studio/list-models"},{"title":"Get Provider Models By Id","href":"/doc/libraries/sdk/methods/agent-studio/list-provider-models"}]},{"group":"Allowed domains","pages":[{"title":"List Allowed Domains","href":"/doc/libraries/sdk/methods/agent-studio/list-agent-allowed-domains"},{"title":"Create Allowed Domain","href":"/doc/libraries/sdk/methods/agent-studio/create-agent-allowed-domain"},{"title":"Get Allowed Domain","href":"/doc/libraries/sdk/methods/agent-studio/get-allowed-domain"},{"title":"Delete Allowed Domain","href":"/doc/libraries/sdk/methods/agent-studio/delete-allowed-domain"},{"title":"Bulk Insert Allowed Domains","href":"/doc/libraries/sdk/methods/agent-studio/bulk-create-allowed-domains"},{"title":"Bulk Delete Allowed Domains","href":"/doc/libraries/sdk/methods/agent-studio/bulk-delete-allowed-domains"}]},{"group":"Secret keys","pages":[{"title":"List Secret Keys","href":"/doc/libraries/sdk/methods/agent-studio/list-secret-keys"},{"title":"Create Secret Key","href":"/doc/libraries/sdk/methods/agent-studio/create-secret-key"},{"title":"Get Secret Key","href":"/doc/libraries/sdk/methods/agent-studio/get-secret-key"},{"title":"Patch Secret Key","href":"/doc/libraries/sdk/methods/agent-studio/update-secret-key"},{"title":"Delete Secret Key","href":"/doc/libraries/sdk/methods/agent-studio/delete-secret-key"}]},{"group":"Configuration","pages":[{"title":"Get Configuration","href":"/doc/libraries/sdk/methods/agent-studio/get-configuration"},{"title":"Patch Configuration","href":"/doc/libraries/sdk/methods/agent-studio/update-configuration"}]},{"group":"User data","pages":[{"title":"Get Data By User Token","href":"/doc/libraries/sdk/methods/agent-studio/get-user-data"},{"title":"Delete Data By User Token","href":"/doc/libraries/sdk/methods/agent-studio/delete-user-data"},{"title":"Forge secured user token","href":"/doc/libraries/sdk/methods/agent-studio/forge-secured-user-token"}]},{"group":"Cache","pages":[{"title":"Invalidate Agent Cache","href":"/doc/libraries/sdk/methods/agent-studio/invalidate-agent-cache"}]}]}]}]},{"version":"legacy","pages":[{"title":"legacy","href":"/doc/libraries/sdk/v1/install"}]}]},{"item":"Algolia CLI","pages":[{"title":"Algolia CLI","href":"/doc/tools/cli/get-started"}]},{"item":"Algolia Wizard","pages":[{"title":"Algolia Wizard","href":"/doc/tools/algolia-wizard"}]},{"item":"Crawler","pages":[{"title":"Crawler","href":"/doc/tools/crawler/getting-started/overview"}]},{"item":"Django","pages":[{"title":"Django","href":"/doc/framework-integration/django/setup"}]},{"item":"Laravel","pages":[{"title":"Laravel","href":"/doc/framework-integration/laravel/getting-started/introduction-to-scout-extended"}]},{"item":"Ruby on Rails","pages":[{"title":"Ruby on Rails","href":"/doc/framework-integration/rails/getting-started/setup"}]},{"item":"Symfony","pages":[{"title":"Symfony","href":"/doc/framework-integration/symfony/getting-started/algolia-searchbundle"}]},{"item":"All libraries and tools","pages":[{"title":"All libraries and tools","href":"/doc/libraries"}]}]},{"tab":"UI libraries","icon":"proportions","menu":[{"item":"InstantSearch.js","pages":[{"title":"InstantSearch.js","href":"/doc/api-reference/widgets/js"}]},{"item":"React InstantSearch","pages":[{"title":"React InstantSearch","href":"/doc/api-reference/widgets/react"}]},{"item":"Vue InstantSearch","pages":[{"title":"Vue InstantSearch","href":"/doc/api-reference/widgets/vue"}]},{"item":"InstantSearch iOS","pages":[{"title":"InstantSearch iOS","href":"/doc/api-reference/widgets/ios"}]},{"item":"InstantSearch Android","pages":[{"title":"InstantSearch Android","href":"/doc/api-reference/widgets/android"}]},{"item":"Algolia for Flutter","pages":[{"title":"Algolia for Flutter","href":"/doc/api-reference/widgets/flutter"}]},{"item":"Autocomplete","pages":[{"title":"Autocomplete","href":"/doc/ui-libraries/autocomplete/introduction/what-is-autocomplete"}]},{"item":"All UI libraries","pages":[{"title":"All UI libraries","href":"/doc/ui-libraries"}]}],"pages":[{"title":"UI libraries","href":"/doc/api-reference/widgets/js"}]},{"tab":"Integrations","icon":"plug","menu":[{"item":"Adobe Commerce/Magento","pages":[{"title":"Adobe Commerce/Magento","href":"/doc/integration/magento-2/getting-started/quick-start"}]},{"item":"BigCommerce","pages":[{"title":"BigCommerce","href":"/doc/integration/bigcommerce/get-started/installation"}]},{"item":"commercetools","pages":[{"title":"commercetools","href":"/doc/integration/commercetools/get-started/installation"}]},{"item":"Make","pages":[{"title":"Make","href":"/doc/integration/make"}]},{"item":"n8n","pages":[{"title":"n8n","href":"/doc/integration/n8n"}]},{"item":"Salesforce B2C Commerce","pages":[{"title":"Salesforce B2C Commerce","href":"/doc/integration/salesforce-commerce-cloud-b2c/getting-started/introduction"}]},{"item":"Shopify","pages":[{"title":"Shopify","href":"/doc/integration/shopify/getting-started/quick-start"}]},{"item":"Stripe Projects","pages":[{"title":"Stripe Projects","href":"/doc/integration/stripe-projects"}]},{"item":"Zapier","pages":[{"title":"Zapier","href":"/doc/integration/zapier"}]},{"item":"Zendesk","pages":[{"title":"Zendesk","href":"/doc/integration/zendesk/get-started"}]},{"item":"Vercel","pages":[{"title":"Vercel","href":"/doc/integration/vercel"}]},{"item":"All integrations","pages":[{"title":"All integrations","href":"/doc/integration"}]}],"pages":[{"title":"Integrations","href":"/doc/integration/magento-2/getting-started/quick-start"}]},{"tab":"API reference","icon":"code","menu":[{"item":"Search","pages":[{"title":"Search","href":"/doc/rest-api/search"}]},{"item":"Agent Studio","pages":[{"title":"Agent Studio","href":"/doc/rest-api/agent-studio"}]},{"item":"A/B testing","pages":[{"title":"A/B testing","href":"/doc/rest-api/abtesting-v3"}]},{"item":"Advanced Personalization","pages":[{"title":"Advanced Personalization","href":"/doc/rest-api/advanced-personalization"}]},{"item":"Analytics","pages":[{"title":"Analytics","href":"/doc/rest-api/analytics"}]},{"item":"Classic Personalization","pages":[{"title":"Classic Personalization","href":"/doc/rest-api/personalization"}]},{"item":"Composition","pages":[{"title":"Composition","href":"/doc/rest-api/composition"}]},{"item":"Crawler","pages":[{"title":"Crawler","href":"/doc/rest-api/crawler"}]},{"item":"Ingestion","pages":[{"title":"Ingestion","href":"/doc/rest-api/ingestion"}]},{"item":"Insights","pages":[{"title":"Insights","href":"/doc/rest-api/insights"}]},{"item":"Monitoring","pages":[{"title":"Monitoring","href":"/doc/rest-api/monitoring"}]},{"item":"Recommend","pages":[{"title":"Recommend","href":"/doc/rest-api/recommend"}]},{"item":"Query Suggestions","pages":[{"title":"Query Suggestions","href":"/doc/rest-api/query-suggestions"}]},{"item":"Usage","pages":[{"title":"Usage","href":"/doc/rest-api/usage"}]},{"item":"All APIs","pages":[{"title":"All APIs","href":"/doc/rest-api"}]}],"pages":[{"title":"API reference","href":"/doc/rest-api/search"}]}]},"basePath":"","title":"Insights API client - Algolia","buildId":"dpl_FWZhTb2vab28gFGFH4ojka6qEznQ","deploymentId":"dpl_FWZhTb2vab28gFGFH4ojka6qEznQ","dynamics":[],"chunks":[]}