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

# Get Lead Search Run



## OpenAPI

````yaml https://api.bavlio.com/openapi.json get /api/v1/lead-search/runs/{run_id}
openapi: 3.1.0
info:
  title: Bavlio API
  description: >-
    Outreach automation API — lead enrichment, email campaigns, LinkedIn
    automation, and AI agent. Full docs at https://docs.bavlio.com.
  version: 1.0.0
  x-guidance:
    product: Bavlio Data API
    protocols:
      - x402
    description: >-
      Pay-per-call B2B data endpoints for AI agents. USDC on Base mainnet via
      x402 v2. See /openapi.json for pricing. Landing page + marketing details:
      https://bavlio.com/developers
    network: eip155:8453
    docs_url: https://docs.bavlio.com
  x-payment-merchant-address: '0xcca4725e0e931982830bff523b141e1a7a58d3e7'
servers: []
security: []
tags:
  - name: API Keys
    description: >-
      Create, list, and revoke API keys for programmatic access. JWT
      authentication required.
  - name: credits
    description: Credit balance, cost estimates, and transaction history.
  - name: campaigns
    description: Create, manage, launch, and monitor email campaigns.
  - name: campaign-personalization
    description: AI-powered email subject and body personalization for campaigns.
  - name: email-finder
    description: Find and verify email addresses for prospects.
  - name: sender-profiles
    description: Manage sender identity profiles for outreach.
  - name: sender-profile-chat
    description: Interactive chat for building sender profiles.
  - name: templates
    description: Email template CRUD.
  - name: suppression
    description: Do-not-contact suppression list management.
  - name: datasets
    description: Lead dataset listing, download, and updates.
  - name: user-extractions
    description: Uploaded lead file management and processing.
  - name: enrichment-chat
    description: Interactive chat for data enrichment sessions.
  - name: enrichment-processing
    description: Batch lead enrichment processing.
  - name: File Upload (CSV/Excel)
    description: Upload and preview CSV/Excel lead files.
  - name: connected-accounts
    description: LinkedIn account connections via Unipile.
  - name: linkedin-content
    description: LinkedIn post creation, scheduling, and management.
  - name: linkedin-playground
    description: Direct LinkedIn actions (profile lookup, messaging, engagement).
  - name: bavimail-proxy
    description: BaviMail domain, alias, and email management.
  - name: agent
    description: Bavi AI agent chat with SSE streaming.
  - name: notifications
    description: Notification preferences and delivery.
  - name: referral
    description: Referral code management and stats.
  - name: feedback
    description: User feedback submission.
  - name: authentication
    description: JWT token verification and user info.
  - name: users
    description: User quota and usage information.
  - name: Health
    description: Health checks and system status.
  - name: Personalization
    description: Core lead personalization engine.
  - name: Session Management
    description: Enrichment session lifecycle.
  - name: Session Processing
    description: Session data processing.
  - name: webhooks
    description: Inbound webhook handlers (Stripe, BaviMail, Unipile).
