LangChain integration for Xpoz social media intelligence — Twitter/X, Instagram, Reddit, TikTok
Project description
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file langchain_xpoz-0.3.0.tar.gz.
File metadata
- Download URL: langchain_xpoz-0.3.0.tar.gz
- Upload date:
- Size: 12.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
309709848cd9f41e14313c346f411b065659933bfde3680c29ba58a04432e78c
|
|
| MD5 |
e7312950287465d3db52296059437326
|
|
| BLAKE2b-256 |
c521922f026fa0201a263a095e142df2607d6fe00ec515d977c78cb971b7ca0c
|
Provenance
The following attestation bundles were made for langchain_xpoz-0.3.0.tar.gz:
Publisher:
release.yml on XPOZpublic/langchain-xpoz
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
langchain_xpoz-0.3.0.tar.gz -
Subject digest:
309709848cd9f41e14313c346f411b065659933bfde3680c29ba58a04432e78c - Sigstore transparency entry: 1935367454
- Sigstore integration time:
-
Permalink:
XPOZpublic/langchain-xpoz@4eecc5bba9956730c3c0cfcd97efd3eba0976a94 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/XPOZpublic
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@4eecc5bba9956730c3c0cfcd97efd3eba0976a94 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file langchain_xpoz-0.3.0-py3-none-any.whl.
File metadata
- Download URL: langchain_xpoz-0.3.0-py3-none-any.whl
- Upload date:
- Size: 14.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8842478ba1faf9eda7ad755a4bfa497bef59591b11e42ac4f6592b1d774e0d6f
|
|
| MD5 |
98628ff97d943abe26bacf3ee062a381
|
|
| BLAKE2b-256 |
aff8e8ca00b2a468b9d031160dc51305388702ee1b445c75e73fdbecbab15b92
|
Provenance
The following attestation bundles were made for langchain_xpoz-0.3.0-py3-none-any.whl:
Publisher:
release.yml on XPOZpublic/langchain-xpoz
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
langchain_xpoz-0.3.0-py3-none-any.whl -
Subject digest:
8842478ba1faf9eda7ad755a4bfa497bef59591b11e42ac4f6592b1d774e0d6f - Sigstore transparency entry: 1935367534
- Sigstore integration time:
-
Permalink:
XPOZpublic/langchain-xpoz@4eecc5bba9956730c3c0cfcd97efd3eba0976a94 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/XPOZpublic
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@4eecc5bba9956730c3c0cfcd97efd3eba0976a94 -
Trigger Event:
workflow_dispatch
-
Statement type: