Skip to main content
POST
This endpoint exports selected leads to a CSV file. It supports both manual selection (specific IDs) and bulk selection (range-based with filters).

How It Works

  1. Resolve Selection: The selection payload is resolved to actual lead IDs based on the mode
  2. Field Selection: Determines which fields to include based on exportFields or uses defaults
  3. Generate CSV: Builds CSV content with headers and data rows
  4. File Download: Returns the CSV as a file attachment
The response is a binary CSV file download, not JSON. The X-Export-Count header contains the number of exported records.

Request

Body Parameters

object
required
Selection criteria for which leads to export. Supports two modes: manual (explicit IDs) and bulk (range-based).
string[]
Array of field IDs to include in the export. If not specified, uses default fields. Default fields: name, emails, phones, linkedinUrl, city, country, jobTitle, companyName See Available Export Fields for all options.

Response

The response is a CSV file download with the following headers:
header
text/csv; charset=utf-8
header
attachment; filename="lance-prospects-{YYYY - MM - DD}.csv" The filename includes the current date.
header
The number of records exported (as a string).

CSV Format

The CSV file contains:
  • Header row: Column labels based on selected fields
  • Data rows: One row per lead with values for each selected field
  • Values containing commas, quotes, or newlines are properly escaped
  • UTF-8 encoding

Available Export Fields

Fields are organized by category. Use the id value in the exportFields array.

Contact Information

Location Information

Professional Information

Company Information

Error Codes

Filters Reference

For bulk mode, the filters object uses the People Search schema. Key filter sections include:

Contact Filters

  • fullName - Filter by person name
  • location - Filter by location (city, country)
  • seniority - Filter by seniority level (entry, mid-level, senior, director, c_suite, etc.)
  • departmentAndFunction - Filter by department or function
  • skill - Filter by skills
  • education - Filter by school, degree, or field of study
  • experience - Filter by current or previous job titles

Account (Company) Filters

  • nameOrDomain - Filter by company name or domain
  • industry - Filter by company industry
  • location - Filter by company location
  • employeeSize - Filter by company size range
  • revenue - Filter by company revenue range
  • type - Filter by company type (public, private, etc.)

Notes

  • Maximum bulk selection: 1000 leads per export
  • Default fields: If no exportFields specified, exports: name, emails, phones, linkedinUrl, city, country, jobTitle, companyName
  • CSV escaping: Values with commas, quotes, or newlines are automatically quoted and escaped
  • Filename: Automatically generated with current date: lance-prospects-YYYY-MM-DD.csv
  • Authentication: Requires authentication; exports are scoped to the authenticated organization