/ai/topic-classificationTopic Classification
AI
Cost / request
$0.01
Response format
JSON
Protocol
REST
About this endpoint
Access X data through agntdata: Topic Classification. Allows you to automatically extract meaning from text by identifying recurrent themes or topics. Responses are structured JSON for AI agents, analytics, and automation — one API key instead of juggling upstream accounts. Ideal when you need tweets, user profiles, followers, search, and hashtag streams programmatically.
Use cases
AI agents that need X data in structured form
Analytics and monitoring pipelines for X content
Research and GTM workflows that combine X signals with other data
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| text | query | string | required | —Default: The @Humane video is fascinating on so many levels. I think people miss the point about how emotionally empty it feels. It’s because smartphones sucked everything out of us. And their device is there to reconnect us to the world. It was purposely recorded this way. |
Responses
200
{
"type": "object",
"properties": {
"text": {
"type": "string"
},
"hash": {
"type": "string"
},
"trace_id": {
"type": "string"
},
"topics": {
"type": "array",
"items": {
"type": "object",
"properties": {
"label": {
"type": "string"
},
"confidence": {
"type": "number"
},
"rank": {
"type": "integer"
},
"label_id": {
"type": "integer"
}
}
}
},
"elapsed_time": {
"type": "number"
}
}
}Agent / Developer Schema
Machine-readable formats for integrating this endpoint into AI agents and toolchains.
{
"operationId": "Topic_Classification_get__ai_topic_classification",
"method": "get",
"path": "/ai/topic-classification",
"summary": "Topic Classification",
"description": "Allows you to automatically extract meaning from text by identifying recurrent themes or topics",
"parameters": [
{
"name": "text",
"in": "query",
"required": true,
"schema": {
"type": "string",
"default": "The @Humane video is fascinating on so many levels. I think people miss the point about how emotionally empty it feels. It’s because smartphones sucked everything out of us. And their device is there to reconnect us to the world. It was purposely recorded this way."
}
}
],
"responses": [
{
"statusCode": "200",
"description": "200",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"text": {
"type": "string"
},
"hash": {
"type": "string"
},
"trace_id": {
"type": "string"
},
"topics": {
"type": "array",
"items": {
"type": "object",
"properties": {
"label": {
"type": "string"
},
"confidence": {
"type": "number"
},
"rank": {
"type": "integer"
},
"label_id": {
"type": "integer"
}
}
}
},
"elapsed_time": {
"type": "number"
}
}
},
"example": {
"text": "The @Humane video is fascinating on so many levels. I think people miss the point about how emotionally empty it feels. It’s because smartphones sucked everything out of us. And their device is there to reconnect us to the world. It was purposely recorded this way.",
"hash": "967ad042489e8184ce37de3b90036b17ea7fd974bd564b7b87c06b9437e9ca51",
"trace_id": "aed15a35-9765-4779-beef-765277f34ea3",
"topics": [
{
"label": "Film Tv & Video",
"confidence": 0.8309035897254944,
"rank": 1,
"label_id": 6
},
{
"label": "Science & Technology",
"confidence": 0.43547123670578,
"rank": 2,
"label_id": 15
},
{
"label": "Diaries & Daily Life",
"confidence": 0.2036248743534088,
"rank": 3,
"label_id": 3
},
{
"label": "News & Social Concern",
"confidence": 0.114760160446167,
"rank": 4,
"label_id": 12
},
{
"label": "Learning & Educational",
"confidence": 0.06240042671561241,
"rank": 5,
"label_id": 10
},
{
"label": "Travel & Adventure",
"confidence": 0.06051795557141304,
"rank": 6,
"label_id": 17
},
{
"label": "Arts & Culture",
"confidence": 0.05182615667581558,
"rank": 7,
"label_id": 0
},
{
"label": "Youth & Student Life",
"confidence": 0.029425838962197304,
"rank": 8,
"label_id": 18
},
{
"label": "Business & Entrepreneurs",
"confidence": 0.02604186534881592,
"rank": 9,
"label_id": 1
},
{
"label": "Other Hobbies",
"confidence": 0.023914171382784843,
"rank": 10,
"label_id": 13
},
{
"label": "Celebrity & Pop Culture",
"confidence": 0.019804231822490692,
"rank": 11,
"label_id": 2
},
{
"label": "Family",
"confidence": 0.01353931799530983,
"rank": 12,
"label_id": 4
},
{
"label": "Relationships",
"confidence": 0.011448417790234087,
"rank": 13,
"label_id": 14
},
{
"label": "Fitness & Health",
"confidence": 0.009750178083777428,
"rank": 14,
"label_id": 7
},
{
"label": "Music",
"confidence": 0.009229288436472416,
"rank": 15,
"label_id": 11
},
{
"label": "Food & Dining",
"confidence": 0.006356519181281328,
"rank": 16,
"label_id": 8
},
{
"label": "Gaming",
"confidence": 0.006221442949026823,
"rank": 17,
"label_id": 9
},
{
"label": "Sports",
"confidence": 0.003884031902998686,
"rank": 18,
"label_id": 16
},
{
"label": "Fashion & Style",
"confidence": 0.0036840285174548626,
"rank": 19,
"label_id": 5
}
],
"elapsed_time": 0.13503004051744938
}
}
}
}
]
}Pricing
$0.01per successful request
Credits are deducted from your agntdata balance on each successful API call. Failed requests (4xx/5xx) are not charged.
Related endpoints
Start using this endpoint
Generate your API key and make your first call in under a minute. Free tier available with transparent pricing.
X APIX data APItopic classification APIAI agents data APIX APIX data APIX for AI agents