Skip to main content

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

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:

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

langchain_xpoz-0.1.0.tar.gz (8.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

langchain_xpoz-0.1.0-py3-none-any.whl (12.8 kB view details)

Uploaded Python 3

File details

Details for the file langchain_xpoz-0.1.0.tar.gz.

File metadata

  • Download URL: langchain_xpoz-0.1.0.tar.gz
  • Upload date:
  • Size: 8.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for langchain_xpoz-0.1.0.tar.gz
Algorithm Hash digest
SHA256 14b382f0516c51da17ed824888592ea10f28d9e3bfdd058c04ef42661aa188de
MD5 f2134baf69e799936278f3f65d8974a0
BLAKE2b-256 ac3306d325180206e8b5cdfa16ce1f8da752100f425b4b84a8a460d161c35211

See more details on using hashes here.

File details

Details for the file langchain_xpoz-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: langchain_xpoz-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 12.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for langchain_xpoz-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c83f8c25004512f47ff1ae09f791c11ce5fdbd3291ab2732349d27d5c22027bc
MD5 5143af372cfb30d9d2f93e2dc2b89e15
BLAKE2b-256 fd4c41eac37f24c6a408aa86201cab1a2eac870e7814f1e3437b599fec1bc0c8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page