Metaphor API connects your LLM to the internet.

What is the Metaphor API?

The Metaphor API is a one stop shop to connect your LLM to the internet.

  • Using the /search endpoint, your LLM can search using natural language and return a list of relevant webpages from our neural database. Metaphor's neural search allows your LLM to query in natural language. And if a query doesn't benefit from neural search, Metaphor also supports traditional Google-style keyword search.
  • Using the /contents endpoint, your LLM can request obtain clean, up-to-date HTML content from the search results you choose, no web crawling or scraping required.

After using /search to get list of results, your LLM can decide which results are relevant and use /contents to, for instance, summarize the results for the user. To see this exact flow in action, follow the Recent News Summarizer Example.

Getting Access


Getting a Metaphor API Key

Metaphor is free to use up to 1000 requests per month, for individual developers.

Get an API key here.

GPT-assisted implementation

There's no need to learn how to use our API all alone. Below are ChatGPT GPTs that you can ask about how to implement anything.

For Python SDK assistance, go here.

For Typescript SDK assistance, go here.

For any other language, go here.

A simple example

from metaphor_python import Metaphor
metaphor = Metaphor("METAPHOR_API_KEY")

results ='hottest AI agent startups', use_autoprompt=True)

More examples