Retrieve Generic Insight details
curl --request GET \
--url https://api.globalwebindex.com/v1/spark-api/generic/insights/{id} \
--header 'Authorization: <api-key>'import requests
url = "https://api.globalwebindex.com/v1/spark-api/generic/insights/{id}"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.globalwebindex.com/v1/spark-api/generic/insights/{id}', 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/v1/spark-api/generic/insights/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.globalwebindex.com/v1/spark-api/generic/insights/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.globalwebindex.com/v1/spark-api/generic/insights/{id}")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.globalwebindex.com/v1/spark-api/generic/insights/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"insight": {
"id": "<string>",
"text": "<string>",
"metrics": [
"<string>"
],
"origins": {
"attributes": [
{
"attribute_key": {
"namespace_code": "<string>",
"question_code": "<string>",
"datapoint_code": "<string>",
"suffix_code": "<string>"
},
"generated_text": "<string>"
}
],
"audiences": [
{
"id": "<string>",
"title": "<string>",
"description": "<string>"
}
],
"locations": [
"<string>"
],
"waves": [
"<string>"
],
"datasets": [
"<string>"
]
}
},
"attributes": [
{
"attribute_key": {
"namespace_code": "<string>",
"question_code": "<string>",
"datapoint_code": "<string>",
"suffix_code": "<string>"
},
"question_description": "<string>",
"question_name": "<string>",
"datapoint_name": "<string>",
"suffix_name": "<string>",
"generated_text": "<string>"
}
],
"audiences": [
{
"id": "<string>",
"title": "<string>",
"description": "<string>"
}
],
"question_calculations": [
{
"question": {
"question_description": "<string>",
"question_name": "<string>"
},
"suffixes": "<string>",
"metric_priority": [
"<string>"
],
"calculations": [
{
"attribute_key": {
"namespace_code": "<string>",
"question_code": "<string>",
"datapoint_code": "<string>",
"suffix_code": "<string>"
},
"attribute": {
"attribute_key": {
"namespace_code": "<string>",
"question_code": "<string>",
"datapoint_code": "<string>",
"suffix_code": "<string>"
},
"question_description": "<string>",
"question_name": "<string>",
"datapoint_name": "<string>",
"suffix_name": "<string>",
"generated_text": "<string>"
},
"audience_id": "<string>",
"audience": {
"id": "<string>",
"title": "<string>",
"description": "<string>"
},
"percentage": 123,
"index": 123,
"sample": 123,
"size": 123
}
]
}
],
"location_groups": [
{
"group": "<string>",
"details": {
"description": "<string>",
"locations": [
{
"code": "<string>",
"name": "<string>"
}
]
}
}
],
"timeframe_groups": [
{
"group": "<string>",
"details": {
"description": "<string>",
"timeframes": [
{
"code": "<string>",
"name": "<string>"
}
]
}
}
],
"datasets": [
{
"title": "<string>",
"description": "<string>",
"url": "<string>"
}
]
}{
"code": 400,
"message": "Bad request reason"
}{
"message": "Unauthorized"
}{
"code": 404,
"message": "Not found reason"
}{
"code": 500,
"message": "There was an error processing your request. Please try again later."
}Insights
Retrieve Generic Insight details
Returns the detailed, “explore” representation of a Spark insight (attributes, audiences, calculations, etc.).
GET
/
v1
/
spark-api
/
generic
/
insights
/
{id}
Retrieve Generic Insight details
curl --request GET \
--url https://api.globalwebindex.com/v1/spark-api/generic/insights/{id} \
--header 'Authorization: <api-key>'import requests
url = "https://api.globalwebindex.com/v1/spark-api/generic/insights/{id}"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.globalwebindex.com/v1/spark-api/generic/insights/{id}', 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/v1/spark-api/generic/insights/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.globalwebindex.com/v1/spark-api/generic/insights/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.globalwebindex.com/v1/spark-api/generic/insights/{id}")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.globalwebindex.com/v1/spark-api/generic/insights/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"insight": {
"id": "<string>",
"text": "<string>",
"metrics": [
"<string>"
],
"origins": {
"attributes": [
{
"attribute_key": {
"namespace_code": "<string>",
"question_code": "<string>",
"datapoint_code": "<string>",
"suffix_code": "<string>"
},
"generated_text": "<string>"
}
],
"audiences": [
{
"id": "<string>",
"title": "<string>",
"description": "<string>"
}
],
"locations": [
"<string>"
],
"waves": [
"<string>"
],
"datasets": [
"<string>"
]
}
},
"attributes": [
{
"attribute_key": {
"namespace_code": "<string>",
"question_code": "<string>",
"datapoint_code": "<string>",
"suffix_code": "<string>"
},
"question_description": "<string>",
"question_name": "<string>",
"datapoint_name": "<string>",
"suffix_name": "<string>",
"generated_text": "<string>"
}
],
"audiences": [
{
"id": "<string>",
"title": "<string>",
"description": "<string>"
}
],
"question_calculations": [
{
"question": {
"question_description": "<string>",
"question_name": "<string>"
},
"suffixes": "<string>",
"metric_priority": [
"<string>"
],
"calculations": [
{
"attribute_key": {
"namespace_code": "<string>",
"question_code": "<string>",
"datapoint_code": "<string>",
"suffix_code": "<string>"
},
"attribute": {
"attribute_key": {
"namespace_code": "<string>",
"question_code": "<string>",
"datapoint_code": "<string>",
"suffix_code": "<string>"
},
"question_description": "<string>",
"question_name": "<string>",
"datapoint_name": "<string>",
"suffix_name": "<string>",
"generated_text": "<string>"
},
"audience_id": "<string>",
"audience": {
"id": "<string>",
"title": "<string>",
"description": "<string>"
},
"percentage": 123,
"index": 123,
"sample": 123,
"size": 123
}
]
}
],
"location_groups": [
{
"group": "<string>",
"details": {
"description": "<string>",
"locations": [
{
"code": "<string>",
"name": "<string>"
}
]
}
}
],
"timeframe_groups": [
{
"group": "<string>",
"details": {
"description": "<string>",
"timeframes": [
{
"code": "<string>",
"name": "<string>"
}
]
}
}
],
"datasets": [
{
"title": "<string>",
"description": "<string>",
"url": "<string>"
}
]
}{
"code": 400,
"message": "Bad request reason"
}{
"message": "Unauthorized"
}{
"code": 404,
"message": "Not found reason"
}{
"code": 500,
"message": "There was an error processing your request. Please try again later."
}Authorizations
Path Parameters
Insight unique identifier.
Response
Successful response
Complete “explore” view of a generic insight.
Was this page helpful?
⌘I

