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

# Get Search Status

> Get the current status and progress of a lead database search

Returns the current status and progress of a lead database search.

## Request

<ParamField header="X-API-Key" type="string" required>
  Your API key
</ParamField>

## Path Parameters

<ParamField path="id" type="string" required>
  The search ID returned from the create search endpoint
</ParamField>

## Response

<ResponseField name="id" type="string">
  Unique identifier for the search
</ResponseField>

<ResponseField name="name" type="string">
  Name of the search
</ResponseField>

<ResponseField name="status" type="string">
  Current status: `pending`, `processing`, `completed`, `failed`
</ResponseField>

<ResponseField name="progress" type="object">
  <Expandable title="properties">
    <ResponseField name="requested" type="number">
      Number of leads requested (your limit)
    </ResponseField>

    <ResponseField name="found" type="number">
      Number of leads found so far
    </ResponseField>

    <ResponseField name="percent_complete" type="number">
      Percentage complete (0-100)
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="created_at" type="string">
  ISO 8601 timestamp when the search was created
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X GET "https://api.sendpilot.ai/v1/lead-database/searches/search_abc123xyz/status" \
    -H "X-API-Key: your-api-key"
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {
    "id": "search_abc123xyz",
    "name": "Tech Founders Q1 2024",
    "status": "processing",
    "progress": {
      "requested": 100,
      "found": 45,
      "percent_complete": 45
    },
    "created_at": "2024-02-24T10:30:00.000Z"
  }
  ```
</ResponseExample>


## OpenAPI

````yaml GET /v1/lead-database/searches/{id}/status
openapi: 3.0.0
info:
  title: SendPilot External API
  description: >
    The SendPilot API enables you to programmatically manage LinkedIn outreach
    campaigns,

    add leads, update lead statuses, send messages, and receive real-time
    webhook notifications.
  version: 1.0.0
  contact:
    name: SendPilot Support
    email: support@sendpilot.ai
    url: https://sendpilot.ai
servers:
  - url: https://api.sendpilot.ai
    description: Production server
security:
  - ApiKeyAuth: []
tags:
  - name: Credits
    description: Credits and quota management
  - name: Campaigns
    description: Campaign management endpoints
  - name: Leads
    description: Lead management endpoints
  - name: Lead Database
    description: Lead Database search endpoints
  - name: Lead Extractor
    description: Lead extraction campaign endpoints
  - name: Inbox
    description: Direct messaging endpoints
paths:
  /v1/lead-database/searches/{id}/status:
    get:
      tags:
        - Lead Database
      summary: Get Lead Database Search Status
      description: Get the status of a lead database search
      operationId: getLeadDatabaseSearchStatus
      parameters:
        - name: id
          in: path
          required: true
          description: Search ID
          schema:
            type: string
      responses:
        '200':
          description: Search status
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LeadDatabaseSearchStatusResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  schemas:
    LeadDatabaseSearchStatusResponse:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the search
        name:
          type: string
          description: Name of the search
        status:
          type: string
          enum:
            - pending
            - processing
            - completed
            - failed
          description: Current status of the search
        totalResults:
          type: integer
          description: Total number of leads found (available when completed)
        progress:
          type: integer
          description: Progress percentage (0-100)
        created_at:
          type: string
          format: date-time
          description: ISO 8601 timestamp when the search was created
        completed_at:
          type: string
          format: date-time
          description: ISO 8601 timestamp when the search completed
      required:
        - id
        - name
        - status
        - created_at
    Error:
      type: object
      properties:
        statusCode:
          type: integer
        error:
          type: string
        code:
          type: string
        message:
          type: string
      required:
        - statusCode
        - message
  responses:
    Unauthorized:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: API key for authentication

````