skillfed

metaphor-python

A Python package for the Metaphor API.

metaphor-python v0.1.23 146.1K downloads/30d#11,106 on PyPI227
Permissive license Active released

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-python

uv

uv add metaphor-python

poetry

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 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

Development Status :: 3 - AlphaIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 3Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9

Tags

web search api pythonai search sdkstructured web searchagent-based research apisemantic search pythonai research toolsweb scraping with search
web-search-apiai-researchstructured-output

More WWW/HTTP packages