Skip to main content
POST
/
v1
/
reports
/
sentiment-v2
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.reports.querySentimentV2({
  asset_name: 'asset_name',
  category_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
  end_date: 'end_date',
  start_date: 'start_date',
});

console.log(response.info);
{
  "info": {
    "query": {},
    "total_rows": 123
  },
  "data": [
    {
      "scores": {
        "current": {
          "positive_sentiment": 123,
          "negative_sentiment": 123,
          "assessment_count": 123,
          "occurrence": 123,
          "response_count": 123,
          "total_response_count": 123
        },
        "previous": {
          "positive_sentiment": 123,
          "negative_sentiment": 123,
          "assessment_count": 123,
          "occurrence": 123,
          "response_count": 123,
          "total_response_count": 123
        }
      },
      "date": "<string>",
      "prev_date": "<string>",
      "group_ids": {},
      "group_names": {},
      "group_metadata": {
        "theme_id": "<string>",
        "theme": "<string>",
        "claim_id": "<string>",
        "claim": "<string>",
        "prompt_id": "<string>",
        "prompt_text": "<string>",
        "topic_id": "<string>",
        "run_id": "<string>",
        "created_at": "<string>",
        "model_id": "<string>",
        "region_id": "<string>",
        "persona_id": "<string>",
        "asset_name": "<string>"
      },
      "cited_website_hrefs": [
        "<string>"
      ],
      "total_count": 123
    }
  ]
}

Authorizations

X-API-Key
string
header
required

Body

application/json
category_id
string<uuid>
required
asset_name
string
required
start_date
string
required
end_date
string
required
comparison_start_date
string | null
comparison_end_date
string | null
platform_ids
string<uuid>[] | null
region_ids
string<uuid>[] | null
topic_ids
string<uuid>[] | null
exclude_topic_ids
boolean
default:false
tag_ids
string<uuid>[] | null
tag_filter_type
enum<string>
default:any
Available options:
all,
any
include_no_tag
boolean
default:false
persona_ids
string<uuid>[] | null
include_no_persona
boolean
default:false
prompt_ids
string<uuid>[] | null
group_by
enum<string>[] | null
Available options:
topic,
region,
platform,
prompt,
persona,
tag,
theme,
claim,
run,
competitor
metrics
enum<string>[] | null
Available options:
sentiment,
occurrence
run_ids
string<uuid>[] | null
owned_asset_names_to_exclude
string[]
claim_filters
SentimentClaimFilters · object
date_bucket
enum<string> | null
Available options:
daily,
weekly,
monthly
limit
integer | null
Required range: x > 0
offset
integer
default:0
Required range: x >= 0
sort_by
enum<string> | null
Available options:
occurrence,
assessment_count,
positive_sentiment,
negative_sentiment
sort_direction
enum<string>
default:desc
Available options:
asc,
desc

Response

Successful Response

info
SentimentV2ReportInfo · object
required
data
SentimentDataPoint · object[]