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

> ## Agent Instructions
> - Base URLs: models `https://api.aisa.one/v1` (Gemini GenerateContent: `https://api.aisa.one/v1beta`); data APIs `https://api.aisa.one/apis/v1`. The `servers` of each operation in https://aisa.one/openapi.yaml is authoritative.
> - Auth: `Authorization: Bearer $AISA_API_KEY`. Never print, log, or commit the key.
> - MCP (preferred for agents): `https://mcp.aisa.one/mcp`, signed in with OAuth, so there is no key to paste.
> - Agent Skill: `npx skills add AIsa-team/agent-skills --skill aisa`. Fallback with the AIsa CLI: `aisa skills install aisa`.
> - Spending: docs, https://aisa.one/models, https://aisa.one/api, `/v1/models`, and MCP `search`, `list_categories`, `get_details`, `batch_quote`, and the `account` operation are free. Quote the exact calls before running them (MCP `batch_quote`, CLI `aisa quote --json`). If the quote reports `auto_execute_eligible: true`, run it unless the user set a tighter limit or asked only for a quote. Otherwise, tell the user in one message the planned calls, the quoted price, and a total USD budget for the task, then wait for approval. Direct HTTP calls follow the stricter rule at https://aisa.one/docs/get-started/cli.md#direct-http-fallback. Do not make paid calls to test availability. Full rule: https://aisa.one/llms.txt

# AIsa Twitter API

> Read X/Twitter profiles, timelines, tweets, trends, and communities.

[View on GitHub →](https://github.com/AIsa-team/agent-skills/tree/main/social-media/aisa-twitter-api)

**Twitter/X data access for agents.** Use AIsa to read profiles, timelines, tweets, trends, communities, lists, Spaces, and related social context.

## Install

```bash npx skills theme={null}
npx skills add AIsa-team/agent-skills --skill aisa-twitter-api
```

```bash AIsa CLI theme={null}
npm install -g @aisa-one/cli
aisa skills install aisa-twitter-api
```

Start a new agent session after installing so the skill loads.

## What can agents do with it?

> [card] Profile research
>
> Inspect users, bios, timelines, and relationships.

> [card] Tweet search
>
> Find tweets, trends, lists, spaces, and communities.

> [card] Audience maps
>
> Review followers, following, and network context.

> [card] Conversation context
>
> Pull thread and Grok conversation context for analysis.

## When to use

* When the user wants one primary Twitter/X skill for research, monitoring, trend discovery, timeline review, or content discovery.
* When the user needs to inspect profiles, timelines, mentions, trends, replies, quotes, lists, communities, or Spaces.
* When the user wants to draft or publish posts after explicit OAuth approval without sharing passwords or browser cookies.
* When the workflow should use `AISA_API_KEY` and relay-based access to `https://api.aisa.one` instead of local credential extraction.

## When NOT to use

* Do NOT use this for password-based login, cookie extraction, or browser credential scraping.
* Do NOT use this when the workflow must avoid relay-based requests to `https://api.aisa.one`.
* Do NOT use this as the primary skill for like, follow, reply, or growth-action workflows better handled by [`aisa-twitter-post-engage`](https://aisa.one/docs/agent-skills/aisa-twitter-post-engage).

## Quick Reference

* Required environment variable: `AISA_API_KEY`
* Required binary: `python3`
* Read client: `scripts/twitter_client.py`
* OAuth and posting client: `scripts/twitter_oauth_client.py`
* Posting guide: `references/post_twitter.md`
* Relay target: `https://api.aisa.one`
* External writes: posting happens only after explicit OAuth approval
* Upload behavior: image and video posting sends user-selected media through the relay

## Setup

```bash theme={null}
export AISA_API_KEY="your-key"
```

Requirements:

* `python3`
* `AISA_API_KEY`
* Internet access to `https://api.aisa.one`
* Explicit OAuth approval before posting
* User-provided media files when posting images or videos

## Capabilities

* Read user data, timelines, mentions, followers, followings, and related profile information.
* Search tweets and users, inspect replies, quotes, retweeters, thread context, trends, lists, communities, and Spaces.
* Run watchlist-style research and monitoring workflows from one Twitter/X command surface.
* Publish text, image, and video posts after explicit OAuth approval.

## High-Intent Workflows

* Research a creator, competitor, brand, or narrative before writing.
* Monitor a keyword, launch, or watchlist and pull representative tweets quickly.
* Review timelines, mentions, replies, and trend movement from one command surface.
* Draft and publish a post only after the user explicitly approves OAuth.

## Common Commands

```bash theme={null}
python3 scripts/twitter_client.py search --query "AI agents" --type Latest
python3 scripts/twitter_oauth_client.py authorize
python3 scripts/twitter_oauth_client.py post --text "Hello from AIsa"
```

## Guardrails

* Do not ask for Twitter/X passwords or browser cookies.
* Do not invent captions, tweet URLs, or attachment files.
* Do not claim external posting succeeded until the API confirms success.
* Do not imply OAuth is optional for posting.

## Example Requests

* Research what builders on X are saying about AI agents this week.
* Track reactions to our product launch and pull representative tweets.
* Build a small watchlist of competitor accounts and summarize what changed today.
* Authorize and publish a short Twitter post with an attached image.

## Security Notes

* This is a relay-based workflow that sends Twitter/X API requests to `https://api.aisa.one`.
* Posting requires explicit OAuth approval through the relay before external writes occur.
* Approved image and video posting sends user-selected media through the relay for upload.
* Required secret: `AISA_API_KEY`.
* This workflow does not require passwords or browser cookie extraction.

## Get started

1. Sign up at [aisa.one](https://aisa.one) and create an API key in the console.
2. Set it in your shell: `export AISA_API_KEY="your-key"`.
3. Install the skill with one of the commands under [Install](#install), then start a new agent session.

## Related

> [card] [Twitter Autopilot](https://aisa.one/docs/agent-skills/twitter-autopilot.md)
>
> Full X/Twitter search and engagement workflows.

> [card] [AIsa Twitter Command Center](https://aisa.one/docs/agent-skills/aisa-twitter-command-center.md)
>
> Command-style X/Twitter workflows.

> [card] [Twitter API reference](https://aisa.one/docs/api-reference/twitter/get_twitter-user-info.md)
>
> X/Twitter endpoint docs.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.