Metadata-Version: 2.4
Name: langchain-xpoz
Version: 0.2.0
Summary: LangChain integration for Xpoz social media intelligence — Twitter/X, Instagram, Reddit, TikTok
Project-URL: Homepage, https://xpoz.ai
Project-URL: Repository, https://github.com/xpoz-ai/langchain-xpoz
Project-URL: Issues, https://github.com/xpoz-ai/langchain-xpoz/issues
Author-email: Xpoz <support@xpoz.ai>
License-Expression: MIT
Keywords: ai-tools,brand-monitoring,influencer-discovery,instagram,langchain,llm-tools,osint,reddit,social-listening,social-media,tiktok,twitter,xpoz
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Software Development :: Libraries
Requires-Python: >=3.10
Requires-Dist: langchain-core>=0.3.0
Requires-Dist: xpoz>=0.7.0
Provides-Extra: test
Requires-Dist: langchain-tests>=0.3.0; extra == 'test'
Requires-Dist: pytest-asyncio>=0.21; extra == 'test'
Requires-Dist: pytest>=7.0; extra == 'test'
Description-Content-Type: text/markdown

# langchain-xpoz

LangChain integration for [Xpoz](https://xpoz.ai) social media intelligence. Access Twitter/X, Instagram, Reddit, and TikTok data directly from your LangChain agents — no social media API keys required.

## Installation

```bash
pip install langchain-xpoz
```

## Quick Start

Get a free access key at [xpoz.ai/get-token](https://xpoz.ai/get-token), then:

```python
from langchain_xpoz import XpozTwitterSearch, XpozInstagramUser
from langchain.agents import create_openai_tools_agent, AgentExecutor
from langchain_openai import ChatOpenAI

tools = [
    XpozTwitterSearch(api_key="your-xpoz-key"),
    XpozInstagramUser(api_key="your-xpoz-key"),
]

llm = ChatOpenAI(model="gpt-4o")
agent = create_openai_tools_agent(llm=llm, tools=tools, prompt=prompt)
executor = AgentExecutor(agent=agent, tools=tools)

result = executor.invoke({
    "input": "What are people saying about AI agents on Twitter this week?"
})
```

You can also set the `XPOZ_API_KEY` environment variable instead of passing `api_key`.

## Available Tools

### Twitter/X
| Tool | Description |
|------|-------------|
| `XpozTwitterSearch` | Search posts by keywords, hashtags, or phrases |
| `XpozTwitterUser` | Get a user profile by username or ID |
| `XpozTwitterUserPosts` | Get posts by a specific user |
| `XpozTwitterPostComments` | Get replies to a specific tweet |
| `XpozTwitterSearchUsers` | Search users by name |
| `XpozTwitterUserConnections` | Get a user's followers or following |
| `XpozTwitterUsersByKeywords` | Find users who posted about specific topics |
| `XpozTwitterCountPosts` | Count posts matching a phrase |

### Instagram
| Tool | Description |
|------|-------------|
| `XpozInstagramSearch` | Search posts by keywords |
| `XpozInstagramUser` | Get a user profile by username or ID |
| `XpozInstagramUserPosts` | Get posts by a specific user |
| `XpozInstagramPostComments` | Get comments on a post |
| `XpozInstagramSearchUsers` | Search users by name |
| `XpozInstagramUsersByKeywords` | Find users who posted about specific topics |

### Reddit
| Tool | Description |
|------|-------------|
| `XpozRedditSearch` | Search posts by keywords, filter by subreddit |
| `XpozRedditUser` | Get a user profile |
| `XpozRedditPostWithComments` | Get a post with its comment thread |
| `XpozRedditSearchComments` | Search comments by keywords |
| `XpozRedditSearchSubreddits` | Search subreddits by name or topic |
| `XpozRedditSubreddit` | Get subreddit info with recent posts |
| `XpozRedditUsersByKeywords` | Find users who posted about specific topics |

### TikTok
| Tool | Description |
|------|-------------|
| `XpozTiktokSearch` | Search videos by keywords |
| `XpozTiktokUser` | Get a creator profile |
| `XpozTiktokUserPosts` | Get videos by a specific creator |
| `XpozTiktokPostComments` | Get comments on a video |
| `XpozTiktokSearchUsers` | Search creators by name |
| `XpozTiktokPostsByHashtags` | Search videos by hashtags |
| `XpozTiktokUsersByKeywords` | Find creators who posted about specific topics |

### Tracking & Account
| Tool | Description |
|------|-------------|
| `XpozGetTrackedItems` | List all tracked keywords, users, hashtags |
| `XpozAddTrackedItems` | Start tracking new items across platforms |
| `XpozRemoveTrackedItems` | Stop tracking items |
| `XpozAccountDetails` | Get account plan, usage, and billing info |

## Configuration

All tools accept `api_key` as a constructor parameter:

```python
tool = XpozTwitterSearch(api_key="your-xpoz-key")
```

Or set the `XPOZ_API_KEY` environment variable.

## Use Cases

- **Brand Monitoring** — track what people say about your brand across all platforms
- **Competitive Intelligence** — analyze competitors' social media presence and engagement
- **Influencer Discovery** — find relevant creators and opinion leaders by topic
- **Market Research** — understand public sentiment and trends from social conversations
- **OSINT** — gather open-source intelligence from public social media data

## License

MIT
