metaphor-python
A Python package for the Metaphor API.
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 on this page — 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
metaphor-python on PyPI
pip
pip install metaphor-pythonuv
uv add metaphor-pythonpoetry
poetry add metaphor-pythonInstalling 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 | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — requests |
| Maintenance | actively maintained — 988 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 146,131/month — #11,106 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: metaphor_python-0.1.23-py3-none-any.whl
Tags
More WWW/HTTP packages
urllib3 is an HTTP client library that provides…
permissive · top 100 on PyPI
requestsRequests is a Python HTTP library that…
permissive · top 100 on PyPI
h11h11 is a pure-Python HTTP/1.1 protocol…
permissive · top 100 on PyPI
httpxHTTPX is a fully featured HTTP client library…
permissive · top 100 on PyPI
httpcoreA minimal low-level HTTP client library that…
permissive · top 100 on PyPI
aiohttpaiohttp is an async HTTP client and server…
permissive · top 100 on PyPI
exa-pyA Python SDK for the Exa web search API that…
permissive · top 5,000 on PyPI
seltzSeltz is a Python SDK that provides web search…
unclear · top 15,000 on PyPI
langchain-exaIntegrates Exa's web search API with LangChain,…
permissive · top 15,000 on PyPI
gnewsGNews searches Google News RSS feeds and…
permissive · top 15,000 on PyPI
agent-framework-devuiProvides a lightweight web UI and…
permissive · top 15,000 on PyPI
zai-sdkOfficial Python SDK for Z.ai's large model…
unclear · top 15,000 on PyPI
zenrowsPython client for the ZenRows web scraping API…
permissive · top 15,000 on PyPI
pycdcSearches the web for gift ideas and client…
permissive · top 15,000 on PyPI
chonkieChonkie splits text into semantically…
permissive · top 5,000 on PyPI
haystack-experimentalProvides archived experimental features for…
permissive · top 15,000 on PyPI