Social Intel API + LangChain
Search Instagram influencers and get business emails using LangChain. Full setup guide with code examples.
Quick Setup
- Create a LangChain tool wrapping the Social Intel API
- Handle x402 payment in the tool or use the MCP server instead
- Add the tool to your agent's tool list
- The agent can now search influencers as part of its reasoning chain
Code Example
from langchain.tools import tool
import httpx
@tool
def search_influencers(query: str, country: str = "United States") -> str:
"""Search Instagram influencers by niche keyword and country.
Returns profiles with business emails."""
response = httpx.get(
"https://socialintel.dev/v1/search",
params={"query": query, "country": country, "limit": 20},
# x402 payment handled by middleware
)
return response.json()
# Add to your agent:
from langchain.agents import initialize_agent
agent = initialize_agent(
tools=[search_influencers],
llm=llm,
agent="zero-shot-react-description",
)
What You Get Back
Each search returns up to 100 Instagram profiles with:
- Username — Instagram handle
- Full name — display name
- Followers — follower count
- Category — niche (fitness, beauty, travel, etc.)
- Public email — business email from bio (when available)
- Verified — blue checkmark status
Pricing
$0.10 per search (20 results). Up to 100 results for $0.26. Paid in USDC via x402 protocol — no API keys, no subscription.
Also Available via MCP
Social Intel also offers an MCP (Model Context Protocol) server for AI agent integration:
npx -y social-intel-mcp
The MCP server exposes a search_leads tool that AI agents (Claude, Cursor, etc.) can call directly.
Start Building with LangChain
$0.10/search. No signup. Full LangChain code example above.
View API Docs →