Data Operations
Export to CSV
Export selected leads/prospects to a downloadable CSV file
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
- Resolve Selection: The selection payload is resolved to actual lead IDs based on the mode
- Field Selection: Determines which fields to include based on
exportFieldsor uses defaults - Generate CSV: Builds CSV content with headers and data rows
- 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
Selection criteria for which leads to export. Supports two modes: manual (explicit IDs) and bulk (range-based).
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:text/csv; charset=utf-8attachment; filename="lance-prospects-{YYYY - MM - DD}.csv" The filename
includes the current date.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 theid value in the exportFields array.
Contact Information
| Field ID | Label | Description |
|---|---|---|
name | Name | Full name (first + last) |
emails | Email(s) | All email addresses, comma-separated |
phones | Phone(s) | All phone numbers, comma-separated |
linkedinUrl | LinkedIn URL | Person’s LinkedIn profile URL |
Location Information
| Field ID | Label | Description |
|---|---|---|
city | City | Person’s city |
postalCode | Postal Code | Person’s postal code |
country | Country | Person’s country |
Professional Information
| Field ID | Label | Description |
|---|---|---|
jobTitle | Job Title | Current job title |
seniority | Seniority | Seniority level |
departments | Departments | Departments, comma-separated |
functions | Functions | Job functions, comma-separated |
industry | Industry (Person) | Person’s industry |
skills | Skills | Skills, comma-separated |
languages | Languages | Languages spoken, comma-separated |
Company Information
| Field ID | Label | Description |
|---|---|---|
companyName | Company Name | Current company name |
companyLegalName | Company Legal Name | Company’s legal registered name |
companyWebsite | Company Website | Company website URL |
companyLinkedin | Company LinkedIn | Company LinkedIn page URL |
companyPhone | Company Phone(s) | Company phone numbers |
companyCity | Company City (HQ) | Company headquarters city |
companyPostalCode | Company Postal Code (HQ) | Company headquarters postal code |
companyCountry | Company Country (HQ) | Company headquarters country |
companyIndustry | Company Industry | Company’s industry |
companyHeadcount | Company Headcount | Employee count range |
companyRevenue | Company Revenue | Revenue range |
companyFoundedYear | Company Founded Year | Year company was founded |
companySummary | Company Summary | AI-generated company summary |
Error Codes
| Status Code | Error Code | Description |
|---|---|---|
400 | - | No data to export (selection resolved to 0 leads) |
400 | VALIDATION_ERROR | Invalid request body or missing required fields |
500 | INTERNAL_ERROR | Server error during export generation |
Filters Reference
Forbulk mode, the filters object uses the People Search schema. Key filter sections include:
Contact Filters
fullName- Filter by person namelocation- Filter by location (city, country)seniority- Filter by seniority level (entry, mid-level, senior, director, c_suite, etc.)departmentAndFunction- Filter by department or functionskill- Filter by skillseducation- Filter by school, degree, or field of studyexperience- Filter by current or previous job titles
Account (Company) Filters
nameOrDomain- Filter by company name or domainindustry- Filter by company industrylocation- Filter by company locationemployeeSize- Filter by company size rangerevenue- Filter by company revenue rangetype- Filter by company type (public, private, etc.)
Notes
- Maximum bulk selection: 1000 leads per export
- Default fields: If no
exportFieldsspecified, 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