// Initialize the client
var client = new AnalyticsClient(
new AnalyticsConfig("ALGOLIA_APPLICATION_ID", "ALGOLIA_API_KEY", "ALGOLIA_APPLICATION_REGION")
);
// Call the API
var response = await client.GetTopCountriesAsync("index");
// print the response
Console.WriteLine(response);
// Initialize the client with your application region, eg. analytics.ALGOLIA_APPLICATION_REGION
client, err := analytics.NewClient("ALGOLIA_APPLICATION_ID", "ALGOLIA_API_KEY", analytics.US)
if err != nil {
// The client can fail to initialize if you pass an invalid parameter.
panic(err)
}
// Call the API
response, err := client.GetTopCountries(client.NewApiGetTopCountriesRequest(
"index"))
if err != nil {
// handle the eventual error
panic(err)
}
// print the response
print(response)
// Initialize the client
AnalyticsClient client = new AnalyticsClient("ALGOLIA_APPLICATION_ID", "ALGOLIA_API_KEY", "ALGOLIA_APPLICATION_REGION");
// Call the API
GetTopCountriesResponse response = client.getTopCountries("index");
// print the response
System.out.println(response);
// Initialize the client
// Replace 'us' with your Algolia Application Region
const client = algoliasearch('ALGOLIA_APPLICATION_ID', 'ALGOLIA_API_KEY').initAnalytics({ region: 'us' });
// Call the API
const response = await client.getTopCountries({ index: 'index' });
// print the response
console.log(response);
// Initialize the client
val client =
AnalyticsClient(
appId = "ALGOLIA_APPLICATION_ID",
apiKey = "ALGOLIA_API_KEY",
region = "ALGOLIA_APPLICATION_REGION",
)
// Call the API
var response = client.getTopCountries(index = "index")
// print the response
println(response)
// Initialize the client
$client = AnalyticsClient::create('ALGOLIA_APPLICATION_ID', 'ALGOLIA_API_KEY', 'ALGOLIA_APPLICATION_REGION');
// Call the API
$response = $client->getTopCountries(
'index',
);
// print the response
var_dump($response);
# Initialize the client
# In an asynchronous context, you can use AnalyticsClient instead, which exposes the exact same methods.
client = AnalyticsClientSync(
"ALGOLIA_APPLICATION_ID", "ALGOLIA_API_KEY", "ALGOLIA_APPLICATION_REGION"
)
# Call the API
response = client.get_top_countries(
index="index",
)
# print the response
print(response)
# Initialize the client
client = Algolia::AnalyticsClient.create("ALGOLIA_APPLICATION_ID", "ALGOLIA_API_KEY", "ALGOLIA_APPLICATION_REGION")
# Call the API
response = client.get_top_countries("index")
# print the response
puts(response)
// Initialize the client
val client = AnalyticsClient(
appId = "ALGOLIA_APPLICATION_ID",
apiKey = "ALGOLIA_API_KEY",
region = Option("ALGOLIA_APPLICATION_REGION")
)
// Call the API
val response = Await.result(
client.getTopCountries(
index = "index"
),
Duration(100, "sec")
)
// print the response
println(response)
// Initialize the client
let client = try AnalyticsClient(appID: "ALGOLIA_APPLICATION_ID", apiKey: "ALGOLIA_API_KEY", region: .us)
// Call the API
let response = try await client.getTopCountries(index: "index")
// print the response
print(response)
// Initialize the client
var client = new AnalyticsClient(
new AnalyticsConfig("ALGOLIA_APPLICATION_ID", "ALGOLIA_API_KEY", "ALGOLIA_APPLICATION_REGION")
);
// Call the API
var response = await client.GetTopCountriesAsync("index");
// print the response
Console.WriteLine(response);
// Initialize the client with your application region, eg. analytics.ALGOLIA_APPLICATION_REGION
client, err := analytics.NewClient("ALGOLIA_APPLICATION_ID", "ALGOLIA_API_KEY", analytics.US)
if err != nil {
// The client can fail to initialize if you pass an invalid parameter.
panic(err)
}
// Call the API
response, err := client.GetTopCountries(client.NewApiGetTopCountriesRequest(
"index"))
if err != nil {
// handle the eventual error
panic(err)
}
// print the response
print(response)
// Initialize the client
AnalyticsClient client = new AnalyticsClient("ALGOLIA_APPLICATION_ID", "ALGOLIA_API_KEY", "ALGOLIA_APPLICATION_REGION");
// Call the API
GetTopCountriesResponse response = client.getTopCountries("index");
// print the response
System.out.println(response);
// Initialize the client
// Replace 'us' with your Algolia Application Region
const client = algoliasearch('ALGOLIA_APPLICATION_ID', 'ALGOLIA_API_KEY').initAnalytics({ region: 'us' });
// Call the API
const response = await client.getTopCountries({ index: 'index' });
// print the response
console.log(response);
// Initialize the client
val client =
AnalyticsClient(
appId = "ALGOLIA_APPLICATION_ID",
apiKey = "ALGOLIA_API_KEY",
region = "ALGOLIA_APPLICATION_REGION",
)
// Call the API
var response = client.getTopCountries(index = "index")
// print the response
println(response)
// Initialize the client
$client = AnalyticsClient::create('ALGOLIA_APPLICATION_ID', 'ALGOLIA_API_KEY', 'ALGOLIA_APPLICATION_REGION');
// Call the API
$response = $client->getTopCountries(
'index',
);
// print the response
var_dump($response);
# Initialize the client
# In an asynchronous context, you can use AnalyticsClient instead, which exposes the exact same methods.
client = AnalyticsClientSync(
"ALGOLIA_APPLICATION_ID", "ALGOLIA_API_KEY", "ALGOLIA_APPLICATION_REGION"
)
# Call the API
response = client.get_top_countries(
index="index",
)
# print the response
print(response)
# Initialize the client
client = Algolia::AnalyticsClient.create("ALGOLIA_APPLICATION_ID", "ALGOLIA_API_KEY", "ALGOLIA_APPLICATION_REGION")
# Call the API
response = client.get_top_countries("index")
# print the response
puts(response)
// Initialize the client
val client = AnalyticsClient(
appId = "ALGOLIA_APPLICATION_ID",
apiKey = "ALGOLIA_API_KEY",
region = Option("ALGOLIA_APPLICATION_REGION")
)
// Call the API
val response = Await.result(
client.getTopCountries(
index = "index"
),
Duration(100, "sec")
)
// print the response
println(response)
// Initialize the client
let client = try AnalyticsClient(appID: "ALGOLIA_APPLICATION_ID", apiKey: "ALGOLIA_API_KEY", region: .us)
// Call the API
let response = try await client.getTopCountries(index: "index")
// print the response
print(response)
Your Algolia API key with the necessary permissions to make the request.
Permissions are controlled through access control lists (ACL) and access restrictions.
The required ACL to make a request is listed in each endpoint's reference.
{"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":"6af5c625483e41d0aa573dc2","clientVersion":"0.0.4111","searchFilterCounts":[{"language":"default","tag":"Libraries and tools","count":618},{"language":"default","tag":"Guides","count":584},{"language":"default","tag":"API clients","count":407},{"language":"default","tag":"Search and Discovery platform","count":406},{"language":"default","tag":"API reference","count":403},{"language":"default","tag":"UI libraries","count":290},{"language":"default","tag":"Reference","count":282},{"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":"custom-rbac-roles","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}],"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/rest-api/analytics/get-top-countries","slug":"/doc/rest-api/analytics/get-top-countries","pageMetadata":{"title":"Retrieve top countries","description":"Retrieves the countries with the most searches in your index.","openapi":"specs/searchstats.yml get /2/countries","public":true,"href":"/doc/rest-api/analytics/get-top-countries"},"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: \"Retrieves the countries with the most searches in your index.\"\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{jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={code:`code`,p:`p`,strong:`strong`,..._provideComponents(),...props.components};return _jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Required ACL:`}),` `,_jsx(_components.code,{children:`analytics`})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent}","frontmatter":{},"scope":{"codeStyling":"system","config":{},"pageMetadata":{"title":"Retrieve top countries","description":"Retrieves the countries with the most searches in your index.","openapi":"specs/searchstats.yml get /2/countries","public":true,"href":"/doc/rest-api/analytics/get-top-countries"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"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"],"openApiReferenceData":{"operation":{"tags":["user"],"operationId":"getTopCountries","x-acl":["analytics"],"summary":"Retrieve top countries","description":"Retrieves the countries with the most searches in your index.","parameters":["9293c486-8c49-4a65-a6ec-acf05903204f","73efbbf6-2e0a-4277-8820-90ac36deb349","13ba929c-03c1-4d42-9689-913cdd19e9e0","1bacd993-9e19-491e-87ff-8cb72c220f04","a0f88ed2-0d2c-4cfb-bbab-d1f2cc5243ce","bdf34b8b-093b-4516-8b39-9b66663f77db"],"responses":{"200":"9d669490-a7b0-4a8c-b223-bacae427b023","400":"d023b797-6225-4947-bb1a-55d0701f3d47","402":"1f687d97-22be-4392-9ddf-1ea3b1245c11","403":"66fad3b2-c5c7-4d8d-a6ef-628ce08525e7","404":"852e20cb-f12b-40c6-bf1c-01dfc38b9610"},"x-codeSamples":[{"lang":"csharp","label":"C#","source":"// Initialize the client\nvar client = new AnalyticsClient(\n new AnalyticsConfig(\"ALGOLIA_APPLICATION_ID\", \"ALGOLIA_API_KEY\", \"ALGOLIA_APPLICATION_REGION\")\n);\n\n// Call the API\nvar response = await client.GetTopCountriesAsync(\"index\");\n\n// print the response\nConsole.WriteLine(response);"},{"lang":"go","label":"Go","source":"// Initialize the client with your application region, eg. analytics.ALGOLIA_APPLICATION_REGION\nclient, err := analytics.NewClient(\"ALGOLIA_APPLICATION_ID\", \"ALGOLIA_API_KEY\", analytics.US)\nif err != nil {\n // The client can fail to initialize if you pass an invalid parameter.\n panic(err)\n}\n\n// Call the API\nresponse, err := client.GetTopCountries(client.NewApiGetTopCountriesRequest(\n \"index\"))\nif err != nil {\n // handle the eventual error\n panic(err)\n}\n\n\n// print the response\nprint(response)"},{"lang":"java","label":"Java","source":"// Initialize the client\nAnalyticsClient client = new AnalyticsClient(\"ALGOLIA_APPLICATION_ID\", \"ALGOLIA_API_KEY\", \"ALGOLIA_APPLICATION_REGION\");\n\n// Call the API\nGetTopCountriesResponse response = client.getTopCountries(\"index\");\n\n// print the response\nSystem.out.println(response);"},{"lang":"javascript","label":"JavaScript","source":"// Initialize the client\n// Replace 'us' with your Algolia Application Region\nconst client = algoliasearch('ALGOLIA_APPLICATION_ID', 'ALGOLIA_API_KEY').initAnalytics({ region: 'us' });\n\n// Call the API\nconst response = await client.getTopCountries({ index: 'index' });\n\n\n// print the response\nconsole.log(response);"},{"lang":"kotlin","label":"Kotlin","source":"// Initialize the client\nval client =\n AnalyticsClient(\n appId = \"ALGOLIA_APPLICATION_ID\",\n apiKey = \"ALGOLIA_API_KEY\",\n region = \"ALGOLIA_APPLICATION_REGION\",\n )\n\n// Call the API\nvar response = client.getTopCountries(index = \"index\")\n\n\n// print the response\nprintln(response)"},{"lang":"php","label":"PHP","source":"// Initialize the client\n$client = AnalyticsClient::create('ALGOLIA_APPLICATION_ID', 'ALGOLIA_API_KEY', 'ALGOLIA_APPLICATION_REGION');\n\n// Call the API\n$response = $client->getTopCountries(\n 'index',\n);\n\n\n// print the response\nvar_dump($response);"},{"lang":"python","label":"Python","source":"# Initialize the client\n# In an asynchronous context, you can use AnalyticsClient instead, which exposes the exact same methods.\nclient = AnalyticsClientSync(\n \"ALGOLIA_APPLICATION_ID\", \"ALGOLIA_API_KEY\", \"ALGOLIA_APPLICATION_REGION\"\n)\n\n# Call the API\nresponse = client.get_top_countries(\n index=\"index\",\n)\n\n\n# print the response\nprint(response)"},{"lang":"ruby","label":"Ruby","source":"# Initialize the client\nclient = Algolia::AnalyticsClient.create(\"ALGOLIA_APPLICATION_ID\", \"ALGOLIA_API_KEY\", \"ALGOLIA_APPLICATION_REGION\")\n\n# Call the API\nresponse = client.get_top_countries(\"index\")\n\n\n# print the response\nputs(response)"},{"lang":"scala","label":"Scala","source":"// Initialize the client\nval client = AnalyticsClient(\n appId = \"ALGOLIA_APPLICATION_ID\",\n apiKey = \"ALGOLIA_API_KEY\",\n region = Option(\"ALGOLIA_APPLICATION_REGION\")\n)\n\n// Call the API\nval response = Await.result(\n client.getTopCountries(\n index = \"index\"\n ),\n Duration(100, \"sec\")\n)\n\n// print the response\nprintln(response)"},{"lang":"swift","label":"Swift","source":"// Initialize the client\nlet client = try AnalyticsClient(appID: \"ALGOLIA_APPLICATION_ID\", apiKey: \"ALGOLIA_API_KEY\", region: .us)\n\n// Call the API\nlet response = try await client.getTopCountries(index: \"index\")\n\n// print the response\nprint(response)"},{"lang":"cURL","label":"curl","source":"curl --request GET \\\n --url 'https://analytics.us.algolia.com/2/countries?index=ALGOLIA_INDEX_NAME\u0026startDate=2022-09-19\u0026endDate=2023-01-21\u0026limit=10\u0026offset=0\u0026tags=device%3Amobile%2520phone' \\\n --header 'accept: application/json' \\\n --header 'x-algolia-api-key: ALGOLIA_API_KEY' \\\n --header 'x-algolia-application-id: ALGOLIA_APPLICATION_ID'"}],"method":"get","type":"path","servers":["537f6543-f9f9-4aaa-8665-157ad57d746d","c881c661-7677-46eb-99ab-00709789ec3c"],"security":["503c52e1-cc2b-4205-8b75-1722aa483266"],"path":"/2/countries","baseUrlOptions":["https://analytics.{region}.algolia.com","https://analytics.algolia.com"],"title":"Retrieve top countries","codeSamples":[{"label":"C#","lang":"csharp","source":"// Initialize the client\nvar client = new AnalyticsClient(\n new AnalyticsConfig(\"ALGOLIA_APPLICATION_ID\", \"ALGOLIA_API_KEY\", \"ALGOLIA_APPLICATION_REGION\")\n);\n\n// Call the API\nvar response = await client.GetTopCountriesAsync(\"index\");\n\n// print the response\nConsole.WriteLine(response);"},{"label":"Go","lang":"go","source":"// Initialize the client with your application region, eg. analytics.ALGOLIA_APPLICATION_REGION\nclient, err := analytics.NewClient(\"ALGOLIA_APPLICATION_ID\", \"ALGOLIA_API_KEY\", analytics.US)\nif err != nil {\n // The client can fail to initialize if you pass an invalid parameter.\n panic(err)\n}\n\n// Call the API\nresponse, err := client.GetTopCountries(client.NewApiGetTopCountriesRequest(\n \"index\"))\nif err != nil {\n // handle the eventual error\n panic(err)\n}\n\n\n// print the response\nprint(response)"},{"label":"Java","lang":"java","source":"// Initialize the client\nAnalyticsClient client = new AnalyticsClient(\"ALGOLIA_APPLICATION_ID\", \"ALGOLIA_API_KEY\", \"ALGOLIA_APPLICATION_REGION\");\n\n// Call the API\nGetTopCountriesResponse response = client.getTopCountries(\"index\");\n\n// print the response\nSystem.out.println(response);"},{"label":"JavaScript","lang":"javascript","source":"// Initialize the client\n// Replace 'us' with your Algolia Application Region\nconst client = algoliasearch('ALGOLIA_APPLICATION_ID', 'ALGOLIA_API_KEY').initAnalytics({ region: 'us' });\n\n// Call the API\nconst response = await client.getTopCountries({ index: 'index' });\n\n\n// print the response\nconsole.log(response);"},{"label":"Kotlin","lang":"kotlin","source":"// Initialize the client\nval client =\n AnalyticsClient(\n appId = \"ALGOLIA_APPLICATION_ID\",\n apiKey = \"ALGOLIA_API_KEY\",\n region = \"ALGOLIA_APPLICATION_REGION\",\n )\n\n// Call the API\nvar response = client.getTopCountries(index = \"index\")\n\n\n// print the response\nprintln(response)"},{"label":"PHP","lang":"php","source":"// Initialize the client\n$client = AnalyticsClient::create('ALGOLIA_APPLICATION_ID', 'ALGOLIA_API_KEY', 'ALGOLIA_APPLICATION_REGION');\n\n// Call the API\n$response = $client->getTopCountries(\n 'index',\n);\n\n\n// print the response\nvar_dump($response);"},{"label":"Python","lang":"python","source":"# Initialize the client\n# In an asynchronous context, you can use AnalyticsClient instead, which exposes the exact same methods.\nclient = AnalyticsClientSync(\n \"ALGOLIA_APPLICATION_ID\", \"ALGOLIA_API_KEY\", \"ALGOLIA_APPLICATION_REGION\"\n)\n\n# Call the API\nresponse = client.get_top_countries(\n index=\"index\",\n)\n\n\n# print the response\nprint(response)"},{"label":"Ruby","lang":"ruby","source":"# Initialize the client\nclient = Algolia::AnalyticsClient.create(\"ALGOLIA_APPLICATION_ID\", \"ALGOLIA_API_KEY\", \"ALGOLIA_APPLICATION_REGION\")\n\n# Call the API\nresponse = client.get_top_countries(\"index\")\n\n\n# print the response\nputs(response)"},{"label":"Scala","lang":"scala","source":"// Initialize the client\nval client = AnalyticsClient(\n appId = \"ALGOLIA_APPLICATION_ID\",\n apiKey = \"ALGOLIA_API_KEY\",\n region = Option(\"ALGOLIA_APPLICATION_REGION\")\n)\n\n// Call the API\nval response = Await.result(\n client.getTopCountries(\n index = \"index\"\n ),\n Duration(100, \"sec\")\n)\n\n// print the response\nprintln(response)"},{"label":"Swift","lang":"swift","source":"// Initialize the client\nlet client = try AnalyticsClient(appID: \"ALGOLIA_APPLICATION_ID\", apiKey: \"ALGOLIA_API_KEY\", region: .us)\n\n// Call the API\nlet response = try await client.getTopCountries(index: \"index\")\n\n// print the response\nprint(response)"},{"label":"curl","lang":"cURL","source":"curl --request GET \\\n --url 'https://analytics.us.algolia.com/2/countries?index=ALGOLIA_INDEX_NAME\u0026startDate=2022-09-19\u0026endDate=2023-01-21\u0026limit=10\u0026offset=0\u0026tags=device%3Amobile%2520phone' \\\n --header 'accept: application/json' \\\n --header 'x-algolia-api-key: ALGOLIA_API_KEY' \\\n --header 'x-algolia-application-id: ALGOLIA_APPLICATION_ID'"}],"requestExampleLanguages":["bash","csharp","dart","go","java","javascript","kotlin","php","python","ruby","scala","swift"],"requiredOnlyExamples":false,"disableCodeSampleGeneration":true,"requestExampleType":"codeSamples","responseExampleType":"generated"},"dependencies":{"parameters":{"9293c486-8c49-4a65-a6ec-acf05903204f":{"in":"query","name":"index","description":"Index name.","required":true,"schema":{"type":"string","example":"ALGOLIA_INDEX_NAME","isRequired":true,"description":"Index name.","uniqueKey":"","typeLabel":"string"}},"73efbbf6-2e0a-4277-8820-90ac36deb349":{"in":"query","name":"endDate","description":"End date of the period to analyze, in `YYYY-MM-DD` format.","schema":{"type":"string","example":"2023-01-21","description":"End date of the period to analyze, in `YYYY-MM-DD` format.","uniqueKey":"","typeLabel":"string"}},"13ba929c-03c1-4d42-9689-913cdd19e9e0":{"in":"query","name":"limit","description":"Number of items to return.\n","required":false,"schema":{"type":"integer","default":10,"maximum":1000,"isRequired":false,"description":"Number of items to return.\n","uniqueKey":"","typeLabel":"integer"}},"1bacd993-9e19-491e-87ff-8cb72c220f04":{"in":"query","name":"offset","description":"Position of the first item to return.\n","required":false,"schema":{"type":"integer","default":0,"minimum":0,"isRequired":false,"description":"Position of the first item to return.\n","uniqueKey":"","typeLabel":"integer"}},"a0f88ed2-0d2c-4cfb-bbab-d1f2cc5243ce":{"in":"query","name":"startDate","description":"Start date of the period to analyze, in `YYYY-MM-DD` format.","schema":{"type":"string","example":"2022-09-19","description":"Start date of the period to analyze, in `YYYY-MM-DD` format.","uniqueKey":"","typeLabel":"string"}},"bdf34b8b-093b-4516-8b39-9b66663f77db":{"name":"tags","in":"query","description":"Tags by which to segment the analytics.\n\nYou can combine multiple tags with `OR` and `AND`.\nTags must be URL-encoded.\nFor more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments).\n","example":"device:mobile%20phone","schema":{"type":"string","description":"Tags by which to segment the analytics.\n\nYou can combine multiple tags with `OR` and `AND`.\nTags must be URL-encoded.\nFor more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments).\n","uniqueKey":"","typeLabel":"string"}}},"responses":{"9d669490-a7b0-4a8c-b223-bacae427b023":{"description":"OK","headers":{"x-ratelimit-limit":{"description":"Number of allowed requests per one minute.","example":100,"schema":{"type":"integer"}},"x-ratelimit-remaining":{"description":"Number of remaining requests in the current period.","example":99,"schema":{"type":"integer"}},"x-ratelimit-reset":{"description":"Timestamp when the rate limit will reset, measured in seconds since the Unix epoch.","example":1710682486,"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"title":"getTopCountriesResponse","type":"object","additionalProperties":false,"required":["countries"],"properties":{"countries":{"type":"array","description":"Countries and number of searches.","items":{"title":"topCountry","type":"object","additionalProperties":false,"required":["country","count"],"properties":{"count":{"description":"Number of occurrences.","example":2,"type":"integer","isRequired":true,"uniqueKey":"countries.items.[INDEX].count","typeLabel":"integer"},"country":{"description":"Country code.","type":"string","example":"UK","isRequired":true,"uniqueKey":"countries.items.[INDEX].country","typeLabel":"string"}},"uniqueKey":"countries.items.[INDEX]","typeLabel":"topCountry · object"},"isRequired":true,"uniqueKey":"countries","typeLabel":"topCountry · object[]"}},"uniqueKey":"","typeLabel":"getTopCountriesResponse · object"},"examples":{"Example":{"title":"Example","value":{"countries":[{"count":2,"country":"UK"}]}}},"exampleType":"generated"}},"exampleType":"generated"},"d023b797-6225-4947-bb1a-55d0701f3d47":{"description":"Bad request or request arguments.","content":{"application/json":{"schema":{"description":"Error.","type":"object","x-keep-model":true,"additionalProperties":true,"properties":{"message":{"type":"string","example":"Invalid Application-Id or API-Key","uniqueKey":"message","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"message":"Invalid Application-Id or API-Key"}}},"exampleType":"generated"}},"exampleType":"generated"},"1f687d97-22be-4392-9ddf-1ea3b1245c11":{"description":"This feature is not enabled on your Algolia account.","content":{"application/json":{"schema":{"description":"Error.","type":"object","x-keep-model":true,"additionalProperties":true,"properties":{"message":{"type":"string","example":"Invalid Application-Id or API-Key","uniqueKey":"message","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"message":"Invalid Application-Id or API-Key"}}},"exampleType":"generated"}},"exampleType":"generated"},"66fad3b2-c5c7-4d8d-a6ef-628ce08525e7":{"description":"Method not allowed with this API key.","content":{"application/json":{"schema":{"description":"Error.","type":"object","x-keep-model":true,"additionalProperties":true,"properties":{"message":{"type":"string","example":"Invalid Application-Id or API-Key","uniqueKey":"message","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"message":"Invalid Application-Id or API-Key"}}},"exampleType":"generated"}},"exampleType":"generated"},"852e20cb-f12b-40c6-bf1c-01dfc38b9610":{"description":"Index not found.","content":{"application/json":{"schema":{"description":"Error.","type":"object","x-keep-model":true,"additionalProperties":true,"properties":{"message":{"type":"string","example":"Invalid Application-Id or API-Key","uniqueKey":"message","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"message":"Invalid Application-Id or API-Key"}}},"exampleType":"generated"}},"exampleType":"generated"}},"security":{"503c52e1-cc2b-4205-8b75-1722aa483266":{"appId":{"type":"apiKey","in":"header","name":"x-algolia-application-id","description":"Your Algolia application ID.","scopes":[],"schemeName":"appId"},"apiKey":{"type":"apiKey","in":"header","name":"x-algolia-api-key","description":"Your Algolia API key with the necessary permissions to make the request.\nPermissions are controlled through access control lists (ACL) and access restrictions.\nThe required ACL to make a request is listed in each endpoint's reference.\n","scopes":[],"schemeName":"apiKey"}}},"servers":{"537f6543-f9f9-4aaa-8665-157ad57d746d":{"url":"https://analytics.{region}.algolia.com","variables":{"region":{"description":"The region where your Algolia application is hosted.","enum":["us","de"],"default":"us"}}},"c881c661-7677-46eb-99ab-00709789ec3c":{"url":"https://analytics.algolia.com"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"apiKey","in":"header","name":"x-algolia-application-id","description":"Your Algolia application ID.","scopes":[],"schemeName":"appId"},"schema":{"title":"x-algolia-application-id","type":"string","description":"Your Algolia application ID.","isRequired":true,"typeLabel":"string","deprecated":false},"schemeName":"appId","name":"x-algolia-application-id"},{"scheme":{"type":"apiKey","in":"header","name":"x-algolia-api-key","description":"Your Algolia API key with the necessary permissions to make the request.\nPermissions are controlled through access control lists (ACL) and access restrictions.\nThe required ACL to make a request is listed in each endpoint's reference.\n","scopes":[],"schemeName":"apiKey"},"schema":{"title":"x-algolia-api-key","type":"string","description":"Your Algolia API key with the necessary permissions to make the request.\nPermissions are controlled through access control lists (ACL) and access restrictions.\nThe required ACL to make a request is listed in each endpoint's reference.\n","isRequired":true,"typeLabel":"string","deprecated":false},"schemeName":"apiKey","name":"x-algolia-api-key"}],"title":"appId \u0026 apiKey"}]},"originalFileLocation":"specs/searchstats.yml"},"subdomain":"algolia","siteName":"Algolia","title":"Retrieve top countries - Algolia","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-03-23T09:45:05.212Z","gitLastModified":"2026-03-23T09:42:41.000Z","originalFileLocation":"doc/rest-api/analytics/get-top-countries.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=\"Retrieves the countries with the most searches in your index.\">\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=\"Retrieve top countries - Algolia\">\u003cmeta data-mint-head property=\"og:description\" content=\"Retrieves the countries with the most searches in your index.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Algolia\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://www.algolia.com/doc/rest-api/analytics/get-top-countries\">\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=Users\u0026amp;title=Retrieve+top+countries\u0026amp;description=Retrieves+the+countries+with+the+most+searches+in+your+index.\u0026amp;theme=7b696fa6ef3d890ba8a17746\u0026amp;signature=79be75f864cf74a7223977441e05391116e0f6295b0250170e707ba9aff98346\">\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=\"Retrieve top countries - Algolia\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Retrieves the countries with the most searches in your index.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://algolia.mintlify.site/_mintlify/api/og/v2?division=Users\u0026amp;title=Retrieve+top+countries\u0026amp;description=Retrieves+the+countries+with+the+most+searches+in+your+index.\u0026amp;theme=7b696fa6ef3d890ba8a17746\u0026amp;signature=79be75f864cf74a7223977441e05391116e0f6295b0250170e707ba9aff98346\">\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/rest-api/analytics/get-top-countries\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/doc/rest-api/analytics/get-top-countries.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/rest-api/analytics/get-top-countries#webpage\",\"url\":\"https://www.algolia.com/doc/rest-api/analytics/get-top-countries\",\"name\":\"Retrieve top countries\",\"description\":\"Retrieves the countries with the most searches in your index.\",\"dateModified\":\"2026-03-23T09:42:41.000Z\",\"isPartOf\":{\"@id\":\"https://www.algolia.com#website\"},\"breadcrumb\":{\"@id\":\"https://www.algolia.com/doc/rest-api/analytics/get-top-countries#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://www.algolia.com/doc/rest-api/analytics/get-top-countries#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Analytics API\",\"item\":\"https://www.algolia.com/doc/rest-api/analytics\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Users\",\"item\":\"https://www.algolia.com/doc/rest-api/analytics/get-users-count\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Retrieve top countries\",\"item\":\"https://www.algolia.com/doc/rest-api/analytics/get-top-countries\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://www.algolia.com/doc/rest-api/analytics/get-top-countries#apireference\",\"headline\":\"Retrieve top countries\",\"name\":\"Retrieve top countries\",\"description\":\"Retrieves the countries with the most searches in your index.\",\"url\":\"https://www.algolia.com/doc/rest-api/analytics/get-top-countries\",\"mainEntityOfPage\":{\"@id\":\"https://www.algolia.com/doc/rest-api/analytics/get-top-countries#webpage\"},\"dateModified\":\"2026-03-23T09:42:41.000Z\",\"publisher\":{\"@id\":\"https://www.algolia.com/#organization\"},\"isPartOf\":{\"@id\":\"https://www.algolia.com#website\"}}]}\u003c/script>","agentPointerHref":"/doc/rest-api/analytics/get-top-countries.md","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":"current","pages":[{"title":"current","href":"/doc/libraries/sdk"}]}]},{"version":"legacy","groups":[{"group":"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"}]}],"pages":[{"title":"Libraries and tools","href":"/doc/libraries/sdk"}]},{"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","groups":[{"group":"Analytics API","icon":"code","pages":[{"title":"Analytics API","sidebarTitle":"Overview","href":"/doc/rest-api/analytics"},{"group":"Search","pages":[{"title":"Retrieve top searches","openapi":"specs/searchstats.yml get /2/searches","href":"/doc/rest-api/analytics/get-top-searches"},{"title":"Retrieve number of searches","openapi":"specs/searchstats.yml get /2/searches/count","href":"/doc/rest-api/analytics/get-searches-count"},{"title":"Retrieve the most frequent searches without results","openapi":"specs/searchstats.yml get /2/searches/noResults","href":"/doc/rest-api/analytics/get-searches-no-results"},{"title":"Retrieve no results rate","openapi":"specs/searchstats.yml get /2/searches/noResultRate","href":"/doc/rest-api/analytics/get-no-results-rate"},{"title":"Retrieve top search results","openapi":"specs/searchstats.yml get /2/hits","href":"/doc/rest-api/analytics/get-top-hits"}]},{"group":"Clicks","pages":[{"title":"Retrieve top searches without clicks","openapi":"specs/searchstats.yml get /2/searches/noClicks","href":"/doc/rest-api/analytics/get-searches-no-clicks"},{"title":"Retrieve no click rate","openapi":"specs/searchstats.yml get /2/searches/noClickRate","href":"/doc/rest-api/analytics/get-no-click-rate"},{"title":"Retrieve average click position","openapi":"specs/searchstats.yml get /2/clicks/averageClickPosition","href":"/doc/rest-api/analytics/get-average-click-position"},{"title":"Retrieve click positions","openapi":"specs/searchstats.yml get /2/clicks/positions","href":"/doc/rest-api/analytics/get-click-positions"},{"title":"Retrieve click-through rate","openapi":"specs/searchstats.yml get /2/clicks/clickThroughRate","href":"/doc/rest-api/analytics/get-click-through-rate"},{"title":"Retrieve conversion rate","openapi":"specs/searchstats.yml get /2/conversions/conversionRate","href":"/doc/rest-api/analytics/get-conversion-rate"},{"title":"Retrieve add-to-cart rate","openapi":"specs/searchstats.yml get /2/conversions/addToCartRate","href":"/doc/rest-api/analytics/get-add-to-cart-rate"},{"title":"Retrieve purchase rate","openapi":"specs/searchstats.yml get /2/conversions/purchaseRate","href":"/doc/rest-api/analytics/get-purchase-rate"}]},{"group":"Revenue","pages":[{"title":"Retrieve revenue data","openapi":"specs/searchstats.yml get /2/conversions/revenue","href":"/doc/rest-api/analytics/get-revenue"}]},{"group":"Patterns","tag":"beta","pages":[{"title":"Retrieve the field catalog","openapi":"specs/searchstats.yml get /3/patterns/fields","href":"/doc/rest-api/analytics/get-patterns-fields"},{"title":"Query a metrics time series","openapi":"specs/searchstats.yml post /3/patterns/timeseries","href":"/doc/rest-api/analytics/query-patterns-timeseries"},{"title":"Query single-row aggregates","openapi":"specs/searchstats.yml post /3/patterns/scalar","href":"/doc/rest-api/analytics/query-patterns-scalar"},{"title":"Query a grouped table","openapi":"specs/searchstats.yml post /3/patterns/table","href":"/doc/rest-api/analytics/query-patterns-table"},{"title":"Query a numeric distribution","openapi":"specs/searchstats.yml post /3/patterns/distribution","href":"/doc/rest-api/analytics/query-patterns-distribution"}]},{"group":"Filters","pages":[{"title":"Retrieve top filters","openapi":"specs/searchstats.yml get /2/filters","href":"/doc/rest-api/analytics/get-top-filter-attributes"},{"title":"Retrieve top filter values","openapi":"specs/searchstats.yml get /2/filters/{attribute}","href":"/doc/rest-api/analytics/get-top-filter-for-attribute"},{"title":"Retrieve top filters for a search without results","openapi":"specs/searchstats.yml get /2/filters/noResults","href":"/doc/rest-api/analytics/get-top-filters-no-results"}]},{"group":"Users","pages":[{"title":"Retrieve number of users","description":"Retrieves the number of unique users within a time range, including a daily breakdown.","openapi":"specs/searchstats.yml get /2/users/count","href":"/doc/rest-api/analytics/get-users-count"},{"title":"Retrieve top countries","openapi":"specs/searchstats.yml get /2/countries","href":"/doc/rest-api/analytics/get-top-countries"}]},{"group":"Status","pages":[{"title":"Retrieve update status","description":"Retrieves the time when the Analytics data for the specified index was last updated.","openapi":"specs/searchstats.yml get /2/status","href":"/doc/rest-api/analytics/get-status"}]}]}]},{"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":"Suggested Actions","pages":[{"title":"Suggested Actions","href":"/doc/rest-api/suggested-actions"}]},{"item":"Usage","pages":[{"title":"Usage","href":"/doc/rest-api/usage"}]},{"item":"All APIs","pages":[{"title":"All APIs","href":"/doc/rest-api"}]}]}]},"basePath":"","title":"Retrieve top countries - Algolia","buildId":"dpl_DqYu5MPb49gWBBbUGgpHQUmCHY3P","deploymentId":"dpl_DqYu5MPb49gWBBbUGgpHQUmCHY3P","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-CybtLBIt.js","utils-BMLj2fvV.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-B6In562Y.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-Dr8Mfhp9.js","snippetPresets-2rmQvMVl.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","conditional-requirements-CFM0id0Q.js","ApiExamples-WMqJYdZj.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-CJ-MlPHu.js","shallow-dY3TMRCk.js","getApiPlaygroundDisplay-v-1B2bKm.js","CodeSnippet-BDhiTB7U.js","CodeSnippets-D9hnzQcS.js","Page-C4GwDT3_.js","getPastedJson-Th2V45jI.js","icon-BQXch1W9.js","MethodPill-BCqUneP3.js","DuplicateIcon-Q_-bhurZ.js","createIcon-DUjLHRqp.js","DynamicMarkdown-B-f2cqXQ.js","SectionHeading-Da5NsV4v.js","axios-vUo_bRtp.js","Markdown-D13FWkIM.js","clsx-D3Isdib3.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-C-XZBk9h.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink--qIqmmVG.js"]}