---
title: "Search With Provider"
method: POST
path: "/v3/search/{provider}"
tags: ["Search"]
---

# Search With Provider

`POST /v3/search/{provider}`

## Request

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

Search the web with the provider named in the path.

Same request and response as POST /v3/search, for clients whose body is
fixed but whose endpoint URL is configurable (Open WebUI's
`perplexity_search` engine: set its URL to `/v3/search/tavily`). A `model`
in the body, if present, must name the same provider.

## Path parameters

- `provider` string, required

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

## Other responses

- `422`: Validation Error

---

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