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

# Run a prospect search

> Run a prospect search and return a preview. Nothing is added to your leads until you
create leads from it with `search_id`.

Send `description` or `filters` for people, companies and hiring searches. This operation can change workspace data or trigger an external side effect; review the request before sending it and do not retry blindly after a timeout.



## OpenAPI

````yaml /openapi.json post /api/v1/public/searches
openapi: 3.1.0
info:
  description: >-
    Customer-facing API for managing outreach, leads, conversations, voice
    agents, knowledge bases, analytics, and webhooks.
  title: Sendora Public API
  version: 1.0.0
servers:
  - description: Production
    url: https://api.sendora.ai
security: []
tags:
  - description: Leads, lead lists, importing, enriching and finding new prospects.
    name: Leads
  - description: Build, run and measure outreach, and enroll leads.
    name: Campaigns
  - description: Read and send messages, and manage who must not be contacted.
    name: Conversations
  - description: >-
      Voice and chat agents, their tools, knowledge bases, voices and website
      widgets.
    name: Agents
  - description: >-
      Start calls, and manage phone numbers, SMS registration, sending accounts
      and email domains.
    name: Calls and numbers
  - description: Webhooks, jobs, analytics and the Copilot assistant.
    name: Platform
  - description: Manage client workspaces, plans and branding.
    name: Agency
paths:
  /api/v1/public/searches:
    post:
      tags:
        - Leads
      summary: Run a prospect search
      description: >-
        Run a prospect search and return a preview. Nothing is added to your
        leads until you

        create leads from it with `search_id`.


        Send `description` or `filters` for people, companies and hiring
        searches. This operation can change workspace data or trigger an
        external side effect; review the request before sending it and do not
        retry blindly after a timeout.
      operationId: run_search_api_v1_public_searches_post
      parameters:
        - in: header
          name: X-API-Key
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Api-Key
        - in: header
          name: Authorization
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Authorization
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SearchBody'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: >-
                      #/components/schemas/api__v1__leads__routes__prospect_finder__PreviewOut
                  - $ref: >-
                      #/components/schemas/api__v1__leads__routes__google_maps_preview__PreviewOut
                title: Response Run Search Api V1 Public Searches Post
          description: Successful Response
        '401':
          description: The X-API-Key header is missing, invalid, expired, or revoked.
        '402':
          description: >-
            The workspace is suspended for billing, or the request would exceed
            a plan or usage limit.
        '403':
          description: >-
            The key is valid but lacks the required scope, or the workspace has
            no active plan, lacks the entitlement, or has this feature turned
            off or view-only.
        '410':
          description: The workspace behind this key has been deleted.
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
        '500':
          description: >-
            An unexpected Sendora error occurred. Retry only if the operation is
            safe to repeat.
        '503':
          description: >-
            An entitlement or billing check is temporarily unavailable. Retry
            after the Retry-After interval.
      security:
        - ApiKeyAuth: []
      x-codeSamples:
        - label: cURL
          lang: bash
          source: >-
            curl -X POST 'https://api.sendora.ai/api/v1/public/searches' -H
            "X-API-Key: $SENDORA_API_KEY" -H "Content-Type: application/json" \
              -d '{"lead_list_id":"example"}'
        - label: Python
          lang: python
          source: >-
            import requests


            url = 'https://api.sendora.ai/api/v1/public/searches'

            headers = {'X-API-Key': '$SENDORA_API_KEY'}

            response = requests.post(url, headers=headers, json={'lead_list_id':
            'example'})

            response.raise_for_status()

            print(response.json())
        - label: JavaScript
          lang: javascript
          source: >-
            const response = await
            fetch("https://api.sendora.ai/api/v1/public/searches", {
              method: "POST",
              headers: { 'X-API-Key': process.env.SENDORA_API_KEY, 'Content-Type': 'application/json' },
              body: JSON.stringify({"lead_list_id": "example"}),
            });

            if (!response.ok) throw new Error(await response.text());

            console.log(await response.json());
        - label: Go
          lang: go
          source: >-
            req, err := http.NewRequest("POST",
            "https://api.sendora.ai/api/v1/public/searches",
            bytes.NewBufferString(`{"lead_list_id": "example"}`))

            if err != nil { log.Fatal(err) }

            req.Header.Set("X-API-Key", os.Getenv("SENDORA_API_KEY"))

            req.Header.Set("Content-Type", "application/json")

            resp, err := http.DefaultClient.Do(req)

            if err != nil { log.Fatal(err) }

            defer resp.Body.Close()
