> ## Documentation Index
> Fetch the complete documentation index at: https://aomilabs-victor-docs-redirect-build-overview.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# X APIs

> Aomi tools for the X (Twitter) API v2 covering user profile lookup, timelines, advanced post search, and trending topics for cross-referencing onchain activity.

Aomi integrates the **X (Twitter) API v2** for social intelligence. Look up user profiles, read timelines, search posts with advanced operators, and track trending topics. All endpoints require a Bearer token from the [X Developer Portal](https://developer.x.com). Aomi wraps these as tools so your AI assistant can query social data and cross-reference it with onchain activity.

## Available Tools

The X App registers exactly five read only tools.

| Tool               | Description                          |
| ------------------ | ------------------------------------ |
| `get_x_user`       | Look up a user by handle             |
| `get_x_user_posts` | Fetch recent posts from a user       |
| `search_x`         | Search posts with advanced operators |
| `get_x_trends`     | Current trending topics by location  |
| `get_x_post`       | Fetch a single post by ID            |

## Example Conversations

**Social research:**

> "What's trending in crypto right now?"
> "Show me the latest posts from @VitalikButerin"
> "Search for posts about 'ETH ETF' from the past 24 hours"

**Cross-referencing:**

> "Find influencers talking about Arbitrum and check their wallet activity"
> "What projects are trending on X? Any overlap with top DeFi protocols?"

## How It Works

1. User asks about social data or trending topics
2. The assistant calls the relevant X API v2 endpoint
3. Results can be cross-referenced with onchain data from other tools
4. The assistant synthesizes findings into a natural response

## Prerequisites

To use X API tools, you need a Bearer token from the [X Developer Portal](https://developer.x.com). The Aomi App must be configured with this token at deployment time.

## Next Steps

* [DeFi Aggregators](/examples/defi-aggregators): cross-chain swaps and liquidity
* [Polymarket](/examples/polymarket): prediction market integration
* [Custom Tools](/guides/custom-tools): build your own tools
