--- id: metaphor-python version: "0.1.23" license: unclear license_treatment: permissive maintenance: active --- # metaphor-python — A Python package for the Metaphor API. License: permissive · Maintenance: active · Downloads: 146.1K/mo ## What it is and what it does The metaphor-python package is an official client library for Exa's web search API, designed to integrate AI-powered search into Python applications. It wraps HTTP calls to the Exa service via requests, providing methods for semantic web search, content extraction, question-answering, and agent-based research tasks. You instantiate a client with an API key, then call methods like search(), answer(), get_contents(), or agent.runs.create() to retrieve web data with optional structured output schemas and streaming. The package supports multiple search modes, custom output schemas for structured JSON results, system prompts for search refinement, and streaming responses. It also includes beta features for higher-effort research with cost budgets and entity tracking over time. All communication is synchronous by default, with an async variant for async/await workflows. The SDK is actively maintained but remains in Alpha, meaning the API may change. Use it for: - Build AI applications that need real-time web search results with semantic understanding and structured extraction. - Automate research tasks like finding engineering leaders at specific companies or tracking funding announcements. - Retrieve highlighted excerpts and full text from web pages for content analysis or knowledge base building. - Create agent workflows that answer complex questions by searching and synthesizing web data with custom output schemas. - Monitor entities for news and changes on a recurring schedule using the monitoring API. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Python SDK for the Exa web search API, providing search, content retrieval, and agent-based research capabilities with structured output and streaming support. Yes, if you need web search capabilities in a Python application and have access to an Exa API key. The low install friction, active maintenance, and permissive license make it straightforward to integrate. Be aware that the Alpha status means the API may change, and you'll incur costs based on Exa's pricing model. Not suitable if you need offline search or cannot use an external API service. ## Install pip install metaphor-python uv add metaphor-python poetry add metaphor-python ## Installing metaphor-python Before you install: Low friction install with a single runtime dependency (requests). Active maintenance with recent commits and steady download volume (146131 monthly). Alpha status suggests the API surface may evolve. License in practice: MIT license permits commercial and private use with minimal restrictions; permissive treatment means you can integrate freely without licensing concerns. Quickstart: pip install metaphor-python from metaphor_python import Exa exa = Exa(api_key="your-api-key") results = exa.search("machine learning startups", contents={"highlights": True}) Requires Python 3.9+; requires a valid Exa API key and active account. Verify before relying: - Whether the API key requirement and Exa service costs are clearly documented for budget planning - Rate limits and quota behavior under production load - Stability guarantees for beta features (Agent Max, Agent Monitors) - Whether Python 3.6, 3.7, 3.8 listed in classifiers are actually supported despite 3.9+ requirement in description ## Package facts - License: not declared (permissive) - Python support: unspecified - Install friction: low - Maintenance: active - Downloads: 146.1K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags web search api python, ai search sdk, structured web search, agent-based research api, semantic search python, ai research tools, web scraping with search, web-search-api, ai-research, structured-output [View on SkillFed](https://skillfed.io/packages/metaphor-python) · [View on PyPI](https://pypi.org/project/metaphor-python/)