Topic Tree
Get the topic tree for a keyword search to visualize conversation branches.
GET /api/iq/keyword_search/{search_id}/topic_tree
Parameters
| search_id | Search ID |
| platform | Optional — "twitter" (default) | "bluesky" | "youtube" |
Request Example
curl -X GET "https://rolli.ai/api/iq/keyword_search/7232/topic_tree?platform=twitter" \
-H "X-ROLLI-TOKEN: your_token" \
-H "X-ROLLI-USER-ID: your_user_id" \
-H "Content-Type: application/json"
fetch("https://rolli.ai/api/iq/keyword_search/7232/topic_tree?platform=twitter", {
method: "GET",
headers: {
"X-ROLLI-TOKEN": "your_token",
"X-ROLLI-USER-ID": "your_user_id",
"Content-Type": "application/json"
},
})
.then(res => res.json())
.then(console.log);
require "net/http"
require "uri"
require "json"
uri = URI("https://rolli.ai/api/iq/keyword_search/7232/topic_tree?platform=twitter")
req = Net::HTTP::Get.new(uri)
req["X-ROLLI-TOKEN"] = "your_token"
req["X-ROLLI-USER-ID"] = "your_user_id"
req["Content-Type"] = "application/json"
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) do |http|
http.request(req)
end
puts res.body
import requests
import json
url = "https://rolli.ai/api/iq/keyword_search/7232/topic_tree?platform=twitter"
headers = {
"X-ROLLI-TOKEN": "your_token",
"X-ROLLI-USER-ID": "your_user_id",
"Content-Type": "application/json"
}response = requests.get(url, headers=headers)
print(response.json())
Response Fields
| Field Name | Description |
|---|---|
| data | Array of topic trees |
Node types
Root Node Structure
| Field Name | Description |
|---|---|
| platform | Platform identifier (e.g., "twitter", "bluesky", "youtube") |
| id_hash256 | Internal analysis hash ID |
| created_at | Topic tree creation date |
| name | Node name or description |
| children | Array of children nodes |
Non-Leaf Node Structure
| Field Name | Description |
|---|---|
| name | Node name or description |
| children | Array of children nodes |
Pre-Leaf Node Structure
| Field Name | Description |
|---|---|
| name | Node name or description |
| value | Branch weight (number of posts aggregated under this node) |
| created_at | Array of children post creation dates |
| post_url | Array of children post URLs |
| children | Array of children nodes (the individual post leaf nodes) |
| summary | Summary describing the main theme of this branch |
| sentiment | Sentiment classification of the posts (“positive”, “negative”, “mixed”) |
Leaf Node Structure
| Field Name | Description |
|---|---|
| name | Post text (truncated in some cases) |
| url | Post URL |
| username | Post author's username |
| profile_url | Post author's profile image URL |
| user_description | Post author's profile description |
| created_at | Post creation timestamp |
Response Example
{
"data": [
{
"platform": "twitter",
"id_hash256": "a756fdc4e8b2c3f4e5d6a7b8c9d0e1f2a3b4c",
"created_at": "2026-01-05 12:00:00",
"name": ".",
"children": [
{
"name": "General Lifestyle Topics",
"children": [
{
"name": "Daily Routines",
"value": 3,
"created_at": [
"2026-01-01 08:15:00",
...
],
"post_url": [
"https://example.com/post/1",
...
],
"children": [
{
"name": "Starting the day with a quiet morning routine and a warm drink.",
"url": "https://example.com/post/1",
"username": "user_example_1",
"profile_url": "https://example.com/profile/1.png",
"user_description": "Example user profile description",
"created_at": "2026-01-01 08:15:00"
},
...
],
"summary": "Posts describing common daily routines and simple habits.",
"sentiment": "neutral"
}
]
},
...
]
}
]
}