For any query (JSON object) with question, audiences and filters in request body it responses with results for chart builder metrics according the query.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"GWI","colors":{"primary":"#ff0077","light":"#ff0077","dark":"#ff0077"},"logo":{"light":"https://mintcdn.com/gwi-c45e8f9c/BSqEeFQj4tSRrE6v/assets/logo/light.png?fit=max\u0026auto=format\u0026n=BSqEeFQj4tSRrE6v\u0026q=85\u0026s=154d7100bcdc6ea8c52c5ba9d575d865","dark":"https://mintcdn.com/gwi-c45e8f9c/BSqEeFQj4tSRrE6v/assets/logo/dark.png?fit=max\u0026auto=format\u0026n=BSqEeFQj4tSRrE6v\u0026q=85\u0026s=2dd1e470111227ff5a2a7da0190cc55e"},"favicon":"https://mintcdn.com/gwi-c45e8f9c/BSqEeFQj4tSRrE6v/assets/favicon.png?fit=max\u0026auto=format\u0026n=BSqEeFQj4tSRrE6v\u0026q=85\u0026s=a1b2975305bd416a35b40363fd281048","navbar":{"links":[],"primary":{"type":"button","label":"Book demo","href":"https://www.gwi.com/book-demo?hsCtaTracking=7c82d7ee-619d-4733-a627-993ccfc14df4%7C48400de7-7d3e-4ebf-bc0a-ee97f4420759"}},"footer":{"socials":{"x":"https://x.com/gwidotcom","instagram":"https://www.instagram.com/gwidotcom","linkedin":"https://www.linkedin.com/company/gwidotcom"}},"fonts":{"heading":{"family":"Ovo","weight":400,"source":"assets/fonts/Ovo-Regular.woff2","format":"woff2"},"body":{"family":"Instrument Sans","weight":400,"source":"assets/fonts/InstrumentSans-Regular.woff2","format":"woff2"}},"integrations":{},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"gwi-c45e8f9c","hasAudioNarration":false,"actualSubdomain":"gwi-c45e8f9c","customDomains":["api.globalwebindex.com"],"gitSource":{"type":"github","owner":"globalwebindex","repo":"api-documentation","deployBranch":"master","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6ae89b66acf69f1cbda992ac","collectionId":"3b684fba-8999-4082-8631-af921e85b37f","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6ae89b66acf69f1cbda992ac"},"feedback":{"thumbs":true},"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":"6ae89b66acf69f1cbda992ac","clientVersion":"0.0.4044","searchFilterCounts":[{"language":"default","tag":"Platform API","count":117},{"language":"default","tag":"Getting started","count":59},{"language":"default","tag":"Reference","count":54},{"language":"default","tag":"Spark MCP","count":42},{"language":"default","tag":"Integration Guide","count":24},{"language":"default","tag":"Spark API","count":15},{"language":"default","tag":"Quickstarts","count":14},{"language":"default","tag":"Spark in AI assistants","count":12},{"language":"default","tag":"GWI Overview","count":10},{"language":"default","tag":"Audiences","count":9}]},"assistantConfig":{"enableAskAiButton":true,"enableAskAiSearchBar":true},"basePath":"/docs","hasChatPermissions":true,"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":"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":"byok-sep-25","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":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","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":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"styles.css","content":"@charset \"UTF-8\";@font-face{font-family:\"Instrument Sans\";src:url(/assets/fonts/InstrumentSans-Medium.woff2) format(\"woff2\");font-weight:500;font-style:normal;font-display:swap}@font-face{font-family:\"Instrument Sans\";src:url(/assets/fonts/InstrumentSans-SemiBold.woff2) format(\"woff2\");font-weight:600;font-style:normal;font-display:swap}:root{--interlink-navy:#191530;--interlink-pink:#ff0077;--interlink-lime:#edffb8;--font-body:\"Instrument Sans\", system-ui, -apple-system, sans-serif;--font-heading:\"Ovo\", Georgia, serif;--heading-01-size:48px;--heading-01-line:64px;--heading-02-size:40px;--heading-02-line:56px;--heading-03-size:32px;--heading-03-line:48px;--heading-04-size:24px;--heading-04-line:32px;--heading-05-size:20px;--heading-05-line:32px;--body-01-size:16px;--body-01-line:24px}#content,body{font-family:var(--font-body);font-size:var(--body-01-size);line-height:var(--body-01-line)}.dark #content,.dark #content .welcome-products__title,.dark #page-title,.dark body{color:#f5f4f6}#content,#page-title,body{color:var(--interlink-navy)}#content h1,#content h2,#content h3,#page-title{font-family:var(--font-heading);font-weight:400}#content h1,#page-title{font-size:var(--heading-01-size);line-height:var(--heading-01-line)}#content h1{letter-spacing:-.25px}#content h2,#content h3{font-size:var(--heading-02-size);line-height:var(--heading-02-line)}#content h3{font-size:var(--heading-03-size);line-height:var(--heading-03-line)}#content h4,#content h5{font-family:var(--font-body);font-weight:600;font-size:var(--heading-04-size);line-height:var(--heading-04-line)}#content h5{font-size:var(--heading-05-size);line-height:var(--heading-05-line)}@media (max-width:768px){:root{--heading-01-size:36px;--heading-01-line:48px;--heading-02-size:32px;--heading-02-line:44px;--heading-03-size:28px;--heading-03-line:40px}}.welcome-hero{position:relative;display:flex;align-items:center;justify-content:center;width:100%;min-height:24rem;overflow:hidden;background-color:var(--interlink-lime);text-decoration:none;cursor:pointer}.welcome-hero:focus-visible{outline:2px solid var(--interlink-pink);outline-offset:-2px}.welcome-hero__inner{position:relative;z-index:1;max-width:50rem;padding:3rem 1.25rem 2.5rem;text-align:center}#content .welcome-products__title,.welcome-hero__title{font-family:var(--font-heading);font-weight:400;color:var(--interlink-navy)}.welcome-hero__title{margin:0;font-size:var(--heading-01-size);line-height:var(--heading-01-line);letter-spacing:-.25px}.welcome-hero__subtitle{margin:.75rem 0 0;font-family:var(--font-body);font-size:var(--body-01-size);line-height:var(--body-01-line);color:var(--interlink-navy)}.welcome-cta,.welcome-hero__actions{display:inline-flex;justify-content:center}.welcome-hero__actions{margin-top:1.25rem}.welcome-cta{align-items:center;box-sizing:border-box;gap:.625rem;height:2.25rem;padding:.375rem 1rem;font-family:var(--font-body);font-size:.875rem;font-weight:500;line-height:1.25rem;color:#292524;text-decoration:none;background-color:#fff;border:1px solid rgb(12 10 9/20%);border-radius:var(--radius-xm, 0.75rem)}.welcome-hero:hover .welcome-cta{border-color:var(--interlink-pink)}.welcome-cta__arrow{display:inline-flex;color:var(--interlink-pink)}.welcome-cta__arrow,.welcome-cta__arrow svg{width:1rem;height:1rem}.welcome-products{max-width:70rem;margin:0 auto 8rem;padding:0 1.25rem}#content .welcome-products__title{margin:2rem 0 1rem;text-align:center;font-size:var(--heading-03-size);line-height:var(--heading-03-line)}#content .welcome-products__title .welcome-products__title-accent{color:var(--interlink-pink)}.mobile-nav-tabs-item[href$=\"/agentic-api/getting-started/introduction\"]::after,.nav-tabs-item[href$=\"/agentic-api/getting-started/introduction\"]::after{content:\"BETA\";display:inline-block;margin-left:.375rem;padding:.125rem .375rem;font-size:.625rem;font-weight:600;line-height:1;letter-spacing:.04em;color:#de1a76;border:1px solid #de1a76;border-radius:.25rem;vertical-align:middle}"}],"page":{"pagePath":"platform-api/reference/query/v2-stats-query","slug":"/platform-api/reference/query/v2-stats-query","pageMetadata":{"openapi":"post /v2/query/stats","title":"v2 Stats Query","description":"For any query (JSON object) with question, audiences and filters in request body it responses with results for chart builder metrics according the query.","href":"/platform-api/reference/query/v2-stats-query"},"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: \"For any query (JSON object) with question, audiences and filters in request body it responses with results for chart builder metrics according the query.\"\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}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){return _jsx(_Fragment,{})}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":{"config":{},"pageMetadata":{"openapi":"post /v2/query/stats","title":"v2 Stats Query","description":"For any query (JSON object) with question, audiences and filters in request body it responses with results for chart builder metrics according the query.","href":"/platform-api/reference/query/v2-stats-query"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":["/docs/_mintlify/custom/gwi-c45e8f9c/7eece02f639a8407/intercom.js"],"openApiReferenceData":{"operation":{"operationId":"StatsQuery","tags":["Query"],"summary":"v2 Stats Query","description":"For any query (JSON object) with question, audiences and filters in request body it responses with results for chart builder metrics according the query.","requestBody":"97942570-5e15-40c0-ab3f-d82222bad737","security":["0e853abb-b976-47b3-94bc-ee4bcd7e2fbe"],"responses":{"200":"599c1e0b-cfc2-4c64-8bb3-029e9d6dfd46","400":"3d27006a-31e2-4080-bc97-68794a422045","401":"60a4c076-24a4-4c78-bebc-7393d5a5a85b","403":"11b0652f-70fd-456c-9d5e-c5947887b760","500":"e2bd24dd-8218-462a-89ac-53d0ae19146b"},"method":"post","type":"path","servers":["36a765c5-894d-4b0c-83c5-e6d9a57a3796"],"path":"/v2/query/stats","baseUrlOptions":["https://api.globalwebindex.com"],"title":"v2 Stats Query","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{},"requestBody":{"content":{"application/json":{"schema":{"type":"object","description":"Question, audiences and filters as parameters for chart builder metrics.","title":"Query","required":["question"],"properties":{"question":{"type":"string","description":"Question code to define datapoint scope.","example":"q20","isRequired":true,"uniqueKey":"question","typeLabel":"string"},"datapoints":{"type":"array","description":"Datapoint codes to limit scopes of interest.","items":{"type":"string","uniqueKey":"datapoints.items.[INDEX]","typeLabel":"string"},"example":["q20_3","q20_1","q20_5","q20_6","q20_7","q20_4","q20_2"],"uniqueKey":"datapoints","typeLabel":"string[]"},"suffixes":{"type":"array","description":"Suffixes to extend datapoint codes for more detailed responses.","items":{"type":"string","uniqueKey":"suffixes.items.[INDEX]","typeLabel":"string"},"example":["1","2","3"],"uniqueKey":"suffixes","typeLabel":"string[]"},"splitter":{"type":"string","description":"Either 'waves' or question code used to split results to segments.","example":"waves","uniqueKey":"splitter","typeLabel":"string"},"segments":{"type":"array","description":"List of wave codes, location codes or datapoint codes used to limit which segments scopes are created.","items":{"type":"string","uniqueKey":"segments.items.[INDEX]","typeLabel":"string"},"example":["q1_2019","q2_2019","q3_2019","q4_2019"],"uniqueKey":"segments","typeLabel":"string[]"},"segmented_base":{"type":"boolean","description":"Switch to use each segment as base scope when doing segmentation.","uniqueKey":"segmented_base","typeLabel":"boolean"},"audiences":{"type":"array","description":"List of audiences to scope question responses.","items":{"type":"object","description":"Wrapper structure containing AudienceExpression.","title":"Audience","properties":{"id":{"type":"string","example":"133","uniqueKey":"audiences.items.[INDEX].id","typeLabel":"string"},"name":{"type":"string","example":"my_audience","uniqueKey":"audiences.items.[INDEX].name","typeLabel":"string"},"expression":{"type":"object","description":"Flexible expression of audience scope.","title":"AudienceExpression","properties":{"and":{"type":"array","description":"List of sub-expressions to apply intersection of their scopes.","items":{"$circularRef":"d75be700-a365-464f-86b3-12a061c96a09"},"uniqueKey":"audiences.items.[INDEX].expression.and","typeLabel":"array"},"or":{"type":"array","description":"List of sub-expressions to apply union of their scopes.","items":{"$circularRef":"d75be700-a365-464f-86b3-12a061c96a09"},"uniqueKey":"audiences.items.[INDEX].expression.or","typeLabel":"array"},"not":{"type":"boolean","description":"To use negation of the expression.","uniqueKey":"audiences.items.[INDEX].expression.not","typeLabel":"boolean"},"question":{"type":"string","description":"Question code to define datapoint scope.","example":"q2","uniqueKey":"audiences.items.[INDEX].expression.question","typeLabel":"string"},"datapoints":{"type":"array","description":"Datapoint codes to limit scopes of interest.","items":{"type":"string","uniqueKey":"audiences.items.[INDEX].expression.datapoints.items.[INDEX]","typeLabel":"string"},"example":["q2_1","q2_2"],"uniqueKey":"audiences.items.[INDEX].expression.datapoints","typeLabel":"string[]"},"suffixes":{"type":"array","description":"Suffixes to extend datapoint codes for more detailed responses.","items":{"type":"string","uniqueKey":"audiences.items.[INDEX].expression.suffixes.items.[INDEX]","typeLabel":"string"},"example":["1","2","3"],"uniqueKey":"audiences.items.[INDEX].expression.suffixes","typeLabel":"string[]"},"min_count":{"type":"integer","description":"Minimal count of positive datapoints in one response.","example":1,"uniqueKey":"audiences.items.[INDEX].expression.min_count","typeLabel":"integer"}},"example":{"and":[{"question":"q2","datapoints":["q2_1","q2_2"],"min_count":1,"not":false},{"question":"q20","datapoints":["q20_2"],"min_count":1,"suffixes":["1","2","3"],"not":false}]},"uniqueKey":"audiences.items.[INDEX].expression","typeLabel":"AudienceExpression · object"}},"uniqueKey":"audiences.items.[INDEX]","typeLabel":"Audience · object"},"uniqueKey":"audiences","typeLabel":"Audience · object[]"},"locations":{"type":"array","description":"List of location codes to filter.","items":{"type":"string","uniqueKey":"locations.items.[INDEX]","typeLabel":"string"},"example":["s2_1","s2_44"],"uniqueKey":"locations","typeLabel":"string[]"},"waves":{"type":"array","description":"List of wave codes to filter.","items":{"type":"string","uniqueKey":"waves.items.[INDEX]","typeLabel":"string"},"example":["q1_2019","q2_2019","q3_2019","q4_2019"],"uniqueKey":"waves","typeLabel":"string[]"},"base_audience":{"type":"object","description":"Wrapper structure containing AudienceExpression.","title":"BaseAudience","properties":{"id":{"type":"string","example":"123","uniqueKey":"base_audience.id","typeLabel":"string"},"name":{"type":"string","example":"base_audience","uniqueKey":"base_audience.name","typeLabel":"string"},"expression":{"type":"object","description":"Flexible expression of audience scope.","title":"AudienceExpression","properties":{"and":{"type":"array","description":"List of sub-expressions to apply intersection of their scopes.","items":{"$circularRef":"d75be700-a365-464f-86b3-12a061c96a09"},"uniqueKey":"base_audience.expression.and","typeLabel":"array"},"or":{"type":"array","description":"List of sub-expressions to apply union of their scopes.","items":{"$circularRef":"d75be700-a365-464f-86b3-12a061c96a09"},"uniqueKey":"base_audience.expression.or","typeLabel":"array"},"not":{"type":"boolean","description":"To use negation of the expression.","uniqueKey":"base_audience.expression.not","typeLabel":"boolean"},"question":{"type":"string","description":"Question code to define datapoint scope.","example":"q2","uniqueKey":"base_audience.expression.question","typeLabel":"string"},"datapoints":{"type":"array","description":"Datapoint codes to limit scopes of interest.","items":{"type":"string","uniqueKey":"base_audience.expression.datapoints.items.[INDEX]","typeLabel":"string"},"example":["q2_1","q2_2"],"uniqueKey":"base_audience.expression.datapoints","typeLabel":"string[]"},"suffixes":{"type":"array","description":"Suffixes to extend datapoint codes for more detailed responses.","items":{"type":"string","uniqueKey":"base_audience.expression.suffixes.items.[INDEX]","typeLabel":"string"},"example":["1","2","3"],"uniqueKey":"base_audience.expression.suffixes","typeLabel":"string[]"},"min_count":{"type":"integer","description":"Minimal count of positive datapoints in one response.","example":1,"uniqueKey":"base_audience.expression.min_count","typeLabel":"integer"}},"example":{"and":[{"question":"q2","datapoints":["q2_1","q2_2"],"min_count":1,"not":false},{"question":"q20","datapoints":["q20_2"],"min_count":1,"suffixes":["1","2","3"],"not":false}]},"uniqueKey":"base_audience.expression","typeLabel":"AudienceExpression · object"}},"uniqueKey":"base_audience","typeLabel":"BaseAudience · object"}},"uniqueKey":"","typeLabel":"Query · object"},"examples":{"Example":{"title":"Example","value":{"question":"q20","datapoints":["q20_3","q20_1","q20_5","q20_6","q20_7","q20_4","q20_2"],"suffixes":["1","2","3"],"splitter":"waves","segments":["q1_2019","q2_2019","q3_2019","q4_2019"],"segmented_base":true,"audiences":[{"id":"133","name":"my_audience","expression":{"and":[{"question":"q2","datapoints":["q2_1","q2_2"],"min_count":1,"not":false},{"question":"q20","datapoints":["q20_2"],"min_count":1,"suffixes":["1","2","3"],"not":false}]}}],"locations":["s2_1","s2_44"],"waves":["q1_2019","q2_2019","q3_2019","q4_2019"],"base_audience":{"id":"123","name":"base_audience","expression":{"and":[{"question":"q2","datapoints":["q2_1","q2_2"],"min_count":1,"not":false},{"question":"q20","datapoints":["q20_2"],"min_count":1,"suffixes":["1","2","3"],"not":false}]}}}}},"exampleType":"generated"}},"description":"Chart builder query.","required":true,"exampleType":"generated"},"responses":{"599c1e0b-cfc2-4c64-8bb3-029e9d6dfd46":{"description":"Correct results for given query.","content":{"application/json":{"schema":{"type":"object","description":"Result of chart builder query","title":"QueryResults","required":["meta","data"],"properties":{"meta":{"type":"object","description":"Metadata for chart builder query result","title":"StatsQueryResultMetadata","required":["type","question"],"properties":{"type":{"type":"string","description":"Query type identifier.","enum":["DATAPOINTS","DATAPOINTS-SEGMENTS","DATAPOINTS-AUDIENCES","DATAPOINTS-SEGMENTS-AUDIENCES"],"example":"DATAPOINTS-SEGMENTS","isRequired":true,"uniqueKey":"meta.type","typeLabel":"enum\u003cstring>"},"question":{"type":"string","description":"Question code taken from requested query.","example":"q20","isRequired":true,"uniqueKey":"meta.question","typeLabel":"string"},"splitter":{"type":"string","description":"Splitter code taken from request query.","example":"waves","uniqueKey":"meta.splitter","typeLabel":"string"}},"isRequired":true,"uniqueKey":"meta","typeLabel":"StatsQueryResultMetadata · object"},"data":{"type":"array","description":"Collection of results of chart builder query","items":{"type":"object","description":"Result of chart builder query","title":"QueryResultsData","required":["datapoint","waves","metrics"],"properties":{"datapoint":{"type":"string","description":"Datapoint code taken from requested query.","example":"q20_3","isRequired":true,"uniqueKey":"data.items.[INDEX].datapoint","typeLabel":"string"},"waves":{"type":"array","description":"Codes of all waves which are positive for responses.","items":{"type":"string","uniqueKey":"data.items.[INDEX].waves.items.[INDEX]","typeLabel":"string"},"example":["q1_2019","q2_2019","q3_2019","q4_2019"],"isRequired":true,"uniqueKey":"data.items.[INDEX].waves","typeLabel":"string[]"},"metrics":{"type":"object","description":"Chart builder metrics returned for requested question.","title":"QueryResultMetrics","required":["positive_size","positive_sample","audience_index","audience_percentage","audience_sample","audience_size","datapoint_percentage","datapoint_sample","datapoint_size"],"properties":{"positive_size":{"type":"integer","description":"Final weighted universe in intersection of audience and datapoint scopes.","isRequired":true,"uniqueKey":"data.items.[INDEX].metrics.positive_size","typeLabel":"integer"},"positive_sample":{"type":"integer","description":"Final count of responses in intersection of audience and datapoint scopes.","isRequired":true,"uniqueKey":"data.items.[INDEX].metrics.positive_sample","typeLabel":"integer"},"audience_index":{"type":"number","description":"Likeliness ratio between audience and datapoint scopes.","isRequired":true,"uniqueKey":"data.items.[INDEX].metrics.audience_index","typeLabel":"number"},"audience_percentage":{"type":"number","description":"Ratio between audience with and without datapoint scope.","isRequired":true,"uniqueKey":"data.items.[INDEX].metrics.audience_percentage","typeLabel":"number"},"audience_sample":{"type":"integer","description":"Count of responses in audience without datapoint scope.","isRequired":true,"uniqueKey":"data.items.[INDEX].metrics.audience_sample","typeLabel":"integer"},"audience_size":{"type":"integer","description":"Weighted universe of audience without datapoint scope.","isRequired":true,"uniqueKey":"data.items.[INDEX].metrics.audience_size","typeLabel":"integer"},"datapoint_percentage":{"type":"number","description":"Ratio between datapoint with and without audience scope.","isRequired":true,"uniqueKey":"data.items.[INDEX].metrics.datapoint_percentage","typeLabel":"number"},"datapoint_sample":{"type":"integer","description":"Count of responses in datapoint without audience scope.","isRequired":true,"uniqueKey":"data.items.[INDEX].metrics.datapoint_sample","typeLabel":"integer"},"datapoint_size":{"type":"integer","description":"Weighted universe of datapoint without audience scope.","isRequired":true,"uniqueKey":"data.items.[INDEX].metrics.datapoint_size","typeLabel":"integer"}},"isRequired":true,"uniqueKey":"data.items.[INDEX].metrics","typeLabel":"QueryResultMetrics · object"},"segment":{"type":"string","description":"Segment code used to scope results.","example":"q1_2019","uniqueKey":"data.items.[INDEX].segment","typeLabel":"string"},"audience":{"type":"string","description":"Audience ID taken from requested query.","example":"133","uniqueKey":"data.items.[INDEX].audience","typeLabel":"string"},"suffixes":{"type":"array","description":"Suffixes to extend datapoint codes for more detailed responses.","items":{"type":"number","uniqueKey":"data.items.[INDEX].suffixes.items.[INDEX]","typeLabel":"number"},"example":[1,2,3],"uniqueKey":"data.items.[INDEX].suffixes","typeLabel":"number[]"}},"uniqueKey":"data.items.[INDEX]","typeLabel":"QueryResultsData · object"},"isRequired":true,"uniqueKey":"data","typeLabel":"QueryResultsData · object[]"}},"uniqueKey":"","typeLabel":"QueryResults · object"},"examples":{"Example":{"title":"Example","value":{"meta":{"type":"DATAPOINTS-SEGMENTS","question":"q20","splitter":"waves"},"data":[{"datapoint":"q20_3","waves":["q1_2019","q2_2019","q3_2019","q4_2019"],"metrics":{"positive_size":123,"positive_sample":123,"audience_index":123,"audience_percentage":123,"audience_sample":123,"audience_size":123,"datapoint_percentage":123,"datapoint_sample":123,"datapoint_size":123},"segment":"q1_2019","audience":"133","suffixes":[1,2,3]}]}}},"exampleType":"generated"}},"exampleType":"generated"},"3d27006a-31e2-4080-bc97-68794a422045":{"description":"Invalid query in request body.","content":{"application/json":{"schema":{"type":"object","description":"Something is wrong with request content.","title":"Error","required":["error","error_type","code"],"properties":{"error":{"type":"string","description":"Description.","example":"some_error","isRequired":true,"uniqueKey":"error","typeLabel":"string"},"error_type":{"type":"string","example":"empty_expression","description":"Machine readable representation of error.","isRequired":true,"uniqueKey":"error_type","typeLabel":"string"},"code":{"type":"integer","description":"Numeric representation of error.","example":400,"isRequired":true,"uniqueKey":"code","typeLabel":"integer"},"message":{"type":"string","description":"Human readable error message","example":"Message readable by customer.","uniqueKey":"message","typeLabel":"string"}},"uniqueKey":"","typeLabel":"Error · object"},"examples":{"Example":{"title":"Example","value":{"error":"some_error","error_type":"empty_expression","code":400,"message":"Message readable by customer."}}},"exampleType":"generated"}},"exampleType":"generated"},"60a4c076-24a4-4c78-bebc-7393d5a5a85b":{"description":"Auth bearer doesn't have permissions to access this endpoint.","content":{"application/json":{"schema":{"type":"object","description":"Something is wrong with request content.","title":"Error","required":["error","error_type","code"],"properties":{"error":{"type":"string","description":"Description.","example":"some_error","isRequired":true,"uniqueKey":"error","typeLabel":"string"},"error_type":{"type":"string","example":"empty_expression","description":"Machine readable representation of error.","isRequired":true,"uniqueKey":"error_type","typeLabel":"string"},"code":{"type":"integer","description":"Numeric representation of error.","example":400,"isRequired":true,"uniqueKey":"code","typeLabel":"integer"},"message":{"type":"string","description":"Human readable error message","example":"Message readable by customer.","uniqueKey":"message","typeLabel":"string"}},"uniqueKey":"","typeLabel":"Error · object"},"examples":{"Example":{"title":"Example","value":{"error":"some_error","error_type":"empty_expression","code":400,"message":"Message readable by customer."}}},"exampleType":"generated"}},"exampleType":"generated"},"11b0652f-70fd-456c-9d5e-c5947887b760":{"description":"Auth bearer doesn't have permissions to access some codes in requested query.","content":{"application/json":{"schema":{"type":"object","description":"Some content is not permitted.","title":"Error","required":["error","error_type","code"],"properties":{"error":{"type":"string","description":"Description.","example":"some_error","isRequired":true,"uniqueKey":"error","typeLabel":"string"},"error_type":{"type":"string","example":"empty_expression","description":"Machine readable representation of error.","isRequired":true,"uniqueKey":"error_type","typeLabel":"string"},"code":{"type":"integer","description":"Numeric representation of error.","example":403,"isRequired":true,"uniqueKey":"code","typeLabel":"integer"},"meta":{"type":"object","description":"Additional metadata to aid message/error strings","properties":{"forbidden_codes":{"type":"object","properties":{"questions":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","example":"q2","uniqueKey":"meta.forbidden_codes.questions.items.[INDEX].code","typeLabel":"string"},"datapoints":{"type":"array","items":{"type":"string","uniqueKey":"meta.forbidden_codes.questions.items.[INDEX].datapoints.items.[INDEX]","typeLabel":"string"},"example":["q1_1"],"uniqueKey":"meta.forbidden_codes.questions.items.[INDEX].datapoints","typeLabel":"string[]"},"origin":{"type":"string","example":"question","enum":["question","audience","splitter"],"uniqueKey":"meta.forbidden_codes.questions.items.[INDEX].origin","typeLabel":"enum\u003cstring>"}},"uniqueKey":"meta.forbidden_codes.questions.items.[INDEX]","typeLabel":"object"},"uniqueKey":"meta.forbidden_codes.questions","typeLabel":"object[]"},"locations":{"type":"array","items":{"type":"string","uniqueKey":"meta.forbidden_codes.locations.items.[INDEX]","typeLabel":"string"},"example":["s2_44"],"uniqueKey":"meta.forbidden_codes.locations","typeLabel":"string[]"},"waves":{"type":"array","items":{"type":"string","uniqueKey":"meta.forbidden_codes.waves.items.[INDEX]","typeLabel":"string"},"example":["q1_2019"],"uniqueKey":"meta.forbidden_codes.waves","typeLabel":"string[]"}},"uniqueKey":"meta.forbidden_codes","typeLabel":"object"}},"uniqueKey":"meta","typeLabel":"object"}},"uniqueKey":"","typeLabel":"Error · object"},"examples":{"Example":{"title":"Example","value":{"error":"some_error","error_type":"empty_expression","code":403,"meta":{"forbidden_codes":{"questions":[{"code":"q2","datapoints":["q1_1"],"origin":"question"}],"locations":["s2_44"],"waves":["q1_2019"]}}}}},"exampleType":"generated"}},"exampleType":"generated"},"e2bd24dd-8218-462a-89ac-53d0ae19146b":{"description":"Server is not able to give correct response.","content":{"application/json":{"schema":{"type":"object","description":"Something is wrong with request content.","title":"Error","required":["error","error_type","code"],"properties":{"error":{"type":"string","description":"Description.","example":"some_error","isRequired":true,"uniqueKey":"error","typeLabel":"string"},"error_type":{"type":"string","example":"empty_expression","description":"Machine readable representation of error.","isRequired":true,"uniqueKey":"error_type","typeLabel":"string"},"code":{"type":"integer","description":"Numeric representation of error.","example":400,"isRequired":true,"uniqueKey":"code","typeLabel":"integer"},"message":{"type":"string","description":"Human readable error message","example":"Message readable by customer.","uniqueKey":"message","typeLabel":"string"}},"uniqueKey":"","typeLabel":"Error · object"},"examples":{"Example":{"title":"Example","value":{"error":"some_error","error_type":"empty_expression","code":400,"message":"Message readable by customer."}}},"exampleType":"generated"}},"exampleType":"generated"}},"security":{"0e853abb-b976-47b3-94bc-ee4bcd7e2fbe":{"ApiKeyAuth":{"in":"header","name":"Authorization","type":"apiKey","scopes":[]}}},"servers":{"36a765c5-894d-4b0c-83c5-e6d9a57a3796":{"url":"https://api.globalwebindex.com"}},"schemas":{"d75be700-a365-464f-86b3-12a061c96a09":{"type":"object","description":"Flexible expression of audience scope.","title":"AudienceExpression","properties":{"and":{"type":"array","description":"List of sub-expressions to apply intersection of their scopes.","items":{"$circularRef":"d75be700-a365-464f-86b3-12a061c96a09"}},"or":{"type":"array","description":"List of sub-expressions to apply union of their scopes.","items":{"$circularRef":"d75be700-a365-464f-86b3-12a061c96a09"}},"not":{"type":"boolean","description":"To use negation of the expression."},"question":{"type":"string","description":"Question code to define datapoint scope.","example":"q2"},"datapoints":{"type":"array","description":"Datapoint codes to limit scopes of interest.","items":{"type":"string"},"example":["q2_1","q2_2"]},"suffixes":{"type":"array","description":"Suffixes to extend datapoint codes for more detailed responses.","items":{"type":"string"},"example":["1","2","3"]},"min_count":{"type":"integer","description":"Minimal count of positive datapoints in one response.","example":1}},"example":{"and":[{"question":"q2","datapoints":["q2_1","q2_2"],"min_count":1,"not":false},{"question":"q20","datapoints":["q20_2"],"min_count":1,"suffixes":["1","2","3"],"not":false}]}}},"processedSecurityOptions":[{"schemes":[{"scheme":{"in":"header","name":"Authorization","type":"apiKey","scopes":[]},"schema":{"title":"Authorization","type":"string","isRequired":true,"typeLabel":"string","deprecated":false},"schemeName":"ApiKeyAuth","name":"Authorization"}],"title":"ApiKeyAuth"}]},"originalFileLocation":"openapi/platform/stats-query.json"},"subdomain":"gwi-c45e8f9c","siteName":"GWI","title":"v2 Stats Query - GWI","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-01-22T08:13:14.613Z","originalFileLocation":"platform-api/reference/query/v2-stats-query.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=\"For any query (JSON object) with question, audiences and filters in request body it responses with results for chart builder metrics according the query.\">\u003cmeta data-mint-head name=\"application-name\" content=\"GWI\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/gwi-c45e8f9c/oBgVByFDlWXV_1GQ/_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=\"/docs/mintlify-assets/_mintlify/favicons/gwi-c45e8f9c/oBgVByFDlWXV_1GQ/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/gwi-c45e8f9c/oBgVByFDlWXV_1GQ/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/gwi-c45e8f9c/oBgVByFDlWXV_1GQ/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/gwi-c45e8f9c/oBgVByFDlWXV_1GQ/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/gwi-c45e8f9c/oBgVByFDlWXV_1GQ/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/gwi-c45e8f9c/oBgVByFDlWXV_1GQ/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/gwi-c45e8f9c/oBgVByFDlWXV_1GQ/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/gwi-c45e8f9c/oBgVByFDlWXV_1GQ/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"v2 Stats Query - GWI\">\u003cmeta data-mint-head property=\"og:description\" content=\"For any query (JSON object) with question, audiences and filters in request body it responses with results for chart builder metrics according the query.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"GWI\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://api.globalwebindex.com/docs/platform-api/reference/query/v2-stats-query\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://gwi-c45e8f9c.mintlify.app/_mintlify/api/og/v2?division=Query\u0026amp;title=v2+Stats+Query\u0026amp;description=For+any+query+%28JSON+object%29+with+question%2C+audiences+and+filters+in+request+body+it+responses+with+results+for+chart+builder+metrics+according+the+query.\u0026amp;theme=a83061f226f177a4b50a34ba\u0026amp;signature=23b689ffd42fc4780ff5c283cb28820c1a5ab4f3bc6e30ea6c9073996dfe7a5d\">\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=\"v2 Stats Query - GWI\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"For any query (JSON object) with question, audiences and filters in request body it responses with results for chart builder metrics according the query.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://gwi-c45e8f9c.mintlify.app/_mintlify/api/og/v2?division=Query\u0026amp;title=v2+Stats+Query\u0026amp;description=For+any+query+%28JSON+object%29+with+question%2C+audiences+and+filters+in+request+body+it+responses+with+results+for+chart+builder+metrics+according+the+query.\u0026amp;theme=a83061f226f177a4b50a34ba\u0026amp;signature=23b689ffd42fc4780ff5c283cb28820c1a5ab4f3bc6e30ea6c9073996dfe7a5d\">\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=\"/docs/mintlify-assets/_mintlify/favicons/gwi-c45e8f9c/oBgVByFDlWXV_1GQ/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"GWI\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#ff0077\">\u003clink data-mint-head rel=\"canonical\" href=\"https://api.globalwebindex.com/docs/platform-api/reference/query/v2-stats-query\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/docs/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/docs/platform-api/reference/query/v2-stats-query.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://api.globalwebindex.com/#organization\",\"name\":\"GWI\",\"url\":\"https://api.globalwebindex.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/gwi-c45e8f9c/BSqEeFQj4tSRrE6v/assets/logo/light.png?fit=max\u0026auto=format\u0026n=BSqEeFQj4tSRrE6v\u0026q=85\u0026s=154d7100bcdc6ea8c52c5ba9d575d865\"}},{\"@type\":\"WebSite\",\"@id\":\"https://api.globalwebindex.com/docs#website\",\"name\":\"GWI\",\"url\":\"https://api.globalwebindex.com/docs\",\"publisher\":{\"@id\":\"https://api.globalwebindex.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://api.globalwebindex.com/docs/platform-api/reference/query/v2-stats-query#webpage\",\"url\":\"https://api.globalwebindex.com/docs/platform-api/reference/query/v2-stats-query\",\"name\":\"v2 Stats Query\",\"description\":\"For any query (JSON object) with question, audiences and filters in request body it responses with results for chart builder metrics according the query.\",\"dateModified\":\"2026-01-22T08:13:14.613Z\",\"isPartOf\":{\"@id\":\"https://api.globalwebindex.com/docs#website\"},\"breadcrumb\":{\"@id\":\"https://api.globalwebindex.com/docs/platform-api/reference/query/v2-stats-query#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://api.globalwebindex.com/docs/platform-api/reference/query/v2-stats-query#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Platform API\",\"item\":\"https://api.globalwebindex.com/docs/platform-api/reference/audiences/v2-audience-detail\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Reference\",\"item\":\"https://api.globalwebindex.com/docs/platform-api/reference/audiences/v2-audience-detail\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Query\",\"item\":\"https://api.globalwebindex.com/docs/platform-api/reference/query/v2-audience-wave-counts-query\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"v2 Stats Query\",\"item\":\"https://api.globalwebindex.com/docs/platform-api/reference/query/v2-stats-query\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://api.globalwebindex.com/docs/platform-api/reference/query/v2-stats-query#apireference\",\"headline\":\"v2 Stats Query\",\"name\":\"v2 Stats Query\",\"description\":\"For any query (JSON object) with question, audiences and filters in request body it responses with results for chart builder metrics according the query.\",\"url\":\"https://api.globalwebindex.com/docs/platform-api/reference/query/v2-stats-query\",\"mainEntityOfPage\":{\"@id\":\"https://api.globalwebindex.com/docs/platform-api/reference/query/v2-stats-query#webpage\"},\"dateModified\":\"2026-01-22T08:13:14.613Z\",\"publisher\":{\"@id\":\"https://api.globalwebindex.com/#organization\"},\"isPartOf\":{\"@id\":\"https://api.globalwebindex.com/docs#website\"}}]}\u003c/script>","siteName":"GWI","nav":{"global":null,"tabs":[{"tab":"Welcome","pages":[{"title":"Welcome","href":"/welcome"}]},{"tab":"GWI Overview","pages":[{"title":"GWI Overview","href":"/overview/gwi"}]},{"tab":"Spark in AI assistants","pages":[{"title":"Spark in AI assistants","href":"/spark-in-ai-assistants/introduction"}]},{"tab":"Spark API","pages":[{"title":"Spark API","href":"/spark-api/getting-started/introduction"}]},{"tab":"Agentic API","pages":[{"title":"Agentic API","href":"/agentic-api/getting-started/introduction"}]},{"tab":"Spark MCP","versions":[{"version":"v1","default":true,"tag":"Current","groups":[{"group":"Getting started","pages":[{"title":"Introduction","href":"/spark-mcp/getting-started/introduction"},{"title":"Prerequisites","href":"/spark-mcp/getting-started/prerequisites"},{"title":"Authorization","href":"/spark-mcp/getting-started/authorization"},{"group":"Integration Guide","pages":[{"title":"Overview","href":"/spark-mcp/integration-guide/overview"},{"title":"MCP Server","href":"/spark-mcp/integration-guide/mcp-api"},{"title":"MCP Remote","href":"/spark-mcp/integration-guide/mcp-remote"},{"group":"Claude","pages":[{"title":"Custom connector","href":"/spark-mcp/integration-guide/claude/custom-connector"},{"title":"Desktop extension","href":"/spark-mcp/integration-guide/claude/desktop-extension"}]},{"group":"ChatGPT","pages":[{"title":"Custom connector","href":"/spark-mcp/integration-guide/chatgpt/custom-connector"}]},{"title":"Codex CLI","href":"/spark-mcp/integration-guide/codex/guide"},{"title":"Copilot Studio","href":"/spark-mcp/integration-guide/copilot-studio/custom-connector"},{"title":"Gemini Enterprise","href":"/spark-mcp/integration-guide/gemini-enterprise/v1"},{"title":"Google Gemini CLI","href":"/spark-mcp/integration-guide/gemini-cli/guide"},{"title":"Cursor","href":"/spark-mcp/integration-guide/cursor/guide"},{"title":"Slack-Slackbot ","href":"/spark-mcp/integration-guide/slack/slack"}]}]},{"group":"Spark MCP","pages":[{"title":"Changelog","href":"/spark-mcp/changelog"},{"group":"Reference","pages":[{"group":"MCP Tools","pages":[{"openapi":"post /v1/spark-api/mcp","title":"Execute GWI MCP tool calls","href":"/spark-mcp/reference/mcp-tools/execute-gwi-mcp-tool-calls"}]}]}]}]},{"version":"v2beta","tag":"Beta","pages":[{"title":"v2beta","href":"/spark-mcp/v2beta/getting-started/introduction"}]}]},{"tab":"Platform API","groups":[{"group":"Getting started","pages":[{"title":"Introduction","href":"/platform-api/getting-started/introduction"},{"title":"Prerequisites","href":"/platform-api/getting-started/prerequisites"},{"title":"Rules of our API","href":"/platform-api/rules-of-our-api"},{"title":"Working with Multiple Data Sets","href":"/platform-api/getting-started/working-with-multiple-data-sets"},{"group":"Quickstarts","pages":[{"group":"Basic Query","pages":[{"title":"Step 1: Authorization","href":"/platform-api/getting-started/authorization"},{"title":"Step 2: Understanding GWI's Data Structure","href":"/platform-api/getting-started/gwi-data-structure"},{"title":"Step 3: Find the Question You Need","href":"/platform-api/getting-started/find-question"},{"title":"Step 4: Access Categories in the GWI Core namespace","href":"/platform-api/getting-started/access-categories"},{"title":"Step 5: Retrieve Subcategories","href":"/platform-api/getting-started/retrieve-subcategories"},{"title":"Step 6: Retrieve Questions in the Subcategory","href":"/platform-api/getting-started/questions-from-subcategory"},{"title":"Step 7: Query Data for the Question","href":"/platform-api/getting-started/query-data"}]},{"group":"Advanced Filtering","pages":[{"title":"Further Refining Your Query ","href":"/platform-api/quickstart-guide-continued/advanced-filtering"},{"title":"Step 1: Understanding Namespaces","href":"/platform-api/quickstart-guide-continued/understanding-namespaces"},{"title":"Step 2: Filter by Waves","href":"/platform-api/quickstart-guide-continued/filter-by-waves"},{"title":"Step 3: Filter by Locations","href":"/platform-api/quickstart-guide-continued/filter-by-locations"},{"title":"Step 4: Filter by Splitters","href":"/platform-api/quickstart-guide-continued/apply-splitter"},{"title":"Step 5: Combine Filters in a Stats Query","href":"/platform-api/quickstart-guide-continued/stats-query"},{"title":"Step 6: Interpret the Results","href":"/platform-api/quickstart-guide-continued/interpret-results"}]}]}]},{"group":"Use Cases","pages":[{"title":"Find the Right Question","href":"/platform-api/use-cases/find-question"},{"title":"Create Audiences","href":"/platform-api/use-cases/create-audiences"},{"title":"Apply Audiences","href":"/platform-api/use-cases/apply-audiences"},{"title":"Create Crosstabs","href":"/platform-api/use-cases/create-crosstabs"},{"title":"Compare Results by Location","href":"/platform-api/use-cases/compare-by-location"},{"title":"Examine Trends over Time","href":"/platform-api/use-cases/trends-over-time"}]},{"group":"Transition from V1 to V2 API","pages":[{"title":null,"href":"/platform-api/transition-guide/guide"}]},{"group":"Platform API","pages":[{"group":"Reference","pages":[{"group":"Audiences","pages":[{"openapi":"get /v2/saved/audiences/{id}","title":"v2 Audience Detail","href":"/platform-api/reference/audiences/v2-audience-detail"},{"openapi":"post /v2/saved/audiences","title":"v2 Create Audience","href":"/platform-api/reference/audiences/v2-create-audience"},{"openapi":"delete /v2/saved/audiences/{id}","title":"v2 Delete Audience","href":"/platform-api/reference/audiences/v2-delete-audience"},{"openapi":"post /v2/saved/audiences/filter","title":"v2 Filter Audiences","href":"/platform-api/reference/audiences/v2-filter-audiences"},{"openapi":"get /v2/saved/audiences","title":"v2 List Audiences","href":"/platform-api/reference/audiences/v2-list-audiences"},{"openapi":"put /v2/saved/audiences/{id}/public","title":"v2 Make Audience Public","href":"/platform-api/reference/audiences/v2-make-audience-public"},{"openapi":"put /v2/saved/audiences/{id}","title":"v2 Replace Audience","href":"/platform-api/reference/audiences/v2-replace-audience"},{"openapi":"patch /v2/saved/audiences/{id}","title":"v2 Update Audience","href":"/platform-api/reference/audiences/v2-update-audience"}]},{"group":"Authorization","pages":[{"openapi":"get /v2/token/validate","title":null,"href":"/platform-api/reference/authorization/get-v2tokenvalidate"}]},{"group":"Categories","pages":[{"openapi":"post /v2/categories/filter","title":"v2 Categories Filter","href":"/platform-api/reference/categories/v2-categories-filter"},{"openapi":"get /v2/categories/{category_id}","title":"v2 Category Detail","href":"/platform-api/reference/categories/v2-category-detail"}]},{"group":"Charts","pages":[{"openapi":"post /v1/charts/{id}/calculate","title":"v1 Calculate Chart Metrics","href":"/platform-api/reference/charts/v1-calculate-chart-metrics"},{"openapi":"get /v1/charts/{id}","title":"v1 Chart Detail","href":"/platform-api/reference/charts/v1-chart-detail"},{"openapi":"post /v1/charts/search","title":"v1 Charts Search","href":"/platform-api/reference/charts/v1-charts-search"},{"openapi":"post /v1/charts","title":"v1 Create Chart","href":"/platform-api/reference/charts/v1-create-chart"},{"openapi":"delete /v1/charts","title":"v1 Delete Charts","href":"/platform-api/reference/charts/v1-delete-charts"},{"openapi":"post /v1/charts/{id}/duplicate","title":"v1 Duplicate Chart","href":"/platform-api/reference/charts/v1-duplicate-chart"},{"openapi":"get /v1/charts","title":"v1 List Charts","href":"/platform-api/reference/charts/v1-list-charts"},{"openapi":"put /v1/charts/{id}/rename","title":"v1 Rename Chart","href":"/platform-api/reference/charts/v1-rename-chart"},{"openapi":"put /v1/charts/{id}","title":"v1 Update Chart","href":"/platform-api/reference/charts/v1-update-chart"}]},{"group":"Crosstabs","pages":[{"openapi":"post /v2/saved/crosstabs","title":"v2 Create Crosstab","href":"/platform-api/reference/crosstabs/v2-create-crosstab"},{"openapi":"get /v2/saved/crosstabs/{uuid}","title":"v2 Crosstab Detail","href":"/platform-api/reference/crosstabs/v2-crosstab-detail"},{"openapi":"delete /v2/saved/crosstabs/{uuid}","title":"v2 Delete Crosstab","href":"/platform-api/reference/crosstabs/v2-delete-crosstab"},{"openapi":"get /v2/saved/crosstabs","title":"v2 List Crosstabs","href":"/platform-api/reference/crosstabs/v2-list-crosstabs"},{"openapi":"put /v2/saved/crosstabs/{uuid}","title":"v2 Replace Crosstab","href":"/platform-api/reference/crosstabs/v2-replace-crosstab"},{"openapi":"patch /v2/saved/crosstabs/{uuid}","title":"v2 Update crosstab","href":"/platform-api/reference/crosstabs/v2-update-crosstab"}]},{"group":"Insights","pages":[{"openapi":"get /v3/insights/categories","title":"v3 Categories","href":"/platform-api/reference/insights/v3-categories"},{"openapi":"get /v3/insights/{id}","title":"v3 Insight Detail","href":"/platform-api/reference/insights/v3-insight-detail"},{"openapi":"get /v3/insights/{id}/download_url","title":"v3 Insight Download URL","href":"/platform-api/reference/insights/v3-insight-download-url"},{"openapi":"post /v3/insights/filter","title":"v3 Insights Filter","href":"/platform-api/reference/insights/v3-insights-filter"},{"openapi":"post /v3/insights/search","title":"v3 Insights Search","href":"/platform-api/reference/insights/v3-insights-search"},{"openapi":"get /v3/insights/{id}/related","title":"v3 Related Insights","href":"/platform-api/reference/insights/v3-related-insights"}]},{"group":"Locations","pages":[{"openapi":"post /v2/locations/filter","title":"v2 Locations Filter","href":"/platform-api/reference/locations/v2-locations-filter"}]},{"group":"Namespaces","pages":[{"openapi":"post /v2/namespaces/filter","title":"v2 Namespaces Filter","href":"/platform-api/reference/namespaces/v2-namespaces-filter"}]},{"group":"Query","pages":[{"openapi":"post /v2/query/audience_wave_counts","title":"v2 Audience Wave Counts Query","href":"/platform-api/reference/query/v2-audience-wave-counts-query"},{"openapi":"post /v2/query/crosstab","title":"v2 Crosstab Bulk Query","href":"/platform-api/reference/query/v2-crosstab-bulk-query"},{"openapi":"post /v2/query/intersection","title":"v2 Crosstab Cell Query","description":"For any query (JSON object) with audiences and filters in request body it gives back a response with results for specific Crosstab metrics according to the query.","href":"/platform-api/reference/query/v2-crosstab-cell-query"},{"openapi":"post /v2/query/stats","title":"v2 Stats Query","href":"/platform-api/reference/query/v2-stats-query"},{"openapi":"post /v3/query/audience_wave_counts","title":"v3 Audience Wave Counts Query","description":"Returns sample for waves.","href":"/platform-api/reference/query/v3-audience-wave-counts-query"}]},{"group":"Questions","pages":[{"openapi":"get /v2/questions/{question_code}","title":"v2 Question Detail","href":"/platform-api/reference/questions/v2-question-detail"},{"openapi":"post /v2/questions/filter","title":"v2 Questions Filter","href":"/platform-api/reference/questions/v2-questions-filter"},{"openapi":"post /v3/questions/filter","title":"v3 Questions Filter","href":"/platform-api/reference/questions/v3-questions-filter"},{"openapi":"post /v3/questions/search","title":"v3 Questions Search","href":"/platform-api/reference/questions/v3-questions-search"}]},{"group":"Splitters","pages":[{"openapi":"post /v2/splitters/filter","title":"v2 Splitters filter","href":"/platform-api/reference/splitters/v2-splitters-filter"}]},{"group":"Taxonomy","pages":[{"openapi":"get /v3/taxonomy","title":"v3 Taxonomy","href":"/platform-api/reference/taxonomy/v3-taxonomy"}]},{"group":"Waves","pages":[{"openapi":"post /v2/waves/filter","title":"v2 Waves Filter","href":"/platform-api/reference/waves/v2-waves-filter"}]}]}]}]},{"tab":"Dictionary","pages":[{"title":"Dictionary","href":"/dictionary/dictionary"}]}]},"basePath":"","title":"v2 Stats Query - GWI","buildId":"dpl_6cCEiK8XNNvaLBBkWzcBhdE9QfLC","deploymentId":"dpl_6cCEiK8XNNvaLBBkWzcBhdE9QfLC","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-CLz2_Z5D.js","utils-7A5jZhOT.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-BVWmkKuv.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-4SOfrh0F.js","snippetPresets-CMc8KicP.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","ApiExamples-Ba9tX7z3.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-Be8krXvv.js","shallow-CBC3K1uB.js","getApiPlaygroundDisplay-4tKcUAYo.js","CodeSnippet-C1Xa06ft.js","CodeSnippets-vqiz27A_.js","Page-DeQN5MDd.js","getPastedJson-NUwRfM32.js","icon-DkIVqWh9.js","MethodPill-qmhT7_wz.js","DuplicateIcon-_gWp1vhn.js","createIcon-NA1p_TVA.js","DynamicMarkdown-Bas9A7wq.js","SectionHeading-a1cS-24U.js","axios-vUo_bRtp.js","Markdown-D3ZTwq_a.js","clsx-BcghKhHb.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-B66mVNPp.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-DmooSyTN.js"]}