langchain-xpoz
LangChain integration for Xpoz social media intelligence. Access Twitter/X, Instagram, Reddit, and TikTok data directly from your LangChain agents — no social media API keys required.
Installation
pip install langchain-xpoz
Quick Start
Get a free access key at xpoz.ai/get-token, then:
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 |
| 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 |
| 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:
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
Release files for langchain-xpoz 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| langchain_xpoz-0.3.0.tar.gz | 12.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| langchain_xpoz-0.3.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 26.9 kB
Release files / langchain_xpoz-0.3.0.tar.gz
| Download URL | langchain_xpoz-0.3.0.tar.gz |
|---|---|
| Size | 12.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
309709848cd9f41e14313c346f411b065659933bfde3680c29ba58a04432e78c
|
|
BLAKE2b-256 checksum How to use checksums |
c521922f026fa0201a263a095e142df2607d6fe00ec515d977c78cb971b7ca0c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 24, 2026.
Transparency logRelease files / langchain_xpoz-0.3.0-py3-none-any.whl
| Download URL | langchain_xpoz-0.3.0-py3-none-any.whl |
|---|---|
| Size | 14.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8842478ba1faf9eda7ad755a4bfa497bef59591b11e42ac4f6592b1d774e0d6f
|
|
BLAKE2b-256 checksum How to use checksums |
aff8e8ca00b2a468b9d031160dc51305388702ee1b445c75e73fdbecbab15b92
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 24, 2026.
Transparency log