Get dashboard data
curl --request GET \
--url https://api.firstanswer.ai/v1/dashboard/ \
--header 'api-key: <api-key>'import requests
url = "https://api.firstanswer.ai/v1/dashboard/"
headers = {"api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'api-key': '<api-key>'}};
fetch('https://api.firstanswer.ai/v1/dashboard/', 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.firstanswer.ai/v1/dashboard/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://api.firstanswer.ai/v1/dashboard/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("api-key", "<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.firstanswer.ai/v1/dashboard/")
.header("api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.firstanswer.ai/v1/dashboard/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": {
"total_prompts": 123,
"total_responses": 123,
"total_brand_mentions": 123,
"brand_mention_rate": "<string>",
"average_brand_sentiment": "<string>",
"competitors_count": 123,
"brands_ranking": [
{
"name": "<string>",
"mentions": 123,
"own_brand": true,
"ranking": 123,
"visibility": "<string>",
"average_position": "<string>",
"average_sentiment": "<string>"
}
],
"top_ranked_prompts": [
{
"id": 123,
"brand_mentions": 123,
"prompt": "<string>",
"visibility": "<string>"
}
],
"lowest_ranked_prompts": [
{
"id": 123,
"brand_mentions": 123,
"prompt": "<string>",
"visibility": "<string>"
}
]
}
}{
"code": "<string>",
"message": "<string>",
"details": {}
}{
"code": "<string>",
"message": "<string>",
"details": {}
}Dashboard
Get dashboard data
GET
/
v1
/
dashboard
/
Get dashboard data
curl --request GET \
--url https://api.firstanswer.ai/v1/dashboard/ \
--header 'api-key: <api-key>'import requests
url = "https://api.firstanswer.ai/v1/dashboard/"
headers = {"api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'api-key': '<api-key>'}};
fetch('https://api.firstanswer.ai/v1/dashboard/', 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.firstanswer.ai/v1/dashboard/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://api.firstanswer.ai/v1/dashboard/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("api-key", "<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.firstanswer.ai/v1/dashboard/")
.header("api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.firstanswer.ai/v1/dashboard/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": {
"total_prompts": 123,
"total_responses": 123,
"total_brand_mentions": 123,
"brand_mention_rate": "<string>",
"average_brand_sentiment": "<string>",
"competitors_count": 123,
"brands_ranking": [
{
"name": "<string>",
"mentions": 123,
"own_brand": true,
"ranking": 123,
"visibility": "<string>",
"average_position": "<string>",
"average_sentiment": "<string>"
}
],
"top_ranked_prompts": [
{
"id": 123,
"brand_mentions": 123,
"prompt": "<string>",
"visibility": "<string>"
}
],
"lowest_ranked_prompts": [
{
"id": 123,
"brand_mentions": 123,
"prompt": "<string>",
"visibility": "<string>"
}
]
}
}{
"code": "<string>",
"message": "<string>",
"details": {}
}{
"code": "<string>",
"message": "<string>",
"details": {}
}Autorizações
Parâmetros de consulta
Start date in YYYY-MM-DD format
End date in YYYY-MM-DD format
chat_gpt- Chat Gptperplexity- Perplexitybing_copilot- Bing Copilotgoogle_ai- Google Aigemini- Geminigrok- Grokgoogle_ai_mode- Google Ai Mode
Opções disponíveis:
chat_gpt, perplexity, bing_copilot, google_ai, gemini, grok, google_ai_mode Minimum string length:
1Resposta
Success
Show child attributes
Show child attributes
⌘I