curl --request GET \
--url https://api.globalwebindex.com/v2/saved/audiences/{id} \
--header 'Authorization: <api-key>'import requests
url = "https://api.globalwebindex.com/v2/saved/audiences/{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/v2/saved/audiences/{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/v2/saved/audiences/{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/v2/saved/audiences/{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/v2/saved/audiences/{id}")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.globalwebindex.com/v2/saved/audiences/{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{
"created_at": "<string>",
"datasets": [
"ds-core",
"ds-96c906f1"
],
"description": "Male millennials aged 18-24 who use social media daily",
"expression": {
"and": "<array>",
"datapoints": [
"q2_1"
],
"min_count": 123,
"not": false,
"options": [
"<string>"
],
"or": "<array>",
"question": "q2",
"suffixes": [
1
]
},
"flags": [
"authored"
],
"folder_id": "b140035b-3adc-43bf-a39d-8e8005c8af2a",
"id": "b140035b-3adc-43bf-a39d-8e8005c8af2a",
"name": "Male with credit card and short-term loan",
"permissions": {
"audience_overall": "accessible",
"meta": {}
},
"position": 128,
"shared": false,
"sharings": {},
"updated_at": "<string>",
"user_id": 12345,
"v1_id": 12345
}"<string>""<string>""<string>""<string>"v2 Audience Detail
Retrieve a single audience for the current user. Use this endpoint to throttle API requests to just query a given audience, rather than all of your audiences.
curl --request GET \
--url https://api.globalwebindex.com/v2/saved/audiences/{id} \
--header 'Authorization: <api-key>'import requests
url = "https://api.globalwebindex.com/v2/saved/audiences/{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/v2/saved/audiences/{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/v2/saved/audiences/{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/v2/saved/audiences/{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/v2/saved/audiences/{id}")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.globalwebindex.com/v2/saved/audiences/{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{
"created_at": "<string>",
"datasets": [
"ds-core",
"ds-96c906f1"
],
"description": "Male millennials aged 18-24 who use social media daily",
"expression": {
"and": "<array>",
"datapoints": [
"q2_1"
],
"min_count": 123,
"not": false,
"options": [
"<string>"
],
"or": "<array>",
"question": "q2",
"suffixes": [
1
]
},
"flags": [
"authored"
],
"folder_id": "b140035b-3adc-43bf-a39d-8e8005c8af2a",
"id": "b140035b-3adc-43bf-a39d-8e8005c8af2a",
"name": "Male with credit card and short-term loan",
"permissions": {
"audience_overall": "accessible",
"meta": {}
},
"position": 128,
"shared": false,
"sharings": {},
"updated_at": "<string>",
"user_id": 12345,
"v1_id": 12345
}"<string>""<string>""<string>""<string>"Authorizations
Path Parameters
Audience id
Response
OK
The dataset codes used in the audience
["ds-core", "ds-96c906f1"]
The generated description of the audience
"Male millennials aged 18-24 who use social media daily"
The expression defining the audience criteria
Show child attributes
Show child attributes
The flags associated with the audience
["authored"]
The folder ID containing the audience
"b140035b-3adc-43bf-a39d-8e8005c8af2a"
The v2 UUID identifier of the audience
"b140035b-3adc-43bf-a39d-8e8005c8af2a"
The name of the audience
"Male with credit card and short-term loan"
The permissions for the audience
Show child attributes
Show child attributes
The position for sorting
128
Whether the audience is shared
false
The sharing information for the audience
Show child attributes
Show child attributes
The user ID who owns the audience
12345
The v1 ID of the audience
12345
Was this page helpful?

