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

# Get Extracted Leads

> Read paginated extraction results, optionally restricted to enriched profiles.

Requires `leads:read`. `offset` defaults to 0 and is capped at 10,000. `limit` defaults to 100 and is capped at 500. Set `enriched_only=true` to request enriched leads only.

The response includes `campaign_id` (the extraction job ID), `leads`, `total`, `offset`, `limit`, and `has_more`. It does not import those leads into an outreach campaign. Use [Add Leads](https://docs.sendler.ai/api-reference/endpoint/post-add-leads.md) separately when ready.


## OpenAPI

````yaml GET /v1/lead-extractor/campaigns/{id}/results
openapi: 3.0.0
info:
  title: SendPilot External API
  description: >

    # SendPilot External API v1


    Public API for integrating with SendPilot programmatically.


    ## Authentication


    Requests authenticate with a workspace API key in the `X-API-Key` header:


    ```

    X-API-Key: sp_live_your_api_key_here

    ```


    `Authorization: Bearer sp_live_...` (or `sp_test_...`) is also accepted.
    Prefer one header; `X-API-Key` takes precedence. Clerk OAuth tokens for MCP
    connection URLs are not public REST API keys.


    A key only reaches what its scopes and creator's current workspace
    permissions allow. Each operation lists the scopes it needs in
    `x-sp-scopes`. Use `GET /v1/me` to inspect the effective permissions and
    subscription state.


    ## Rate Limits


    - **Per API Key**: 300 requests/minute

    - **Per Workspace**: 50,000 requests/day


    Responses that reach the rate limiter include these headers; early
    authentication failures may not:

    - `X-RateLimit-Limit`: Max requests per minute

    - `X-RateLimit-Remaining`: Remaining requests in current window

    - `X-RateLimit-Reset`: Epoch timestamp when limit resets


    ## LinkedIn Sender Limits


    When using messaging endpoints, these headers show account limits:

    - `X-LinkedIn-Messages-Remaining`: Messages left today

    - `X-LinkedIn-Connections-Remaining`: Connection requests left today

    - `X-LinkedIn-Quota-Reset-At`: When daily limits reset


    ## Retries


    Send an `Idempotency-Key` header on POST and PATCH requests. A retry with
    the same key within 24 hours returns the first result (with
    `Idempotent-Replayed: true`) instead of acting twice. The same key with a
    different request answers 422 `IDEMPOTENCY_KEY_REUSED`; a retry while the
    first request still runs answers 409 `IDEMPOTENCY_IN_PROGRESS`.


    Once execution is attempted, its response (including errors) is retained. If
    a process stops or result storage fails after the attempt, the durable
    record blocks another execution for the replay window and returns 409
    `IDEMPOTENCY_IN_PROGRESS` or `IDEMPOTENCY_REPLAY_UNAVAILABLE`. Check the
    operation's status before using a new key: an uncertain outcome may already
    have acted. Requests refused before execution is claimed, such as
    authentication or rate-limit refusals, can be retried with the same key.


    ## Webhooks


    Configure webhooks in the SendPilot app to receive real-time events:

    - `lead.tag.updated`

    - `lead.updated`

    - `message.sent`

    - `reply.received`

    - `connection_request.sent`

    - `connection_request.accepted`

    - `campaign.started`

    - `campaign.paused`

    - `campaign.resumed`

    - `campaign.finished`


    ## Error Codes


    Errors return a JSON body. Use the machine-readable `code` when supplied;
    validation messages can be arrays, and some legacy errors omit `code`. A
    typical error is:

    ```json

    {
      "statusCode": 400,
      "error": "Bad Request",
      "code": "SPECIFIC_ERROR_CODE",
      "message": "Human-readable description"
    }

    ```
  version: '1.0'
  contact:
    name: SendPilot Support
    url: https://sendpilot.ai
    email: support@sendpilot.ai
servers:
  - url: https://api.sendpilot.ai
security: []
tags: []
paths:
  /v1/lead-extractor/campaigns/{id}/results:
    get:
      tags:
        - External API - Lead Extractor
      summary: Get extracted leads
      description: Retrieves the leads extracted by a campaign with pagination support
      operationId: leadExtractor.getResults
      parameters:
        - name: id
          required: true
          in: path
          description: Campaign ID
          schema:
            type: string
        - name: limit
          required: false
          in: query
          description: Maximum number of items to return
          schema:
            minimum: 1
            maximum: 500
            default: 100
            type: number
        - name: offset
          required: false
          in: query
          description: Offset for pagination (0-indexed)
          schema:
            minimum: 0
            maximum: 10000
            default: 0
            type: number
        - name: enriched_only
          required: false
          in: query
          description: >-
            Return only leads with completed enrichment when true. Omitted or
            false returns all leads. Accepts true, false, 1, or 0.
          schema:
            type: boolean
      responses:
        '200':
          description: Leads retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetResultsResponseDto'
        '401':
          description: Invalid or missing API key
        '404':
          description: Campaign not found
        '429':
          description: Rate limit exceeded
      security:
        - api-key: []
components:
  schemas:
    GetResultsResponseDto:
      type: object
      properties:
        campaign_id:
          type: string
        leads:
          type: array
          items:
            $ref: '#/components/schemas/ExtractedLeadDto'
        total:
          type: number
        offset:
          type: number
        limit:
          type: number
        has_more:
          type: boolean
      required:
        - campaign_id
        - leads
        - total
        - offset
        - limit
        - has_more
    ExtractedLeadDto:
      type: object
      properties:
        id:
          type: string
        linkedin_identifier:
          type: string
        linkedin_num_id:
          type: string
        linkedin_url:
          type: string
        public_profile_url:
          type: string
        input_url:
          type: string
        first_name:
          type: string
        last_name:
          type: string
        full_name:
          type: string
        headline:
          type: string
        summary:
          type: string
        about:
          type: string
        location:
          type: string
        city:
          type: string
        country:
          type: string
        country_code:
          type: string
        profile_picture_url:
          type: string
        profile_picture_url_large:
          type: string
        avatar:
          type: string
        background_picture_url:
          type: string
        banner_image:
          type: string
        default_avatar:
          type: boolean
        company:
          type: string
        current_company:
          type: string
        current_company_id:
          type: string
        current_company_link:
          type: string
        job_position:
          type: string
        email:
          type: string
        emails:
          type: array
          items:
            type: string
        phone:
          type: string
        phones:
          type: array
          items:
            type: string
        websites:
          type: object
          additionalProperties: true
        contact_info:
          type: object
          additionalProperties: true
        connections:
          type: number
        connections_count:
          type: number
        followers:
          type: number
        follower_count:
          type: number
        shared_connections_count:
          type: number
        network_distance:
          type: string
        is_creator:
          type: boolean
        is_hiring:
          type: boolean
        is_influencer:
          type: boolean
        is_open_profile:
          type: boolean
        is_open_to_work:
          type: boolean
        is_premium:
          type: boolean
        can_send_inmail:
          type: boolean
        experience:
          type: object
          additionalProperties: true
        work_experience:
          type: object
          additionalProperties: true
        education:
          type: object
          additionalProperties: true
        educations_details:
          type: string
        certifications:
          type: object
          additionalProperties: true
        courses:
          type: object
          additionalProperties: true
        projects:
          type: object
          additionalProperties: true
        publications:
          type: object
          additionalProperties: true
        honors_and_awards:
          type: object
          additionalProperties: true
        volunteering_experience:
          type: object
          additionalProperties: true
        languages:
          type: object
          additionalProperties: true
        skills:
          type: object
          additionalProperties: true
        activity:
          type: object
          additionalProperties: true
        posts:
          type: object
          additionalProperties: true
        people_also_viewed:
          type: object
          additionalProperties: true
        similar_profiles:
          type: object
          additionalProperties: true
        recommendations:
          type: object
          additionalProperties: true
        recommendations_count:
          type: number
        hashtags:
          type: object
          additionalProperties: true
        bio_links:
          type: object
          additionalProperties: true
        invitation:
          type: object
          additionalProperties: true
        birthdate:
          type: object
          additionalProperties: true
        primary_locale:
          type: object
          additionalProperties: true
        is_enriched:
          type: boolean
        extracted_at:
          type: string
        memorialized_account:
          type: boolean
      required:
        - id
        - linkedin_url
        - is_enriched
        - extracted_at
  securitySchemes:
    api-key:
      type: apiKey
      in: header
      name: X-API-Key
      description: 'API key for authentication (prefix: sp_live_ or sp_test_)'

````

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