get_topic_messages
Retrieve posts, comments, and articles from a Sprout Listening Topic by date range, with sentiment, engagement metrics, network and text filters, returning newest first.
Instructions
Get messages (posts, comments, articles) from a Sprout Listening Topic over a date range, newest first, with sentiment and engagement.
Automatically fetches pages of 100 until max_results is reached. Responses are compact: sentiment is a top-level field and media URLs are dropped unless you request the visual_media field.
Args: topic_id: Topic ID from list_listening_topics. start_date: Start date in YYYY-MM-DD format. end_date: End date in YYYY-MM-DD format (inclusive). networks: Networks to include, e.g. ["LINKEDIN", "REDDIT", "YOUTUBE", "INSTAGRAM", "TIKTOK", "WWW", "BLUESKY", "FACEBOOK", "TUMBLR"]. Defaults to all of these. X/TWITTER is not available via the API and is dropped with a note. text_match: Text search. All terms are required; use OR for any, and quotes for phrases, e.g. '"Fireworks AI" OR fireworks.ai'. sentiment: Filter by sentiment: positive, negative, neutral, unclassified. public_only: If true, exclude posts from the account's own connected profiles so only earned/public conversation is returned. Default false. fields: Message fields to return. Defaults to guid, created_time, network, text, perma_link, from.name, from.screen_name, content_category, language, sentiment. metrics: Per-message metrics. Defaults to engagements, likes, replies, shares_count, impressions, from.followers_count. sort: Sort order. Defaults to ["created_time:desc"]. max_results: Maximum messages to return. Default 100, maximum 500. filters: Extra raw Sprout filter strings appended as-is, e.g. ["likes.gte(10)"]. timezone: IANA timezone for date filters. Defaults to SPROUT_DEFAULT_TIMEZONE (America/Los_Angeles).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"topic_id": "<topic_id>",
"start_date": "<start_date>",
"end_date": "<end_date>"
},
"name": "get_topic_messages"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sort | No | ||
| fields | No | ||
| filters | No | ||
| metrics | No | ||
| end_date | Yes | ||
| networks | No | ||
| timezone | No | ||
| topic_id | Yes | ||
| sentiment | No | ||
| start_date | Yes | ||
| text_match | No | ||
| max_results | No | ||
| public_only | No |