Analytics

Get sentiment score

Positive mentions plus half-weighted neutral or mixed mentions, divided by target-brand mentions. Empty data returns null. Requires analytics:read.

GET /organizations/{organizationId}/projects/{projectId}/analytics/sentiment-score

Get sentiment score

curl --request GET \
  --url 'https://api.ansehn.com/v1/organizations/{ORGANIZATIONID}/projects/{PROJECTID}/analytics/sentiment-score' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "metric": "visibility_score",
  "data": {
    "value": 1,
    "unit": "percentage",
    "interval": "day",
    "series": [
      {
        "date": "<date>",
        "value": 1
      }
    ]
  },
  "filters": {
    "startDate": "<date>",
    "endDate": "<date>",
    "monitorId": "<string>",
    "tagIds": [
      "<string>"
    ],
    "promptTypes": [
      "<string>"
    ],
    "promptIds": [
      "<string>"
    ],
    "country": "<string>",
    "interval": "day"
  }
}

Aggregate and time series rounded to two decimals.

Authorizations

  • Authorization string required header

    Bearer token provided by Ansehn. Send it in the Authorization header using the format: Bearer .

Path Parameters

  • organizationId string required
  • projectId string required

Query Parameters

  • country string

    Two-letter uppercase execution market configured on prompts.

  • endDate string (date)

    Inclusive UTC date (YYYY-MM-DD). Defaults to today. Maximum range is 366 days.

  • interval string enum

    UTC time-series bucket.

  • monitorId string

    Optional monitor belonging to the authorized project.

  • promptIds string

    Comma-separated prompt IDs belonging to the authorized project and optional monitor. Values use OR semantics within this filter and combine with other filters using AND semantics.

  • promptTypes string

    Comma-separated prompt types. Values use OR semantics within this filter and combine with other filters using AND semantics. For example, Generic,Branded includes either prompt type.

  • startDate string (date)

    Inclusive UTC date (YYYY-MM-DD). Defaults to 29 days before endDate.

  • tagIds string

    Comma-separated prompt-tag IDs belonging to the authorized project and optional monitor.

Response

application/json
  • metric string enum enum

    Allowed values: visibility_score, position_rank, share_of_voice, citation_share, sentiment_score.

  • data object
    + Show Child Attributes
    • value number | null

      Weighted aggregate for the full selected period, computed as the sum of underlying numerators divided by the sum of underlying denominators. This is not the arithmetic average of the time-series values.

    • unit string enum enum

      Allowed values: percentage, rank.

    • interval string enum enum

      Allowed values: day, week, month.

    • series[] object array
      + Show Child Attributes
      • date string (date)
      • value number | null
  • filters object
    + Show Child Attributes
    • startDate string (date)
    • endDate string (date)
    • monitorId string
    • tagIds[] string array
    • promptTypes[] string array
    • promptIds[] string array
    • country string
    • interval string enum enum

      Allowed values: day, week, month.