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 Cell 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
/
intersection
curl --request POST \
--url https://api.globalwebindex.com/v2/query/intersection \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '{
"audiences": {
"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
}
]
}
},
"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
}
]
}
}
},
"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
}
]
}
}
}'
{
"meta": {
"type": "INTERSECTION"
},
"data": {
"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 builder query.
Audiences and filters as parameters for Crosstab Builder metrics.
Response
200
application/json
Correct results for given query.
Result of crosstab builder query.
curl --request POST \
--url https://api.globalwebindex.com/v2/query/intersection \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '{
"audiences": {
"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
}
]
}
},
"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
}
]
}
}
},
"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
}
]
}
}
}'
{
"meta": {
"type": "INTERSECTION"
},
"data": {
"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.