Getting started
- Introduction
- Prerequisites
- Rules of our API
- Quickstarts
Transition from V1 to V2 API
Platform API
- Reference
- Audiences
- Authorization
- Categories
- Crosstabs
- Insights
- Locations
- Namespaces
- Query
- Questions
- Splitters
- Taxonomy
- Waves
Query
v2 Crosstab Bulk Query
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.
POST
/
v2
/
query
/
crosstab
Copy
Ask AI
curl --request POST \
--url https://api.globalwebindex.com/v2/query/crosstab \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '{
"columns": [
{
"id": "134",
"name": "my_audience",
"expression": {
"and": [
{
"question": "q2",
"datapoints": [
"q2_1",
"q2_2"
],
"min_count": 1,
"not": false
},
{
"question": "q6",
"datapoints": [
"q6_2"
],
"min_count": 1,
"not": false
}
]
}
}
],
"rows": [
{
"id": "133",
"name": "my_audience",
"expression": {
"and": [
{
"question": "q2",
"datapoints": [
"q2_1",
"q2_2"
],
"min_count": 1,
"not": false
},
{
"question": "q6",
"datapoints": [
"q6_2"
],
"min_count": 1,
"not": false
}
]
}
}
],
"locations": [
"s2_1",
"s2_44"
],
"waves": [
"q1_2019",
"q2_2019",
"q3_2019",
"q4_2019"
],
"base_audience": {
"id": "135",
"name": "my_audience",
"expression": {
"and": [
{
"question": "q2",
"datapoints": [
"q2_1",
"q2_2"
],
"min_count": 1,
"not": false
},
{
"question": "q6",
"datapoints": [
"q6_2"
],
"min_count": 1,
"not": false
}
]
}
}
}'
Copy
Ask AI
{
"row": {
"id": "133",
"name": "my_audience",
"expression": {
"and": [
{
"question": "q2",
"datapoints": [
"q2_1",
"q2_2"
],
"min_count": 1,
"not": false
},
{
"question": "q6",
"datapoints": [
"q6_2"
],
"min_count": 1,
"not": false
}
]
}
},
"row_index": 123,
"column": {
"id": "134",
"name": "my_audience",
"expression": {
"and": [
{
"question": "q2",
"datapoints": [
"q2_1",
"q2_2"
],
"min_count": 1,
"not": false
},
{
"question": "q6",
"datapoints": [
"q6_2"
],
"min_count": 1,
"not": false
}
]
}
},
"column_index": 123,
"audiences": {
"row": {
"audience": "<string>",
"size": 123,
"sample": 123,
"percentage": 123,
"intersect_percentage": 123
},
"column": {
"audience": "<string>",
"size": 123,
"sample": 123,
"percentage": 123,
"intersect_percentage": 123
}
},
"base": {
"size": 123,
"sample": 123
},
"intersect": {
"size": 123,
"sample": 123,
"percentage": 123,
"index": 123
}
}
Authorizations
Body
application/json
Crosstab query.
Audiences and filters as parameters for Crosstab Builder metrics.
Response
200
application/json-seq
Unordered stream of query responses as json objects.
Result for an intersection of row and column audiences identified by its index starting from 0.
Was this page helpful?
Copy
Ask AI
curl --request POST \
--url https://api.globalwebindex.com/v2/query/crosstab \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '{
"columns": [
{
"id": "134",
"name": "my_audience",
"expression": {
"and": [
{
"question": "q2",
"datapoints": [
"q2_1",
"q2_2"
],
"min_count": 1,
"not": false
},
{
"question": "q6",
"datapoints": [
"q6_2"
],
"min_count": 1,
"not": false
}
]
}
}
],
"rows": [
{
"id": "133",
"name": "my_audience",
"expression": {
"and": [
{
"question": "q2",
"datapoints": [
"q2_1",
"q2_2"
],
"min_count": 1,
"not": false
},
{
"question": "q6",
"datapoints": [
"q6_2"
],
"min_count": 1,
"not": false
}
]
}
}
],
"locations": [
"s2_1",
"s2_44"
],
"waves": [
"q1_2019",
"q2_2019",
"q3_2019",
"q4_2019"
],
"base_audience": {
"id": "135",
"name": "my_audience",
"expression": {
"and": [
{
"question": "q2",
"datapoints": [
"q2_1",
"q2_2"
],
"min_count": 1,
"not": false
},
{
"question": "q6",
"datapoints": [
"q6_2"
],
"min_count": 1,
"not": false
}
]
}
}
}'
Copy
Ask AI
{
"row": {
"id": "133",
"name": "my_audience",
"expression": {
"and": [
{
"question": "q2",
"datapoints": [
"q2_1",
"q2_2"
],
"min_count": 1,
"not": false
},
{
"question": "q6",
"datapoints": [
"q6_2"
],
"min_count": 1,
"not": false
}
]
}
},
"row_index": 123,
"column": {
"id": "134",
"name": "my_audience",
"expression": {
"and": [
{
"question": "q2",
"datapoints": [
"q2_1",
"q2_2"
],
"min_count": 1,
"not": false
},
{
"question": "q6",
"datapoints": [
"q6_2"
],
"min_count": 1,
"not": false
}
]
}
},
"column_index": 123,
"audiences": {
"row": {
"audience": "<string>",
"size": 123,
"sample": 123,
"percentage": 123,
"intersect_percentage": 123
},
"column": {
"audience": "<string>",
"size": 123,
"sample": 123,
"percentage": 123,
"intersect_percentage": 123
}
},
"base": {
"size": 123,
"sample": 123
},
"intersect": {
"size": 123,
"sample": 123,
"percentage": 123,
"index": 123
}
}
Assistant
Responses are generated using AI and may contain mistakes.