JavaScript
import Profound from '@profoundai/client';
const client = new Profound({
apiKey: process.env['PROFOUND_API_KEY'], // This is the default and can be omitted
});
const response = await client.prompts.answers({
category_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
end_date: '2019-12-27T18:11:19.117Z',
start_date: '2019-12-27T18:11:19.117Z',
});
console.log(response.data);import os
from datetime import datetime
from profound import Profound
client = Profound(
api_key=os.environ.get("PROFOUND_API_KEY"), # This is the default and can be omitted
)
response = client.prompts.answers(
category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
end_date=datetime.fromisoformat("2019-12-27T18:11:19.117"),
start_date=datetime.fromisoformat("2019-12-27T18:11:19.117"),
)
print(response.data)curl --request POST \
--url https://api.tryprofound.com/v1/prompts/answers \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"category_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"start_date": "2023-11-07T05:31:56Z",
"end_date": "2023-11-07T05:31:56Z",
"pagination": {
"limit": 10000,
"offset": 0
},
"filters": [
{
"field": "<string>",
"value": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"include": {
"run_id": false,
"created_at": true,
"prompt": true,
"prompt_id": false,
"mentions": true,
"analysis_types": false,
"prompt_type": true,
"response": true,
"citations": true,
"citation_details": false,
"web_search_results": false,
"search_triggered": false,
"themes": true,
"sentiment_themes": false,
"topic": true,
"topic_id": false,
"region": true,
"model": true,
"model_id": true,
"asset": true,
"asset_id": false,
"tags": false,
"search_queries": false,
"persona": false
}
}
'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.tryprofound.com/v1/prompts/answers",
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([
'category_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'start_date' => '2023-11-07T05:31:56Z',
'end_date' => '2023-11-07T05:31:56Z',
'pagination' => [
'limit' => 10000,
'offset' => 0
],
'filters' => [
[
'field' => '<string>',
'value' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]
],
'include' => [
'run_id' => false,
'created_at' => true,
'prompt' => true,
'prompt_id' => false,
'mentions' => true,
'analysis_types' => false,
'prompt_type' => true,
'response' => true,
'citations' => true,
'citation_details' => false,
'web_search_results' => false,
'search_triggered' => false,
'themes' => true,
'sentiment_themes' => false,
'topic' => true,
'topic_id' => false,
'region' => true,
'model' => true,
'model_id' => true,
'asset' => true,
'asset_id' => false,
'tags' => false,
'search_queries' => false,
'persona' => false
]
]),
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.tryprofound.com/v1/prompts/answers"
payload := strings.NewReader("{\n \"category_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"start_date\": \"2023-11-07T05:31:56Z\",\n \"end_date\": \"2023-11-07T05:31:56Z\",\n \"pagination\": {\n \"limit\": 10000,\n \"offset\": 0\n },\n \"filters\": [\n {\n \"field\": \"<string>\",\n \"value\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ],\n \"include\": {\n \"run_id\": false,\n \"created_at\": true,\n \"prompt\": true,\n \"prompt_id\": false,\n \"mentions\": true,\n \"analysis_types\": false,\n \"prompt_type\": true,\n \"response\": true,\n \"citations\": true,\n \"citation_details\": false,\n \"web_search_results\": false,\n \"search_triggered\": false,\n \"themes\": true,\n \"sentiment_themes\": false,\n \"topic\": true,\n \"topic_id\": false,\n \"region\": true,\n \"model\": true,\n \"model_id\": true,\n \"asset\": true,\n \"asset_id\": false,\n \"tags\": false,\n \"search_queries\": false,\n \"persona\": false\n }\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.tryprofound.com/v1/prompts/answers")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"category_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"start_date\": \"2023-11-07T05:31:56Z\",\n \"end_date\": \"2023-11-07T05:31:56Z\",\n \"pagination\": {\n \"limit\": 10000,\n \"offset\": 0\n },\n \"filters\": [\n {\n \"field\": \"<string>\",\n \"value\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ],\n \"include\": {\n \"run_id\": false,\n \"created_at\": true,\n \"prompt\": true,\n \"prompt_id\": false,\n \"mentions\": true,\n \"analysis_types\": false,\n \"prompt_type\": true,\n \"response\": true,\n \"citations\": true,\n \"citation_details\": false,\n \"web_search_results\": false,\n \"search_triggered\": false,\n \"themes\": true,\n \"sentiment_themes\": false,\n \"topic\": true,\n \"topic_id\": false,\n \"region\": true,\n \"model\": true,\n \"model_id\": true,\n \"asset\": true,\n \"asset_id\": false,\n \"tags\": false,\n \"search_queries\": false,\n \"persona\": false\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tryprofound.com/v1/prompts/answers")
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 \"category_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"start_date\": \"2023-11-07T05:31:56Z\",\n \"end_date\": \"2023-11-07T05:31:56Z\",\n \"pagination\": {\n \"limit\": 10000,\n \"offset\": 0\n },\n \"filters\": [\n {\n \"field\": \"<string>\",\n \"value\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ],\n \"include\": {\n \"run_id\": false,\n \"created_at\": true,\n \"prompt\": true,\n \"prompt_id\": false,\n \"mentions\": true,\n \"analysis_types\": false,\n \"prompt_type\": true,\n \"response\": true,\n \"citations\": true,\n \"citation_details\": false,\n \"web_search_results\": false,\n \"search_triggered\": false,\n \"themes\": true,\n \"sentiment_themes\": false,\n \"topic\": true,\n \"topic_id\": false,\n \"region\": true,\n \"model\": true,\n \"model_id\": true,\n \"asset\": true,\n \"asset_id\": false,\n \"tags\": false,\n \"search_queries\": false,\n \"persona\": false\n }\n}"
response = http.request(request)
puts response.read_body{
"info": {
"total_rows": 123
},
"data": [
{
"run_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"prompt": "<string>",
"prompt_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"mentions": [
"<string>"
],
"analysis_types": [
"<string>"
],
"prompt_type": "<string>",
"response": "<string>",
"citations": [
"<string>"
],
"citation_details": [
{
"url": "<string>",
"clean_url": "<string>",
"title": "<string>",
"hostname": "<string>",
"path": "<string>",
"text": "<string>",
"first_cited_at": "<string>",
"positions": [
123
],
"groups": [
{
"group_id": 123,
"group_position": 123
}
],
"citation_category": "<string>"
}
],
"web_search_results": [
"<string>"
],
"search_triggered": true,
"themes": [
"<string>"
],
"sentiment_themes": [
{
"type": "<string>",
"name": "<string>"
}
],
"search_queries": [
"<string>"
],
"topic": "<string>",
"topic_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"region": "<string>",
"model": "<string>",
"model_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"asset": "<string>",
"asset_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tags": [
"<string>"
],
"persona": "<string>"
}
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Answers v1
Get Answers
POST
/
v1
/
prompts
/
answers
JavaScript
import Profound from '@profoundai/client';
const client = new Profound({
apiKey: process.env['PROFOUND_API_KEY'], // This is the default and can be omitted
});
const response = await client.prompts.answers({
category_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
end_date: '2019-12-27T18:11:19.117Z',
start_date: '2019-12-27T18:11:19.117Z',
});
console.log(response.data);import os
from datetime import datetime
from profound import Profound
client = Profound(
api_key=os.environ.get("PROFOUND_API_KEY"), # This is the default and can be omitted
)
response = client.prompts.answers(
category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
end_date=datetime.fromisoformat("2019-12-27T18:11:19.117"),
start_date=datetime.fromisoformat("2019-12-27T18:11:19.117"),
)
print(response.data)curl --request POST \
--url https://api.tryprofound.com/v1/prompts/answers \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"category_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"start_date": "2023-11-07T05:31:56Z",
"end_date": "2023-11-07T05:31:56Z",
"pagination": {
"limit": 10000,
"offset": 0
},
"filters": [
{
"field": "<string>",
"value": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"include": {
"run_id": false,
"created_at": true,
"prompt": true,
"prompt_id": false,
"mentions": true,
"analysis_types": false,
"prompt_type": true,
"response": true,
"citations": true,
"citation_details": false,
"web_search_results": false,
"search_triggered": false,
"themes": true,
"sentiment_themes": false,
"topic": true,
"topic_id": false,
"region": true,
"model": true,
"model_id": true,
"asset": true,
"asset_id": false,
"tags": false,
"search_queries": false,
"persona": false
}
}
'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.tryprofound.com/v1/prompts/answers",
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([
'category_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'start_date' => '2023-11-07T05:31:56Z',
'end_date' => '2023-11-07T05:31:56Z',
'pagination' => [
'limit' => 10000,
'offset' => 0
],
'filters' => [
[
'field' => '<string>',
'value' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]
],
'include' => [
'run_id' => false,
'created_at' => true,
'prompt' => true,
'prompt_id' => false,
'mentions' => true,
'analysis_types' => false,
'prompt_type' => true,
'response' => true,
'citations' => true,
'citation_details' => false,
'web_search_results' => false,
'search_triggered' => false,
'themes' => true,
'sentiment_themes' => false,
'topic' => true,
'topic_id' => false,
'region' => true,
'model' => true,
'model_id' => true,
'asset' => true,
'asset_id' => false,
'tags' => false,
'search_queries' => false,
'persona' => false
]
]),
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.tryprofound.com/v1/prompts/answers"
payload := strings.NewReader("{\n \"category_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"start_date\": \"2023-11-07T05:31:56Z\",\n \"end_date\": \"2023-11-07T05:31:56Z\",\n \"pagination\": {\n \"limit\": 10000,\n \"offset\": 0\n },\n \"filters\": [\n {\n \"field\": \"<string>\",\n \"value\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ],\n \"include\": {\n \"run_id\": false,\n \"created_at\": true,\n \"prompt\": true,\n \"prompt_id\": false,\n \"mentions\": true,\n \"analysis_types\": false,\n \"prompt_type\": true,\n \"response\": true,\n \"citations\": true,\n \"citation_details\": false,\n \"web_search_results\": false,\n \"search_triggered\": false,\n \"themes\": true,\n \"sentiment_themes\": false,\n \"topic\": true,\n \"topic_id\": false,\n \"region\": true,\n \"model\": true,\n \"model_id\": true,\n \"asset\": true,\n \"asset_id\": false,\n \"tags\": false,\n \"search_queries\": false,\n \"persona\": false\n }\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.tryprofound.com/v1/prompts/answers")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"category_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"start_date\": \"2023-11-07T05:31:56Z\",\n \"end_date\": \"2023-11-07T05:31:56Z\",\n \"pagination\": {\n \"limit\": 10000,\n \"offset\": 0\n },\n \"filters\": [\n {\n \"field\": \"<string>\",\n \"value\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ],\n \"include\": {\n \"run_id\": false,\n \"created_at\": true,\n \"prompt\": true,\n \"prompt_id\": false,\n \"mentions\": true,\n \"analysis_types\": false,\n \"prompt_type\": true,\n \"response\": true,\n \"citations\": true,\n \"citation_details\": false,\n \"web_search_results\": false,\n \"search_triggered\": false,\n \"themes\": true,\n \"sentiment_themes\": false,\n \"topic\": true,\n \"topic_id\": false,\n \"region\": true,\n \"model\": true,\n \"model_id\": true,\n \"asset\": true,\n \"asset_id\": false,\n \"tags\": false,\n \"search_queries\": false,\n \"persona\": false\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tryprofound.com/v1/prompts/answers")
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 \"category_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"start_date\": \"2023-11-07T05:31:56Z\",\n \"end_date\": \"2023-11-07T05:31:56Z\",\n \"pagination\": {\n \"limit\": 10000,\n \"offset\": 0\n },\n \"filters\": [\n {\n \"field\": \"<string>\",\n \"value\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ],\n \"include\": {\n \"run_id\": false,\n \"created_at\": true,\n \"prompt\": true,\n \"prompt_id\": false,\n \"mentions\": true,\n \"analysis_types\": false,\n \"prompt_type\": true,\n \"response\": true,\n \"citations\": true,\n \"citation_details\": false,\n \"web_search_results\": false,\n \"search_triggered\": false,\n \"themes\": true,\n \"sentiment_themes\": false,\n \"topic\": true,\n \"topic_id\": false,\n \"region\": true,\n \"model\": true,\n \"model_id\": true,\n \"asset\": true,\n \"asset_id\": false,\n \"tags\": false,\n \"search_queries\": false,\n \"persona\": false\n }\n}"
response = http.request(request)
puts response.read_body{
"info": {
"total_rows": 123
},
"data": [
{
"run_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"prompt": "<string>",
"prompt_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"mentions": [
"<string>"
],
"analysis_types": [
"<string>"
],
"prompt_type": "<string>",
"response": "<string>",
"citations": [
"<string>"
],
"citation_details": [
{
"url": "<string>",
"clean_url": "<string>",
"title": "<string>",
"hostname": "<string>",
"path": "<string>",
"text": "<string>",
"first_cited_at": "<string>",
"positions": [
123
],
"groups": [
{
"group_id": 123,
"group_position": 123
}
],
"citation_category": "<string>"
}
],
"web_search_results": [
"<string>"
],
"search_triggered": true,
"themes": [
"<string>"
],
"sentiment_themes": [
{
"type": "<string>",
"name": "<string>"
}
],
"search_queries": [
"<string>"
],
"topic": "<string>",
"topic_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"region": "<string>",
"model": "<string>",
"model_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"asset": "<string>",
"asset_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tags": [
"<string>"
],
"persona": "<string>"
}
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
APIKeyHeaderBearerAuth
Body
application/json
Body for the answers endpoint.
Pagination parameters for the results. Default is 10,000 rows with no offset.
Show child attributes
Show child attributes
filters
(RegionIdFilter · object | RegionNameFilter · object | ModelIdFilter · object | TagIdFilter · object | AnalysisTypeFilter · object | PromptTypeFilter · object | PromptFilter · object | PersonaIdFilter · object | TopicIdFilter · object | AssetIdFilter · object | AssetNameFilter · object)[]
List of filters to apply to the answers report.
Filter by region UUID.
- RegionIdFilter
- RegionNameFilter
- ModelIdFilter
- TagIdFilter
- AnalysisTypeFilter
- PromptTypeFilter
- PromptFilter
- PersonaIdFilter
- TopicIdFilter
- AssetIdFilter
- AssetNameFilter
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Was this page helpful?
⌘I