Explore survey questions
curl --request POST \
--url https://api.globalwebindex.com/v2/spark-api/taxonomy/explore \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"prompt": "social media usage",
"location_codes": [
"s2_44"
],
"wave_codes": [
"q1_2025"
]
}
'import requests
url = "https://api.globalwebindex.com/v2/spark-api/taxonomy/explore"
payload = {
"prompt": "social media usage",
"location_codes": ["s2_44"],
"wave_codes": ["q1_2025"]
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
prompt: 'social media usage',
location_codes: ['s2_44'],
wave_codes: ['q1_2025']
})
};
fetch('https://api.globalwebindex.com/v2/spark-api/taxonomy/explore', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.globalwebindex.com/v2/spark-api/taxonomy/explore",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'prompt' => 'social media usage',
'location_codes' => [
's2_44'
],
'wave_codes' => [
'q1_2025'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.globalwebindex.com/v2/spark-api/taxonomy/explore"
payload := strings.NewReader("{\n \"prompt\": \"social media usage\",\n \"location_codes\": [\n \"s2_44\"\n ],\n \"wave_codes\": [\n \"q1_2025\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.globalwebindex.com/v2/spark-api/taxonomy/explore")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"prompt\": \"social media usage\",\n \"location_codes\": [\n \"s2_44\"\n ],\n \"wave_codes\": [\n \"q1_2025\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.globalwebindex.com/v2/spark-api/taxonomy/explore")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"prompt\": \"social media usage\",\n \"location_codes\": [\n \"s2_44\"\n ],\n \"wave_codes\": [\n \"q1_2025\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"dataset": {
"code": "ds-core",
"name": "GWI Core",
"is_simulated": false
},
"audiences": [],
"questions": [
{
"label": "Named Social Media Services Used",
"description": "How often do you visit or use these services?",
"is_simulated": false
},
{
"label": "Short video consumption in last month",
"description": "Short video consumption in last month",
"is_simulated": false
},
{
"label": "Number of Social Media Services Used",
"description": "This data is auto-generated based on responses to the Social Media Services Used question",
"is_simulated": false
}
],
"attributes": [
{
"text": "I am using social media less.",
"is_simulated": false
},
{
"text": "I use social media when watching TV online.",
"is_simulated": false
},
{
"text": "I use social media to find content.",
"is_simulated": false
},
{
"text": "I use social media to see what's trending and being talked about.",
"is_simulated": false
}
],
"message": ""
}{
"type": "https://api.globalwebindex.com/docs/spark-api/problems/invalid-request",
"title": "Invalid request",
"status": 400,
"detail": "invalid JSON body: unexpected end of JSON input",
"instance": "/v2/spark-api/audiences/search"
}{
"message": "Unauthorized"
}{
"type": "https://api.globalwebindex.com/docs/spark-api/problems/access-denied",
"title": "Access denied",
"status": 403,
"detail": "dataset access denied",
"instance": "/v2/spark-api/global-filters"
}{
"message": "Request Entity Too Large"
}{
"type": "https://api.globalwebindex.com/docs/spark-api/problems/invalid-params",
"title": "Invalid parameters",
"status": 422,
"detail": "could not validate input: prompt should be a non empty string",
"instance": "/v2/spark-api/global-filters"
}{
"type": "https://api.globalwebindex.com/docs/spark-api/problems/internal",
"title": "Internal server error",
"status": 500,
"detail": "There was an error processing your request. Please try again later.",
"instance": "/v2/spark-api/insights/generate"
}{
"type": "https://api.globalwebindex.com/docs/spark-api/problems/timeout",
"title": "Request timeout",
"status": 504,
"detail": "service is taking longer than usual to respond: please try again in a few moments",
"instance": "/v2/spark-api/insights/generate"
}Taxonomy
Explore survey questions
Finds the survey questions and attributes that match a topic.
POST
/
v2
/
spark-api
/
taxonomy
/
explore
Explore survey questions
curl --request POST \
--url https://api.globalwebindex.com/v2/spark-api/taxonomy/explore \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"prompt": "social media usage",
"location_codes": [
"s2_44"
],
"wave_codes": [
"q1_2025"
]
}
'import requests
url = "https://api.globalwebindex.com/v2/spark-api/taxonomy/explore"
payload = {
"prompt": "social media usage",
"location_codes": ["s2_44"],
"wave_codes": ["q1_2025"]
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
prompt: 'social media usage',
location_codes: ['s2_44'],
wave_codes: ['q1_2025']
})
};
fetch('https://api.globalwebindex.com/v2/spark-api/taxonomy/explore', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.globalwebindex.com/v2/spark-api/taxonomy/explore",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'prompt' => 'social media usage',
'location_codes' => [
's2_44'
],
'wave_codes' => [
'q1_2025'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.globalwebindex.com/v2/spark-api/taxonomy/explore"
payload := strings.NewReader("{\n \"prompt\": \"social media usage\",\n \"location_codes\": [\n \"s2_44\"\n ],\n \"wave_codes\": [\n \"q1_2025\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.globalwebindex.com/v2/spark-api/taxonomy/explore")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"prompt\": \"social media usage\",\n \"location_codes\": [\n \"s2_44\"\n ],\n \"wave_codes\": [\n \"q1_2025\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.globalwebindex.com/v2/spark-api/taxonomy/explore")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"prompt\": \"social media usage\",\n \"location_codes\": [\n \"s2_44\"\n ],\n \"wave_codes\": [\n \"q1_2025\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"dataset": {
"code": "ds-core",
"name": "GWI Core",
"is_simulated": false
},
"audiences": [],
"questions": [
{
"label": "Named Social Media Services Used",
"description": "How often do you visit or use these services?",
"is_simulated": false
},
{
"label": "Short video consumption in last month",
"description": "Short video consumption in last month",
"is_simulated": false
},
{
"label": "Number of Social Media Services Used",
"description": "This data is auto-generated based on responses to the Social Media Services Used question",
"is_simulated": false
}
],
"attributes": [
{
"text": "I am using social media less.",
"is_simulated": false
},
{
"text": "I use social media when watching TV online.",
"is_simulated": false
},
{
"text": "I use social media to find content.",
"is_simulated": false
},
{
"text": "I use social media to see what's trending and being talked about.",
"is_simulated": false
}
],
"message": ""
}{
"type": "https://api.globalwebindex.com/docs/spark-api/problems/invalid-request",
"title": "Invalid request",
"status": 400,
"detail": "invalid JSON body: unexpected end of JSON input",
"instance": "/v2/spark-api/audiences/search"
}{
"message": "Unauthorized"
}{
"type": "https://api.globalwebindex.com/docs/spark-api/problems/access-denied",
"title": "Access denied",
"status": 403,
"detail": "dataset access denied",
"instance": "/v2/spark-api/global-filters"
}{
"message": "Request Entity Too Large"
}{
"type": "https://api.globalwebindex.com/docs/spark-api/problems/invalid-params",
"title": "Invalid parameters",
"status": 422,
"detail": "could not validate input: prompt should be a non empty string",
"instance": "/v2/spark-api/global-filters"
}{
"type": "https://api.globalwebindex.com/docs/spark-api/problems/internal",
"title": "Internal server error",
"status": 500,
"detail": "There was an error processing your request. Please try again later.",
"instance": "/v2/spark-api/insights/generate"
}{
"type": "https://api.globalwebindex.com/docs/spark-api/problems/timeout",
"title": "Request timeout",
"status": 504,
"detail": "service is taking longer than usual to respond: please try again in a few moments",
"instance": "/v2/spark-api/insights/generate"
}Body
application/json
Response
Successful response.
Was this page helpful?