components:
  schemas:
    SearchBody:
      properties:
        company:
          anyOf:
            - type: string
            - type: 'null'
          description: 'company_employees: company LinkedIn URL or website.'
          title: Company
        countries:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          description: Countries returned by the Sendora API.
          title: Countries
        cursor:
          anyOf:
            - type: string
            - type: 'null'
          description: Cursor returned by the Sendora API.
          title: Cursor
        description:
          anyOf:
            - maxLength: 1000
              type: string
            - type: 'null'
          description: Describe who you want in plain words. Used when filters is not sent.
          title: Description
        filters:
          anyOf:
            - type: object
            - type: 'null'
          description: >-
            Search filters. Send description instead to have them written for
            you.
          title: Filters
        lead_list_id:
          description: >-
            A lead list's id: the `id` from List or read lead collections (type
            list).
          title: Lead List Id
          type: string
        limit:
          anyOf:
            - maximum: 500
              minimum: 1
              type: integer
            - type: 'null'
          description: Limit returned by the Sendora API.
          title: Limit
        locations:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          description: 'google_maps: where to look.'
          title: Locations
        page:
          anyOf:
            - minimum: 1
              type: integer
            - type: 'null'
          description: 'company_employees: which page of people to return.'
          title: Page
        page_size:
          default: 25
          description: Page size returned by the Sendora API.
          maximum: 50
          minimum: 1
          title: Page Size
          type: integer
        query:
          anyOf:
            - type: string
            - type: 'null'
          description: 'google_maps: what to look for.'
          title: Query
        require_contact:
          default: false
          description: Require contact returned by the Sendora API.
          title: Require Contact
          type: boolean
        role:
          anyOf:
            - type: string
            - type: 'null'
          description: Role returned by the Sendora API.
          title: Role
        style:
          anyOf:
            - enum:
                - best
                - everyone
              type: string
            - type: 'null'
          description: Style returned by the Sendora API.
          title: Style
        titles:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          description: Titles returned by the Sendora API.
          title: Titles
        type:
          default: people
          description: Type returned by the Sendora API.
          enum:
            - people
            - companies
            - hiring
            - company_employees
            - google_maps
          title: Type
          type: string
      required:
        - lead_list_id
      title: SearchBody
      type: object
    api__v1__leads__routes__prospect_finder__PreviewOut:
      properties:
        company_name:
          anyOf:
            - type: string
            - type: 'null'
          description: Company name returned by the Sendora API.
          title: Company Name
        cursor:
          anyOf:
            - type: string
            - type: 'null'
          description: Cursor returned by the Sendora API.
          title: Cursor
        dropped_without_profile:
          default: 0
          description: Dropped without profile returned by the Sendora API.
          title: Dropped Without Profile
          type: integer
        error_message:
          anyOf:
            - type: string
            - type: 'null'
          description: Error message returned by the Sendora API.
          title: Error Message
        id:
          description: >-
            The preview's id. Pass it as `preview_id` to read or import this
            result set.
          format: uuid
          title: Id
          type: string
        mode:
          description: Mode returned by the Sendora API.
          title: Mode
          type: string
        page:
          anyOf:
            - type: integer
            - type: 'null'
          description: Page returned by the Sendora API.
          title: Page
        results:
          description: Results returned by the Sendora API.
          items:
            type: object
          title: Results
          type: array
        status:
          description: Status returned by the Sendora API.
          title: Status
          type: string
        total_matches:
          anyOf:
            - type: integer
            - type: 'null'
          description: Total matches returned by the Sendora API.
          title: Total Matches
        total_pages:
          anyOf:
            - type: integer
            - type: 'null'
          description: Total pages returned by the Sendora API.
          title: Total Pages
      required:
        - id
        - status
        - mode
        - results
      title: PreviewOut
      type: object
    api__v1__leads__routes__google_maps_preview__PreviewOut:
      properties:
        error_message:
          anyOf:
            - type: string
            - type: 'null'
          description: Error message returned by the Sendora API.
          title: Error Message
        id:
          description: >-
            The preview's id. Pass it as `preview_id` to read or import this
            result set.
          format: uuid
          title: Id
          type: string
        results:
          description: Results returned by the Sendora API.
          items:
            type: object
          title: Results
          type: array
        status:
          description: Status returned by the Sendora API.
          title: Status
          type: string
      required:
        - id
        - status
        - results
      title: PreviewOut
      type: object
    HTTPValidationError:
      properties:
        detail:
          description: Detail returned by the Sendora API.
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      required: []
      title: HTTPValidationError
      type: object
    ValidationError:
      properties:
        loc:
          description: Loc returned by the Sendora API.
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          description: Msg returned by the Sendora API.
          title: Message
          type: string
        type:
          description: Type returned by the Sendora API.
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object
  securitySchemes:
    ApiKeyAuth:
      description: Customer API key created in the Sendora dashboard.
      in: header
      name: X-API-Key
      type: apiKey

````

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