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

> Get the leads found by a lead database search

Returns the leads found by a completed 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>

## Query Parameters

<ParamField query="offset" type="number" default="0">
  Number of leads to skip (for pagination)
</ParamField>

<ParamField query="limit" type="number" default="100">
  Maximum number of leads to return (1-1000)
</ParamField>

## Response

<ResponseField name="leads" type="array">
  Array of found leads
</ResponseField>

<ResponseField name="pagination" type="object">
  <Expandable title="properties">
    <ResponseField name="total" type="number">
      Total number of leads found
    </ResponseField>

    <ResponseField name="offset" type="number">
      Current offset
    </ResponseField>

    <ResponseField name="limit" type="number">
      Current limit
    </ResponseField>

    <ResponseField name="has_more" type="boolean">
      Whether there are more leads to fetch
    </ResponseField>
  </Expandable>
</ResponseField>

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

<ResponseExample>
  ```json Response theme={null}
  {
    "leads": [
      {
        "id": "lead_xyz789",
        "first_name": "John",
        "last_name": "Doe",
        "full_name": "John Doe",
        "email": "john.doe@example.com",
        "phone": "+1-555-123-4567",
        "linkedin_url": "https://www.linkedin.com/in/johndoe",
        "job_title": "CEO",
        "company": "TechCorp Inc",
        "location": "San Francisco, CA",
        "country": "United States",
        "industry": "Technology",
        "seniority": "C-Level",
        "company_linkedin_url": "https://www.linkedin.com/company/techcorp",
        "website": "https://techcorp.com",
        "employees": "51-200"
      }
    ],
    "pagination": {
      "total": 100,
      "offset": 0,
      "limit": 50,
      "has_more": true
    }
  }
  ```
</ResponseExample>


## OpenAPI

````yaml GET /v1/lead-database/searches/{id}/results
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}/results:
    get:
      tags:
        - Lead Database
      summary: Get Lead Database Search Results
      description: Get the results of a completed lead database search
      operationId: getLeadDatabaseSearchResults
      parameters:
        - name: id
          in: path
          required: true
          description: Search ID
          schema:
            type: string
        - name: page
          in: query
          description: Page number
          schema:
            type: integer
            default: 1
            minimum: 1
        - name: limit
          in: query
          description: Items per page
          schema:
            type: integer
            default: 50
            minimum: 1
            maximum: 100
      responses:
        '200':
          description: Search results
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LeadDatabaseSearchResultsResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  schemas:
    LeadDatabaseSearchResultsResponse:
      type: object
      properties:
        id:
          type: string
          description: Search ID
        status:
          type: string
          enum:
            - pending
            - processing
            - completed
            - failed
          description: Current status of the search
        results:
          type: array
          items:
            $ref: '#/components/schemas/LeadDatabaseResult'
          description: Array of lead results
        pagination:
          $ref: '#/components/schemas/PaginationMeta'
      required:
        - id
        - status
        - results
        - pagination
    LeadDatabaseResult:
      type: object
      properties:
        linkedinUrl:
          type: string
          description: LinkedIn profile URL
        firstName:
          type: string
          description: First name
        lastName:
          type: string
          description: Last name
        title:
          type: string
          description: Job title
        company:
          type: string
          description: Company name
        location:
          type: string
          description: Location
        email:
          type: string
          description: Email address (if available)
        industry:
          type: string
          description: Industry
        companySize:
          type: string
          description: Company size range
        companyLinkedinUrl:
          type: string
          description: Company LinkedIn URL
    PaginationMeta:
      type: object
      properties:
        total:
          type: integer
        page:
          type: integer
        limit:
          type: integer
        totalPages:
          type: integer
      required:
        - total
        - page
        - limit
        - totalPages
    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

````