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.3.0.tar.gz (12.2 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.3.0-py3-none-any.whl (14.8 kB view details)

Uploaded Python 3

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

Hashes for langchain_xpoz-0.3.0.tar.gz
Algorithm Hash digest
SHA256 309709848cd9f41e14313c346f411b065659933bfde3680c29ba58a04432e78c
MD5 e7312950287465d3db52296059437326
BLAKE2b-256 c521922f026fa0201a263a095e142df2607d6fe00ec515d977c78cb971b7ca0c

See more details on using hashes here.

Provenance

The following attestation bundles were made for langchain_xpoz-0.3.0.tar.gz:

Publisher: release.yml on XPOZpublic/langchain-xpoz

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for langchain_xpoz-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8842478ba1faf9eda7ad755a4bfa497bef59591b11e42ac4f6592b1d774e0d6f
MD5 98628ff97d943abe26bacf3ee062a381
BLAKE2b-256 aff8e8ca00b2a468b9d031160dc51305388702ee1b445c75e73fdbecbab15b92

See more details on using hashes here.

Provenance

The following attestation bundles were made for langchain_xpoz-0.3.0-py3-none-any.whl:

Publisher: release.yml on XPOZpublic/langchain-xpoz

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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