Groq

Exa + Groq: AI-Powered Web Search & Content Discovery

Exa is an AI-native search engine built specifically for LLMs. Unlike keyword-based search, Exa understands meaning and context, returning high-quality results that AI models can process. Combined with Groq's fast inference through MCP, you can build intelligent search applications that find exactly what you need in seconds.

Key Features:

  • Semantic Understanding: Searches by meaning, not just keywords
  • AI-Ready Results: Clean, structured data designed for LLM consumption
  • Company Research: Dedicated tools for researching businesses
  • Content Extraction: Pull full article content from any URL
  • LinkedIn Search: Find companies and people on professional networks
  • Deep Research: Multi-hop research synthesizing multiple sources

Quick Start

1. Install the required packages:

bash
pip install openai python-dotenv

2. Get your API keys:

bash
export GROQ_API_KEY="your-groq-api-key"
export EXA_API_KEY="your-exa-api-key"

3. Create your first intelligent search agent:

python
import os
from openai import OpenAI

client = OpenAI(
    base_url="https://api.groq.com/api/openai/v1",
    api_key=os.getenv("GROQ_API_KEY")
)

tools = [{
    "type": "mcp",
    "server_url": f"https://mcp.exa.ai/mcp?exaApiKey={os.getenv('EXA_API_KEY')}",
    "server_label": "exa",
    "require_approval": "never",
}]

response = client.responses.create(
    model="openai/gpt-oss-120b",
    input="Find recent breakthroughs in quantum computing research",
    tools=tools,
    temperature=0.1,
    top_p=0.4,
)

print(response.output_text)

Advanced Examples

Company Research

Deep dive into a company:

python
response = client.responses.create(
    model="openai/gpt-oss-120b",
    input="""Research Anthropic:
    - What they do
    - Main products
    - Recent news and announcements
    - Company size and funding
    Use company_research tool""",
    tools=tools,
    temperature=0.1,
)

print(response.output_text)

Content Extraction

Extract and analyze article content:

python
response = client.responses.create(
    model="openai/gpt-oss-120b",
    input="""Extract content from these AI inference articles:
    - https://example.com/article1
    - https://example.com/article2
    
    Summarize key points and trends""",
    tools=tools,
    temperature=0.1,
)

print(response.output_text)

Find companies in specific industries:

python
response = client.responses.create(
    model="openai/gpt-oss-120b",
    input="""Find AI infrastructure startups on LinkedIn:
    - 50-200 employees
    - SF or NYC
    - Founded last 3 years
    Use linkedin_search for detailed profiles""",
    tools=tools,
    temperature=0.1,
)

print(response.output_text)

Available Exa Search Tools

ToolDescription
web_search_exaSemantic web search understanding meaning and context
company_researchResearch companies by crawling official websites
crawlingExtract complete content from specific URLs
linkedin_searchSearch LinkedIn with specific criteria
deep_researcher_startBegin comprehensive multi-hop research
deep_researcher_checkCheck status and retrieve completed reports

Challenge: Build an automated market intelligence system that monitors your industry for competitors, tracks technology trends, identifies customers, and generates weekly reports!

Additional Resources

Was this page helpful?