curl --request GET \
--url https://api.lemlist.com/api/companies \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://api.lemlist.com/api/companies"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://api.lemlist.com/api/companies', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));require 'uri'
require 'net/http'
url = URI("https://api.lemlist.com/api/companies")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Basic <encoded-value>'
response = http.request(request)
puts response.read_body<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.lemlist.com/api/companies",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"data": [
{
"_id": "cpn_gG7PsmZFpEAnpMCHO",
"createdAt": "2025-10-26T11:54:27.387Z",
"createdBy": "usr_iGBmhLaxZmL0s7k1G",
"domain": "persana.ai",
"fields": {
"name": "Persana AI",
"picture": "https://example.com/logos/company-1.png"
},
"ownerId": "usr_iGBmhLaxZmL0s7k1G"
},
{
"_id": "cpn_FEWCjzMWXo5StjpDa",
"createdAt": "2025-10-26T11:45:18.773Z",
"createdBy": "usr_iGBmhLaxZmL0s7k1G",
"domain": "duno.ai",
"fields": {
"industry": "IT Services and IT Consulting",
"name": "Duno.ai",
"picture": "https://example.com/logos/company-2.png"
},
"ownerId": "usr_iGBmhLaxZmL0s7k1G"
},
{
"_id": "cpn_2STz8x5Bexmd0nvIz",
"createdAt": "2025-10-25T21:37:45.741Z",
"createdBy": "usr_iGBmhLaxZmL0s7k1G",
"domain": "tally.so",
"fields": {
"industry": "Computer Software",
"name": "lemlist family",
"picture": "https://example.com/logos/lemlist.png"
},
"ownerId": "usr_iGBmhLaxZmL0s7k1G"
},
{
"_id": "cpn_Qf4CJuUrNUNmHm6uZ",
"createdAt": "2025-10-24T07:26:34.956Z",
"createdBy": "usr_ahfFktBBHUIxbVG5P",
"domain": "example.com",
"fields": {
"name": "Growth & GTM Engineering"
},
"ownerId": "usr_ahfFktBBHUIxbVG5P"
},
{
"_id": "cpn_A1B2C3D4E5F6G7H8I",
"createdAt": "2025-11-02T09:14:08.512Z",
"createdBy": "usr_A1B2C3D4E5F6G7H8I",
"domain": "acme.com",
"fields": {
"name": "Acme Inc"
},
"ownerId": "usr_A1B2C3D4E5F6G7H8I",
"crmSync": {
"provider": "hubspot",
"crmRecordId": null,
"syncDisabled": false,
"errors": [
{
"type": "CONNECT_FAILED",
"reason": "UNIQUE_INDEX_ERROR_COMPANY",
"raisedAt": "2025-11-02T09:14:12.034Z",
"metadata": {
"alreadyExistingCompanyId": "cpn_J1K2L3M4N5O6P7Q8R"
}
}
]
}
}
],
"total": 59310,
"limit": 100,
"offset": 0
}"Bad team""The authentication you supplied is incorrect"Get Many Companies
Retrieves companies from your CRM. Use idsOrDomains to fetch specific companies by ID or domain in a single request (max 100), or omit it to get a paginated list of all companies.
curl --request GET \
--url https://api.lemlist.com/api/companies \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://api.lemlist.com/api/companies"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://api.lemlist.com/api/companies', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));require 'uri'
require 'net/http'
url = URI("https://api.lemlist.com/api/companies")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Basic <encoded-value>'
response = http.request(request)
puts response.read_body<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.lemlist.com/api/companies",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"data": [
{
"_id": "cpn_gG7PsmZFpEAnpMCHO",
"createdAt": "2025-10-26T11:54:27.387Z",
"createdBy": "usr_iGBmhLaxZmL0s7k1G",
"domain": "persana.ai",
"fields": {
"name": "Persana AI",
"picture": "https://example.com/logos/company-1.png"
},
"ownerId": "usr_iGBmhLaxZmL0s7k1G"
},
{
"_id": "cpn_FEWCjzMWXo5StjpDa",
"createdAt": "2025-10-26T11:45:18.773Z",
"createdBy": "usr_iGBmhLaxZmL0s7k1G",
"domain": "duno.ai",
"fields": {
"industry": "IT Services and IT Consulting",
"name": "Duno.ai",
"picture": "https://example.com/logos/company-2.png"
},
"ownerId": "usr_iGBmhLaxZmL0s7k1G"
},
{
"_id": "cpn_2STz8x5Bexmd0nvIz",
"createdAt": "2025-10-25T21:37:45.741Z",
"createdBy": "usr_iGBmhLaxZmL0s7k1G",
"domain": "tally.so",
"fields": {
"industry": "Computer Software",
"name": "lemlist family",
"picture": "https://example.com/logos/lemlist.png"
},
"ownerId": "usr_iGBmhLaxZmL0s7k1G"
},
{
"_id": "cpn_Qf4CJuUrNUNmHm6uZ",
"createdAt": "2025-10-24T07:26:34.956Z",
"createdBy": "usr_ahfFktBBHUIxbVG5P",
"domain": "example.com",
"fields": {
"name": "Growth & GTM Engineering"
},
"ownerId": "usr_ahfFktBBHUIxbVG5P"
},
{
"_id": "cpn_A1B2C3D4E5F6G7H8I",
"createdAt": "2025-11-02T09:14:08.512Z",
"createdBy": "usr_A1B2C3D4E5F6G7H8I",
"domain": "acme.com",
"fields": {
"name": "Acme Inc"
},
"ownerId": "usr_A1B2C3D4E5F6G7H8I",
"crmSync": {
"provider": "hubspot",
"crmRecordId": null,
"syncDisabled": false,
"errors": [
{
"type": "CONNECT_FAILED",
"reason": "UNIQUE_INDEX_ERROR_COMPANY",
"raisedAt": "2025-11-02T09:14:12.034Z",
"metadata": {
"alreadyExistingCompanyId": "cpn_J1K2L3M4N5O6P7Q8R"
}
}
]
}
}
],
"total": 59310,
"limit": 100,
"offset": 0
}"Bad team""The authentication you supplied is incorrect"Authorizations
Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.
Query Parameters
Comma-separated list of company IDs or domains to fetch. When provided, returns only matching companies (no pagination). Each value is classified as a company ID (e.g. cpn_xxx) or a domain (e.g. example.com). URLs are normalized automatically (e.g. https://example.com/path → example.com). Invalid values are silently skipped. Maximum 100 values.
Number of companies to skip for pagination. Defaults to 0. Ignored when idsOrDomains is provided.
x >= 0The field by which to sort. Currently, only 'createdAt' is supported.
createdAt The sort direction. Use 'desc' for descending order; any other value (or omission) will sort in ascending order.
asc, desc Search by company name (case insensitive)
Returns selected fields. Returns all fields if empty. Each field is separated by a comma (e.g., '_id,fields.name,domain')
Number of companies to retrieve. Default: 100. Maximum: 500
1 <= x <= 500Filter companies by their CRM sync state against the team's active CRM provider. Requires a CRM (Hubspot, Salesforce, or Pipedrive) to be connected — otherwise the request returns 400 NO_CRM_CONNECTED. Common values:
synced— the company has a CRM record and no sync errors.not_synced— the company has no CRM record yet.error— at least one sync error is currently raised.- A specific error reason (lowercase form), to filter by root cause:
unique_index_error_company,property_doesnt_exist,required_field_missing,company_already_exists_with_name,company_already_exists_with_linkedin_url.
For each returned company, see crmSync.errors[].metadata.alreadyExistingCompanyId to identify the lemlist company that already occupies the conflicting CRM record (useful to remap contacts before deleting the duplicate).
synced, not_synced, error, unique_index_error_company, property_doesnt_exist, required_field_missing, company_already_exists_with_name, company_already_exists_with_linkedin_url Filter companies to those carrying a field rejection with this reason — a value lemlist refused to write, raised during CRM sync (crm_sync_*). Returns an empty list (total: 0) when no company matches. Each returned company exposes the full detail under fieldRejections[] (which field, why, and conflictingRecordId for duplicates). Independent of crmSyncStatus (which keys off the live provider errors); this filter reads the stored field rejections. Only applies to the paginated list — ignored when idsOrDomains is provided (that path returns the exact companies requested, unfiltered).
crm_sync_duplicate_company, crm_sync_invalid_domain, crm_sync_duplicate_linkedin_url, crm_sync_invalid_linkedin_url, crm_sync_linkedin_url_not_company, crm_sync_invalid_url, crm_sync_value_oscillating, crm_sync_owner_sync_loop, crm_sync_unmapped_user, crm_sync_value_incompatible, crm_sync_unknown_error Was this page helpful?