cURL
curl --request POST \
--url https://api.mindshare.so/customer/v1/get-customer-query-groups \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"customerID": 123
}
'import requests
url = "https://api.mindshare.so/customer/v1/get-customer-query-groups"
payload = { "customerID": 123 }
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({customerID: 123})
};
fetch('https://api.mindshare.so/customer/v1/get-customer-query-groups', 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.mindshare.so/customer/v1/get-customer-query-groups",
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([
'customerID' => 123
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.mindshare.so/customer/v1/get-customer-query-groups"
payload := strings.NewReader("{\n \"customerID\": 123\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<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.mindshare.so/customer/v1/get-customer-query-groups")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"customerID\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mindshare.so/customer/v1/get-customer-query-groups")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"customerID\": 123\n}"
response = http.request(request)
puts response.read_body{
"data": [
{
"query_group_id": 123,
"group_type": "<string>",
"created_time": "2023-11-07T05:31:56Z",
"keywords": "<string>",
"website_url": "<string>",
"run_from_location": "<string>",
"executions": [
{
"id": 123,
"title": "<string>",
"execution_date": "2023-12-25",
"score": 123,
"ai_platform": "<string>"
}
],
"query_group_name": "<string>",
"num_of_queries": 123
}
],
"version": "<string>",
"env": "<string>"
}Data Retrieval
Get Query Groups
Retrieve query groups associated with a customer. A query group represents a set of related queries for a specific product line or campaign. Customers can have multiple query groups.
This endpoint returns keywords, scan location, and a complete history of all scans with their scores and dates.
POST
/
get-customer-query-groups
cURL
curl --request POST \
--url https://api.mindshare.so/customer/v1/get-customer-query-groups \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"customerID": 123
}
'import requests
url = "https://api.mindshare.so/customer/v1/get-customer-query-groups"
payload = { "customerID": 123 }
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({customerID: 123})
};
fetch('https://api.mindshare.so/customer/v1/get-customer-query-groups', 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.mindshare.so/customer/v1/get-customer-query-groups",
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([
'customerID' => 123
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.mindshare.so/customer/v1/get-customer-query-groups"
payload := strings.NewReader("{\n \"customerID\": 123\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<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.mindshare.so/customer/v1/get-customer-query-groups")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"customerID\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mindshare.so/customer/v1/get-customer-query-groups")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"customerID\": 123\n}"
response = http.request(request)
puts response.read_body{
"data": [
{
"query_group_id": 123,
"group_type": "<string>",
"created_time": "2023-11-07T05:31:56Z",
"keywords": "<string>",
"website_url": "<string>",
"run_from_location": "<string>",
"executions": [
{
"id": 123,
"title": "<string>",
"execution_date": "2023-12-25",
"score": 123,
"ai_platform": "<string>"
}
],
"query_group_name": "<string>",
"num_of_queries": 123
}
],
"version": "<string>",
"env": "<string>"
}Query Group Statuses
Query Group Statuses
Active — live, scanned on schedule, data available via API.Pause — scanning paused, still accessible via API, can be resumed.Not Active — fully disabled, no scanning, not available via API.
What is an Execution?
What is an Execution?
An execution is a single scan/run of all queries in a query group against a specific AI platform, producing visibility scores, competitor mentions, and source citations for each query. Executions run periodically and their results over time power the growth tracking and trend analysis.Each execution targets a single AI platform, indicated by the
ai_platform field. A query group can have multiple executions per run — one per supported platform.AI Platforms (`ai_platform`)
AI Platforms (`ai_platform`)
Each execution includes an
ai_platform field indicating which AI platform it ran against. Current values:chatgpt— ChatGPTaioverview— Google AI Overview
Authorizations
Body
application/json
Customer ID
The ID of the customer