---
title: "Search"
method: POST
path: "/v3/search"
tags: ["Search"]
---

# Search

`POST /v3/search`

## Request

- Base URL: `https://api.edenai.run`
- URL: `https://api.edenai.run/v3/search`
- Auth: HTTP bearer

Search the web with a Perplexity-shaped request.

Send a `query` and the provider as `model` (`tavily`, `linkup`, `firecrawl`,
`deepseek`, `perplexityai`, `zai`; see GET /v3/search/models), optionally
`max_results`. `search_domain_filter` is taken by `tavily`, `linkup` and
`perplexityai`, `country` by `tavily` and `perplexityai`; any other provider
answers either with a 400. Results come back as `{title, url, snippet}` items; `provider`
and `cost` (USD) are Eden AI extensions. With the Perplexity SDK, pass the
provider through `extra_body={"model": "tavily"}`.

## Request body

- object: Request body for ``POST /v3/search``. Perplexity's Search API shape (`query`, `max_results`, `search_domain_filter`, `country`) plus `model`, the Eden AI provider that runs the search. Any other field (`search_recency_filter`, `max_tokens_per_page`, `depth`, ...) is refused with a 422 naming it (`extra="forbid"`): the facade maps only these fields onto each provider, so an unmapped one is never dropped without an error.
  - `query` string, required: The search query. At most 128 characters on `deepseek`.
  - `model` string, nullable: Search provider, e.g. `tavily`. Optional when the provider is in the path (`POST /v3/search/{provider}`). List the ids with GET /v3/search/models.
  - `max_results` integer: Most results to return (1-20). A provider may return fewer; on `zai` the results are cut to this number after the search.
  - `search_domain_filter` string[], nullable: Domains to restrict results to, or, with a leading `-`, domains to exclude (`-pinterest.com`). Allow and deny entries cannot be mixed. Up to 20.
  - `country` string, nullable: ISO 3166-1 alpha-2 country code to bias results toward, e.g. `US`.

## Response `200`

Successful Response

- SearchResponse: Search results, in Perplexity's response shape. `provider` and `cost` are Eden extensions.
  - `id` string, required: Eden AI request id; quote it when reporting a problem.
  - `results` SearchResult[], required
    - `title` string: Page title; empty when the provider returns none.
    - `url` string, required: Result URL.
    - `snippet` string: Text excerpt of the page.
    - `date` string, nullable: Always null: the date a provider may report is not carried through.
    - `last_updated` string, nullable: Always null: the date a provider may report is not carried through.
  - `provider` string, required: Eden extension: provider that ran the search.
  - `cost` number, required: Eden extension: cost in USD.

---

[API](https://skmtc.dev/edenai/apis/eden-ai-api-v3.md) - [All operations](https://skmtc.dev/edenai/apis/eden-ai-api-v3/llms.txt) - [OpenAPI document](https://skmtc.dev/edenai/apis/eden-ai-api-v3/revisions/20ddfd49a3f4?raw)
