An open API service indexing awesome lists of open source software.

https://github.com/tomoima525/x-analysis-agent

An AI Agent to analyze what people are thinking by observing posts on X(Twitter)
https://github.com/tomoima525/x-analysis-agent

aiagent twitter-sentiment-analysis

Last synced: 7 months ago
JSON representation

An AI Agent to analyze what people are thinking by observing posts on X(Twitter)

Awesome Lists containing this project

README

          

# x-research

A tool to verify your hypothesis about what people think from analyzing X(Twitter) posts.

https://github.com/user-attachments/assets/bf067cb1-4f2d-41a0-8673-fd6b479b961c

## Preparation

- Install dependencies (using `bun`, but other package managers should work too):

```bash
bun install
```

- Create `.env` file and add OPENAI_TOKEN

```
OPENAI_API_KEY=sk-xxxxxxx
```

- Copy `auth.ts.sample` file to `auth.ts` and fill in the required values. This is required to access X(Twitter) API.

```
{
name: "auth_token",
value: "replace with your auth_token", // Update this token on your own!!!
domain: ".x.com",
path: "/",
expires: 1737996835.631708, // Change this to the future timestamp!!!
httpOnly: true,
secure: true,
sameSite: "None",
},
```

- You can retrieve `auth_token` using Chome Dev Tool(inside `cookies` section)
Screenshot 2025-01-21 at 4 03 36 PM

### Running the tool

```bash
bun run index.ts
```