Octolens
Query and analyze brand mentions from Octolens API. Use when the user wants to fetch mentions, track keywords, filter by source platforms (Twitter, Reddit, GitHub, LinkedIn, etc.), sentiment analysis,
Query and analyze brand mentions from Octolens API. Use when the user wants to fetch mentions, track keywords, filter by source platforms (Twitter, Reddit, GitHub, LinkedIn, etc.), sentiment analysis,
Real data. Real impact.
Growing
Developers
Per week
Open source
Skills give you superpowers. Install in 30 seconds.
Use this skill when the user needs to:
The Octolens API requires a Bearer token for authentication. The user should provide their API key, which you'll use in the
Authorization header:
Authorization: Bearer YOUR_API_KEY
Important: Always ask the user for their API key before making any API calls. Store it in a variable for subsequent requests.
All API endpoints use the base URL:
https://app.octolens.com/api/v1
X-RateLimit-* headers indicate current usageFetch mentions matching keywords with optional filtering. Returns posts sorted by timestamp (newest first).
Key Parameters:
limit (number, 1-100): Maximum results to return (default: 20)cursor (string): Pagination cursor from previous responseincludeAll (boolean): Include low-relevance posts (default: false)view (number): View ID to use for filteringfilters (object): Filter criteria (see filtering section)Example Response:
{ "data": [ { "id": "abc123", "url": "https://twitter.com/user/status/123", "body": "Just discovered @YourProduct - this is exactly what I needed!", "source": "twitter", "timestamp": "2024-01-15T10:30:00Z", "author": "user123", "authorName": "John Doe", "authorFollowers": 5420, "relevance": "relevant", "sentiment": "positive", "language": "en", "tags": ["feature-request"], "keywords": [{ "id": 1, "keyword": "YourProduct" }], "bookmarked": false, "engaged": false } ], "cursor": "eyJsYXN0SWQiOiAiYWJjMTIzIn0=" }
List all keywords configured for the organization.
Example Response:
{ "data": [ { "id": 1, "keyword": "YourProduct", "platforms": ["twitter", "reddit", "github"], "color": "#6366f1", "paused": false, "context": "Our main product name" } ] }
List all saved views (pre-configured filters).
Example Response:
{ "data": [ { "id": 1, "name": "High Priority", "icon": "star", "filters": { "sentiment": ["positive", "negative"], "source": ["twitter"] }, "createdAt": "2024-01-01T00:00:00Z" } ] }
The
/mentions endpoint supports powerful filtering with two modes:
Put fields directly in filters. All conditions are ANDed together.
{ "filters": { "source": ["twitter", "linkedin"], "sentiment": ["positive"], "minXFollowers": 1000 } }
→
source IN (twitter, linkedin) AND sentiment = positive AND followers ≥ 1000
Prefix any array field with ! to exclude values:
{ "filters": { "source": ["twitter"], "!keyword": [5, 6] } }
→
source = twitter AND keyword NOT IN (5, 6)
Use
operator and groups for complex logic:
{ "filters": { "operator": "AND", "groups": [ { "operator": "OR", "conditions": [ { "source": ["twitter"] }, { "source": ["linkedin"] } ] }, { "operator": "AND", "conditions": [ { "sentiment": ["positive"] }, { "!tag": ["spam"] } ] } ] } }
→
(source = twitter OR source = linkedin) AND (sentiment = positive AND tag ≠ spam)
| Field | Type | Description |
|---|---|---|
| string[] | Platforms: twitter, reddit, github, linkedin, youtube, hackernews, devto, stackoverflow, bluesky, newsletter, podcast |
| string[] | Values: positive, neutral, negative |
| string[] | Keyword IDs (get from /keywords endpoint) |
| string[] | ISO 639-1 codes: en, es, fr, de, pt, it, nl, ja, ko, zh |
| string[] | Tag names |
| boolean | Filter bookmarked (true) or non-bookmarked (false) posts |
| boolean | Filter engaged (true) or non-engaged (false) posts |
| number | Minimum Twitter follower count |
| number | Maximum Twitter follower count |
| string | ISO 8601 format (e.g., "2024-01-15T00:00:00Z") |
| string | ISO 8601 format |
This skill includes helper scripts for common operations. Use them to quickly interact with the API:
node scripts/fetch-mentions.js YOUR_API_KEY [limit] [includeAll]
node scripts/list-keywords.js YOUR_API_KEY
node scripts/list-views.js YOUR_API_KEY
node scripts/query-mentions.js YOUR_API_KEY '{"source": ["twitter"], "sentiment": ["positive"]}' [limit]
node scripts/advanced-query.js YOUR_API_KEY [limit]
X-RateLimit-*)/keywords endpoint before filtering by keyword{ "limit": 20, "filters": { "source": ["twitter"], "sentiment": ["positive"], "minXFollowers": 1000 } }
{ "limit": 50, "filters": { "source": ["reddit", "github"], "!tag": ["spam", "irrelevant"] } }
{ "limit": 30, "filters": { "operator": "AND", "groups": [ { "operator": "OR", "conditions": [ { "source": ["twitter"] }, { "source": ["linkedin"] } ] }, { "operator": "AND", "conditions": [ { "sentiment": ["positive"] }, { "startDate": "2024-01-20T00:00:00Z" } ] } ] } }
| Status | Error | Description |
|---|---|---|
| 401 | unauthorized | Missing or invalid API key |
| 403 | forbidden | Valid key but no permission |
| 404 | not_found | Resource (e.g., view ID) not found |
| 429 | rate_limit_exceeded | Too many requests |
| 400 | invalid_request | Malformed request body |
| 500 | internal_error | Server error, retry later |
When a user asks to query Octolens data:
User: "Show me positive mentions from Twitter in the last 7 days"
Action (using bundled script):
node scripts/query-mentions.js YOUR_API_KEY '{"source": ["twitter"], "sentiment": ["positive"], "startDate": "2024-01-20T00:00:00Z"}'
Alternative (using fetch API directly):
const response = await fetch('https://app.octolens.com/api/v1/mentions', { method: 'POST', headers: { 'Authorization': `Bearer ${API_KEY}`, 'Content-Type': 'application/json', }, body: JSON.stringify({ limit: 20, filters: { source: ['twitter'], sentiment: ['positive'], startDate: '2024-01-20T00:00:00Z', }, }), }); const data = await response.json();
User: "Find mentions from Reddit or GitHub, exclude spam tag, with positive or neutral sentiment"
Action (using bundled script):
node scripts/query-mentions.js YOUR_API_KEY '{"operator": "AND", "groups": [{"operator": "OR", "conditions": [{"source": ["reddit"]}, {"source": ["github"]}]}, {"operator": "OR", "conditions": [{"sentiment": ["positive"]}, {"sentiment": ["neutral"]}]}, {"operator": "AND", "conditions": [{"!tag": ["spam"]}]}]}'
Alternative (using fetch API directly):
const response = await fetch('https://app.octolens.com/api/v1/mentions', { method: 'POST', headers: { 'Authorization': `Bearer ${API_KEY}`, 'Content-Type': 'application/json', }, body: JSON.stringify({ limit: 30, filters: { operator: 'AND', groups: [ { operator: 'OR', conditions: [ { source: ['reddit'] }, { source: ['github'] }, ], }, { operator: 'OR', conditions: [ { sentiment: ['positive'] }, { sentiment: ['neutral'] }, ], }, { operator: 'AND', conditions: [ { '!tag': ['spam'] }, ], }, ], }, }), }); const data = await response.json();
User: "Show mentions for our main product keyword"
Actions:
node scripts/list-keywords.js YOUR_API_KEY
node scripts/query-mentions.js YOUR_API_KEY '{"keyword": [1]}'
No automatic installation available. Please visit the source repository for installation instructions.
View Installation Instructions1,500+ AI skills, agents & workflows. Install in 30 seconds. Part of the Torly.ai family.
© 2026 Torly.ai. All rights reserved.