> ## Documentation Index
> Fetch the complete documentation index at: https://docs.postsyncer.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Analyze X/Twitter Post

> Fetch a public X/Twitter post and replies, then answer a question with AI

## Analyze X/Twitter Post

This works on **any** public tweet URL - the post does not need to exist in your PostSyncer workspace.

### Body

<ParamField body="url" type="string" required>
  Full public X/Twitter status URL (e.g. `https://x.com/username/status/1234567890` or `https://twitter.com/username/status/1234567890`).
</ParamField>

<ParamField body="question" type="string" required>
  Your question about the post and its replies (3–2000 characters). Examples: overall sentiment, common objections, feature requests, or whether people agree with the author.
</ParamField>

<RequestExample>
  ```bash theme={null}
  curl -X POST "https://postsyncer.com/api/v1/posts/analyze-twitter" \
    -H "Authorization: Bearer YOUR_API_TOKEN" \
    -H "Content-Type: application/json" \
    -d '{
      "url": "https://x.com/postsyncer/status/1234567890",
      "question": "What is the overall sentiment in the replies?"
    }'
  ```
</RequestExample>

### Response

`200` - JSON object:

<ResponseField name="answer" type="string">
  AI-generated answer based on the post and fetched replies.
</ResponseField>

<ResponseField name="tweet" type="object">
  Normalized post metadata: `id`, `url`, `text`, `author`, `created_at`, and `metrics` (`likes`, `replies`, `reposts`, `views`, `quotes`, `bookmarks`).
</ResponseField>

```json theme={null}
{
  "answer": "Most replies are positive, with users praising the launch timeline...",
  "tweet": {
    "id": "1234567890",
    "url": "https://x.com/postsyncer/status/1234567890",
    "text": "We just shipped a new feature...",
    "author": "@postsyncer",
    "created_at": "2026-05-20T12:00:00.000Z",
    "metrics": {
      "likes": 120,
      "replies": 45,
      "reposts": 18,
      "views": 12000,
      "quotes": 3,
      "bookmarks": 9
    }
  }
}
```

### Error Codes

<ResponseField name="401" type="Unauthorized">
  Missing or invalid API token
</ResponseField>

<ResponseField name="403" type="Forbidden">
  Token does not have the `posts` ability
</ResponseField>

<ResponseField name="422" type="Validation Error">
  Invalid URL, unsupported link, tweet could not be fetched, or AI could not generate an answer
</ResponseField>

### MCP

The same action is available as the MCP tool **`analyze-twitter-post`** - see [MCP tools reference](/mcp/tools-reference).