paths:
  /api/v1/lead-search/runs/{run_id}:
    get:
      tags:
        - lead_search
      summary: Get Lead Search Run
      operationId: get_lead_search_run_api_v1_lead_search_runs__run_id__get
      parameters:
        - name: run_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Run Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LeadSearchRunStatusResponse'
        '401':
          description: Unauthorized
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    LeadSearchRunStatusResponse:
      properties:
        run_id:
          type: string
          format: uuid
          title: Run Id
        status:
          type: string
          title: Status
        dataset_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Dataset Id
        requested_count:
          type: integer
          title: Requested Count
        delivered_count:
          type: integer
          title: Delivered Count
        charged_credits:
          type: integer
          title: Charged Credits
        deduped_all:
          type: boolean
          title: Deduped All
          default: false
        plan:
          $ref: '#/components/schemas/LeadSearchPlan'
      type: object
      required:
        - run_id
        - status
        - dataset_id
        - requested_count
        - delivered_count
        - charged_credits
        - plan
      title: LeadSearchRunStatusResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    LeadSearchPlan:
      properties:
        requested_count:
          type: integer
          minimum: 1
          title: Requested Count
          default: 3
        natural_language_query:
          type: string
          maxLength: 500
          minLength: 1
          title: Natural Language Query
          description: >-
            Complete self-contained semantic search request passed to the
            provider. Copy an initial self-contained request unchanged; after a
            follow-up tweak, rewrite the full resolved request rather than
            passing only the conversational delta.
        person:
          $ref: '#/components/schemas/PersonCriteria'
        company:
          $ref: '#/components/schemas/CompanyCriteria'
        required_output_fields:
          items:
            type: string
            enum:
              - full_name
              - title
              - company_name
              - company_domain
              - linkedin_url
              - employee_count
              - employee_range
              - funding_stage
              - industry
          type: array
          title: Required Output Fields
          description: >-
            Fields requested for the customer-visible result. Provider discovery
            rows may render a missing optional field as unavailable; cache reuse
            still requires fresh evidence for requested fields. Prefer
            employee_count over employee_range when exact count is available.
          default:
            - full_name
            - title
            - company_name
            - company_domain
            - linkedin_url
        unresolved_constraints:
          items:
            type: string
          type: array
          title: Unresolved Constraints
          default: []
      additionalProperties: false
      type: object
      required:
        - natural_language_query
      title: LeadSearchPlan
      description: Stable tool boundary between Bavi's model and search providers.
    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
    PersonCriteria:
      properties:
        titles:
          anyOf:
            - $ref: '#/components/schemas/TextCriterion'
            - type: 'null'
          description: >-
            Current-role nouns/titles such as founder, co-founder, CEO,
            freelancer, publisher, editor, journalist, or VP Sales. Use
            match=any for alternatives. Use singular provider labels (founders
            becomes founder). Hard-filter only titles the user stated; the
            semantic query handles synonyms.
        schools:
          anyOf:
            - $ref: '#/components/schemas/TextCriterion'
            - type: 'null'
          description: Free-text university, college, or school names stated by the user.
        seniorities:
          anyOf:
            - $ref: '#/components/schemas/TextCriterion'
            - type: 'null'
          description: Provider-supported current-role seniority labels only.
        keywords:
          anyOf:
            - $ref: '#/components/schemas/TextCriterion'
            - type: 'null'
          description: >-
            Observable fuzzy concepts that describe the person's public
            profile/headline, not their employer or unobservable private
            behavior.
        locations:
          anyOf:
            - items:
                $ref: '#/components/schemas/PersonLocation'
              type: array
              maxItems: 20
              minItems: 1
            - type: 'null'
          title: Locations
          description: >-
            Structured places where the person may be based. Each item is one
            alternative, and every populated city, region/state, and country
            component in that item must match. Never use this for company
            headquarters and never put prose in a component.
      additionalProperties: false
      type: object
      title: PersonCriteria
    CompanyCriteria:
      properties:
        names:
          anyOf:
            - $ref: '#/components/schemas/TextCriterion'
            - type: 'null'
          description: Explicit company names.
        domains:
          anyOf:
            - $ref: '#/components/schemas/TextCriterion'
            - type: 'null'
          description: Explicit company domains.
        industries:
          anyOf:
            - $ref: '#/components/schemas/TextCriterion'
            - type: 'null'
          description: >-
            Employer industry labels such as Software or Publishing. Do not
            combine multiple concepts into one value.
        categories:
          anyOf:
            - $ref: '#/components/schemas/TextCriterion'
            - type: 'null'
          description: >-
            Atomic Crust company taxonomy values. Common values include B2B,
            SaaS, Artificial Intelligence (AI), Media, and Publishing. Put each
            explicit concept in its own value and use match=all when every
            concept is required. Do not add an employer filter that would turn a
            cross-scope OR into AND.
        keywords:
          anyOf:
            - $ref: '#/components/schemas/TextCriterion'
            - type: 'null'
          description: >-
            Fuzzy concepts that describe the employer when no exact taxonomy
            applies.
        country_codes:
          anyOf:
            - $ref: '#/components/schemas/TextCriterion'
            - type: 'null'
          description: >-
            Company-location countries. Prefer full names such as United
            Kingdom, United States, or Canada; common abbreviations and ISO
            alpha-2/alpha-3 codes are accepted.
        headcount:
          anyOf:
            - $ref: '#/components/schemas/IntegerRange'
            - type: 'null'
          description: >-
            Current employer employee-count range. This is never the number of
            leads to return.
        annual_revenue:
          anyOf:
            - $ref: '#/components/schemas/AnnualRevenueRange'
            - type: 'null'
          description: >-
            Estimated annual revenue in USD. Compile the lower bound to
            revenue.estimated.lower_bound_usd and the upper bound to
            revenue.estimated.upper_bound_usd.
        funding_stages:
          anyOf:
            - $ref: '#/components/schemas/TextCriterion'
            - type: 'null'
          description: >-
            Normalized company funding stages, one per value: pre_seed, angel,
            seed, series_a, series_b, series_c, venture, private_equity, or ipo.
            Use match=any.
      additionalProperties: false
      type: object
      title: CompanyCriteria
    TextCriterion:
      properties:
        values:
          items:
            type: string
          type: array
          maxItems: 20
          minItems: 1
          title: Values
        match:
          type: string
          enum:
            - any
            - all
          title: Match
          default: any
      additionalProperties: false
      type: object
      required:
        - values
      title: TextCriterion
    PersonLocation:
      properties:
        city:
          anyOf:
            - type: string
              maxLength: 120
            - type: 'null'
          title: City
        region:
          anyOf:
            - type: string
              maxLength: 120
            - type: 'null'
          title: Region
          description: Full region/state name, not an abbreviation inferred from prose.
        country:
          anyOf:
            - type: string
              maxLength: 120
            - type: 'null'
          title: Country
          description: >-
            Full country name preferred (for example, United Kingdom rather than
            UK).
        radius:
          anyOf:
            - type: integer
              minimum: 1
            - type: 'null'
          title: Radius
          description: Optional search radius around the location; requires city or region.
        radius_unit:
          anyOf:
            - type: string
              enum:
                - mi
                - km
            - type: 'null'
          title: Radius Unit
          description: >-
            Unit for the optional search radius; required whenever radius is
            present.
      additionalProperties: false
      type: object
      title: PersonLocation
    IntegerRange:
      properties:
        minimum:
          anyOf:
            - type: integer
              minimum: 0
            - type: 'null'
          title: Minimum
        maximum:
          anyOf:
            - type: integer
              minimum: 0
            - type: 'null'
          title: Maximum
      additionalProperties: false
      type: object
      title: IntegerRange
    AnnualRevenueRange:
      properties:
        lower_bound_usd:
          anyOf:
            - type: integer
              minimum: 0
            - type: 'null'
          title: Lower Bound Usd
        upper_bound_usd:
          anyOf:
            - type: integer
              minimum: 0
            - type: 'null'
          title: Upper Bound Usd
      additionalProperties: false
      type: object
      title: AnnualRevenueRange
      description: USD bounds compiled with provider `=>` lower and `=<` upper operators.
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````

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