Skip to main content
GET
/
api
/
v2
/
analytics
/
sentiment
Sentiment distribution
curl --request GET \
  --url https://app.octolens.com/api/v2/analytics/sentiment \
  --header 'Authorization: Bearer <token>'
{
  "data": [
    {
      "sentiment": "Positive",
      "count": 0
    }
  ]
}

Documentation Index

Fetch the complete documentation index at: https://octolens.com/docs/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Clerk API key. Create one in Settings → API Keys. Pass as Authorization: Bearer <key>.

Query Parameters

keywordIds

Limit aggregation to specific keyword IDs.

Required range: -9007199254740991 <= x <= 9007199254740991
startDate
string<date-time>

Inclusive start of the window. ISO 8601 datetime. If omitted together with endDate, defaults to the last 30 days.

Pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
endDate
string<date-time>

Exclusive end of the window. ISO 8601 datetime. If omitted together with startDate, defaults to "now".

Pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
platforms

Filter to specific platforms.

Available options:
dev,
github,
hackernews,
linkedin,
producthunt,
reddit,
stackoverflow,
twitter,
youtube,
tiktok,
medium,
reddit_comment,
bluesky,
newsletter,
podcasts,
news
Example:

"reddit"

tag
enum<string>

Narrow to mentions carrying this AI-assigned tag. See MentionTag for all values.

Available options:
buy_intent,
competitor_mention,
customer_testimonial,
promotional_post,
own_brand_mention,
industry_insights,
hiring,
event,
product_question,
pricing,
churn_intent,
launch_announcement,
bug_report,
user_feedback,
ai_generated
Example:

"competitor_mention"

sentiment
enum<string>
Available options:
POSITIVE,
NEUTRAL,
NEGATIVE
relevance

Relevance scores to include. 0 = high relevance, 1 = medium, 2 = low. Default: [0, 1].

Required range: 0 <= x <= 2

Response

200 response

data
object[]
required

One entry per sentiment bucket that has a non-zero count.