โ† API reference

Developer ยท API reference

Sentiment

The tone of how AI answers talk about your brand.

Sentiment classifies the language AI models use around your brand as positive, neutral or negative. These endpoints return the sentiment score series and the company/source/provider leaderboards.

POST /analytics/sentiment-metrics

Get Sentiment Metrics

Get sentiment time series metrics for chart display

๐Ÿ”’ Requires Authorization: Bearer ll_โ€ฆ (or X-API-Key).

Request bodyยท SentimentQuery

FieldTypeRequiredDescription
company_idstringYesโ€”
date_rangeany[]Yesโ€”
time_granularitystringNoโ€”
include_changebooleanNoโ€”
limitinteger | nullNoโ€”
rolling_daysinteger | nullNoโ€”
comparison_daysinteger | nullNoโ€”
entity_typestring | nullNoโ€”
entity_idstring | nullNoโ€”
group_bystring[] | nullNoโ€”
filtersobjectNoโ€”
min_datapointsinteger | nullNoโ€”

Example request

curl -X POST "https://api.lunalift.ai/analytics/sentiment-metrics" \
  -H "Authorization: Bearer ll_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
  "company_id": "string",
  "date_range": []
}'

Response ยท 200 OK

Returns a JSON object on success.

POST /analytics/sentiment-combined

Get Combined Sentiment Metrics

Get combined sentiment metrics: top 10 leaderboard + top 7 chart history in one query

๐Ÿ”’ Requires Authorization: Bearer ll_โ€ฆ (or X-API-Key).

Request bodyยท SentimentQuery

FieldTypeRequiredDescription
company_idstringYesโ€”
date_rangeany[]Yesโ€”
time_granularitystringNoโ€”
include_changebooleanNoโ€”
limitinteger | nullNoโ€”
rolling_daysinteger | nullNoโ€”
comparison_daysinteger | nullNoโ€”
entity_typestring | nullNoโ€”
entity_idstring | nullNoโ€”
group_bystring[] | nullNoโ€”
filtersobjectNoโ€”
min_datapointsinteger | nullNoโ€”

Example request

curl -X POST "https://api.lunalift.ai/analytics/sentiment-combined" \
  -H "Authorization: Bearer ll_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
  "company_id": "string",
  "date_range": []
}'

Response ยท 200 OK

FieldTypeNotes
successbooleanโ€”
messagestringโ€”
conversationIdstring | nullโ€”
dataobject | nullโ€”
POST /analytics/sentiment-company-leaderboard

Get Sentiment Company Leaderboard

Get sentiment company leaderboard

๐Ÿ”’ Requires Authorization: Bearer ll_โ€ฆ (or X-API-Key).

Request bodyยท SentimentQuery

FieldTypeRequiredDescription
company_idstringYesโ€”
date_rangeany[]Yesโ€”
time_granularitystringNoโ€”
include_changebooleanNoโ€”
limitinteger | nullNoโ€”
rolling_daysinteger | nullNoโ€”
comparison_daysinteger | nullNoโ€”
entity_typestring | nullNoโ€”
entity_idstring | nullNoโ€”
group_bystring[] | nullNoโ€”
filtersobjectNoโ€”
min_datapointsinteger | nullNoโ€”

Example request

curl -X POST "https://api.lunalift.ai/analytics/sentiment-company-leaderboard" \
  -H "Authorization: Bearer ll_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
  "company_id": "string",
  "date_range": []
}'

Response ยท 200 OK

Returns a JSON object on success.

POST /analytics/sentiment-source-leaderboard

Get Sentiment Source Leaderboard

Get sentiment source leaderboard

๐Ÿ”’ Requires Authorization: Bearer ll_โ€ฆ (or X-API-Key).

Request bodyยท SentimentQuery

FieldTypeRequiredDescription
company_idstringYesโ€”
date_rangeany[]Yesโ€”
time_granularitystringNoโ€”
include_changebooleanNoโ€”
limitinteger | nullNoโ€”
rolling_daysinteger | nullNoโ€”
comparison_daysinteger | nullNoโ€”
entity_typestring | nullNoโ€”
entity_idstring | nullNoโ€”
group_bystring[] | nullNoโ€”
filtersobjectNoโ€”
min_datapointsinteger | nullNoโ€”

Example request

curl -X POST "https://api.lunalift.ai/analytics/sentiment-source-leaderboard" \
  -H "Authorization: Bearer ll_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
  "company_id": "string",
  "date_range": []
}'

Response ยท 200 OK

Returns a JSON object on success.

POST /analytics/sentiment-provider-performance

Get Sentiment Provider Performance

Get sentiment metrics by AI provider

๐Ÿ”’ Requires Authorization: Bearer ll_โ€ฆ (or X-API-Key).

Request bodyยท SentimentQuery

FieldTypeRequiredDescription
company_idstringYesโ€”
date_rangeany[]Yesโ€”
time_granularitystringNoโ€”
include_changebooleanNoโ€”
limitinteger | nullNoโ€”
rolling_daysinteger | nullNoโ€”
comparison_daysinteger | nullNoโ€”
entity_typestring | nullNoโ€”
entity_idstring | nullNoโ€”
group_bystring[] | nullNoโ€”
filtersobjectNoโ€”
min_datapointsinteger | nullNoโ€”

Example request

curl -X POST "https://api.lunalift.ai/analytics/sentiment-provider-performance" \
  -H "Authorization: Bearer ll_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
  "company_id": "string",
  "date_range": []
}'

Response ยท 200 OK

Returns a JSON object on success.