> ## Documentation Index
> Fetch the complete documentation index at: https://www.edenai.co/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Search With Provider

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



## OpenAPI

````yaml https://api.edenai.run/v3/docs/openapi.json post /v3/search/{provider}
openapi: 3.1.0
info:
  title: Eden AI API V3
  version: 3.0.0
servers:
  - url: https://api.edenai.run
    description: Production server
security: []
paths:
  /v3/search/{provider}:
    post:
      tags:
        - Search
      summary: Search With Provider
      description: >-
        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.
      operationId: search_with_provider_v3_search__provider__post
      parameters:
        - name: provider
          in: path
          required: true
          schema:
            type: string
            title: Provider
      requestBody:
        content:
          application/json:
            schema:
              properties:
                query:
                  type: string
                  minLength: 1
                  title: Query
                  description: The search query.
                model:
                  anyOf:
                    - type: string
                    - type: 'null'
                  title: Model
                  description: >-
                    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:
                  type: integer
                  maximum: 20
                  minimum: 1
                  title: Max Results
                  description: Number of results to return (1-20).
                  default: 10
                search_domain_filter:
                  anyOf:
                    - items:
                        type: string
                      type: array
                      maxItems: 20
                      minItems: 1
                    - type: 'null'
                  title: Search Domain Filter
                  description: >-
                    Domains to restrict results to, or, with a leading `-`,
                    domains to exclude (`-pinterest.com`). Allow and deny
                    entries cannot be mixed.
                country:
                  anyOf:
                    - type: string
                      pattern: ^[A-Za-z]{2}$
                    - type: 'null'
                  title: Country
                  description: >-
                    ISO 3166-1 alpha-2 country code to bias results toward, e.g.
                    `US`.
              additionalProperties: false
              type: object
              required:
                - query
              title: SearchBody
              description: >-
                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. Fields of

                Perplexity's API that no provider here maps to
                (`search_recency_filter`,

                `max_tokens_per_page`, ...) are rejected rather than silently
                dropped.
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SearchResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - AuthBearer: []
components:
  schemas:
    SearchResponse:
      properties:
        id:
          type: string
          title: Id
          description: Eden AI request id; quote it when reporting a problem.
        results:
          items:
            $ref: '#/components/schemas/SearchResult'
          type: array
          title: Results
        provider:
          type: string
          title: Provider
          description: 'Eden extension: provider that ran the search.'
        cost:
          type: number
          title: Cost
          description: 'Eden extension: cost in USD.'
      type: object
      required:
        - id
        - results
        - provider
        - cost
      title: SearchResponse
      description: >-
        Search results, in Perplexity's response shape. `provider` and `cost`
        are Eden extensions.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    SearchResult:
      properties:
        title:
          type: string
          title: Title
          description: Page title; empty when the provider returns none.
          default: ''
        url:
          type: string
          title: Url
          description: Result URL.
        snippet:
          type: string
          title: Snippet
          description: Text excerpt of the page.
          default: ''
        date:
          anyOf:
            - type: string
            - type: 'null'
          title: Date
          description: 'Always null: providers here do not date results.'
        last_updated:
          anyOf:
            - type: string
            - type: 'null'
          title: Last Updated
          description: Always null.
      type: object
      required:
        - url
      title: SearchResult
      description: One search result, in Perplexity's result shape.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    AuthBearer:
      type: http
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.