Get per-prompt sentiment analytics for a product
curl --request GET \
--url https://app.promptingco.com/api/v1/analytics/sentiment \
--header 'x-api-key: <api-key>'const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://app.promptingco.com/api/v1/analytics/sentiment', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.promptingco.com/api/v1/analytics/sentiment"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text){
"ok": true,
"data": {
"scope": {
"product": {
"id": "<string>",
"name": "<string>",
"slug": "<string>"
},
"view": {
"id": "<string>",
"name": "<string>"
}
},
"rows": [
{
"promptId": "<string>",
"prompt": "<string>",
"topicId": "<string>",
"totalMentions": 123,
"positive": 123,
"neutral": 123,
"negative": 123,
"positivePct": 123,
"neutralPct": 123,
"negativePct": 123,
"negativeReasons": [
"<string>"
],
"date": "<string>",
"wow": 123,
"wowPct": 123
}
]
}
}{
"ok": false,
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}{
"ok": false,
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}{
"ok": false,
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}{
"ok": false,
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}{
"ok": false,
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}{
"ok": false,
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}Visibility & Mentions
Get per-prompt sentiment analytics for a product
GET
/
api
/
v1
/
analytics
/
sentiment
Get per-prompt sentiment analytics for a product
curl --request GET \
--url https://app.promptingco.com/api/v1/analytics/sentiment \
--header 'x-api-key: <api-key>'const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://app.promptingco.com/api/v1/analytics/sentiment', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.promptingco.com/api/v1/analytics/sentiment"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text){
"ok": true,
"data": {
"scope": {
"product": {
"id": "<string>",
"name": "<string>",
"slug": "<string>"
},
"view": {
"id": "<string>",
"name": "<string>"
}
},
"rows": [
{
"promptId": "<string>",
"prompt": "<string>",
"topicId": "<string>",
"totalMentions": 123,
"positive": 123,
"neutral": 123,
"negative": 123,
"positivePct": 123,
"neutralPct": 123,
"negativePct": 123,
"negativeReasons": [
"<string>"
],
"date": "<string>",
"wow": 123,
"wowPct": 123
}
]
}
}{
"ok": false,
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}{
"ok": false,
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}{
"ok": false,
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}{
"ok": false,
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}{
"ok": false,
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}{
"ok": false,
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}Authorizations
apiKeyAuthbearerAuthcookieAuth
Organization-scoped API key. Available scopes:
- content:read: Read site pages, markdown content, and llms.txt files
- content:write: Create, update, and delete site pages and content
- prompts:read: Read prompts, topics, prompt suggestions, and prompt analysis results
- prompts:write: Create, update, archive prompts and generate, edit, or review prompt suggestions
- simulations:read: Read agent-simulation tasks, runs, environments, and analytics
- simulations:write: Create and trigger simulation runs
- logs:read: Read AI-traffic logs and request-level audit events
- analytics:read: Read analytics aggregates (rankings, mentions, sources, SOV)
- analytics:write: Write events to analytics
- products:read: Read product metadata and competitor data
- products:write: Update product settings and competitor lists
Query Parameters
Product ID to use as the primary sentiment scope.
Minimum string length:
1Available options:
prompt View ID to scope results to prompts assigned to the view.
Minimum string length:
1Prompt ID. Returns a daily sentiment time series for one prompt.
Minimum string length:
1Topic ID to filter per-prompt sentiment rows.
Minimum string length:
1Start of date window, formatted as YYYY-MM-DD.
End of date window, formatted as YYYY-MM-DD.
Available options:
true, false