Autocomplete Companies
curl --request GET \
--url https://api.example.com/api/v1/operations/autocomplete/companies \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.example.com/api/v1/operations/autocomplete/companies"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.example.com/api/v1/operations/autocomplete/companies', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/api/v1/operations/autocomplete/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: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/v1/operations/autocomplete/companies"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/api/v1/operations/autocomplete/companies")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/operations/autocomplete/companies")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"content": [
{
"id": "company_001",
"name": "Google",
"logo": "https://logo.clearbit.com/google.com",
"url": "https://linkedin.com/company/google",
"domain": "google.com",
"domainLtd": "google.com",
"website": "https://www.google.com"
},
{
"id": "company_002",
"name": "Alphabet Inc.",
"logo": "https://logo.clearbit.com/abc.xyz",
"url": "https://linkedin.com/company/alphabet-inc",
"domain": "abc.xyz",
"domainLtd": "abc.xyz",
"website": "https://abc.xyz"
}
],
"totalElements": 2,
"totalPages": 1,
"size": 10,
"number": 0,
"first": true,
"last": true,
"empty": false,
"numberOfElements": 2
}
{
"content": [
{
"id": "company_large",
"name": "Microsoft Corporation",
"logo": "https://logo.clearbit.com/microsoft.com",
"url": null,
"domain": "microsoft.com",
"domainLtd": "microsoft.com",
"website": "https://www.microsoft.com"
},
{
"id": "company_medium",
"name": "Stripe",
"logo": "https://logo.clearbit.com/stripe.com",
"url": null,
"domain": "stripe.com",
"domainLtd": "stripe.com",
"website": "https://stripe.com"
}
],
"totalElements": 150,
"totalPages": 15,
"size": 10,
"number": 0,
"first": true,
"last": false,
"empty": false,
"numberOfElements": 10
}
{
"content": [],
"totalElements": 0,
"totalPages": 0,
"size": 10,
"number": 0,
"first": true,
"last": true,
"empty": true,
"numberOfElements": 0
}
{
"error": {
"code": "UNAUTHORIZED",
"message": "Unauthorized"
}
}
{
"error": {
"code": "INTERNAL_ERROR",
"message": "An unexpected error occurred"
}
}
Autocomplete
Autocomplete Companies
Search and retrieve company suggestions for autocomplete functionality in company filters and selections
GET
/
api
/
v1
/
operations
/
autocomplete
/
companies
Autocomplete Companies
curl --request GET \
--url https://api.example.com/api/v1/operations/autocomplete/companies \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.example.com/api/v1/operations/autocomplete/companies"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.example.com/api/v1/operations/autocomplete/companies', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/api/v1/operations/autocomplete/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: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/v1/operations/autocomplete/companies"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/api/v1/operations/autocomplete/companies")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/operations/autocomplete/companies")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"content": [
{
"id": "company_001",
"name": "Google",
"logo": "https://logo.clearbit.com/google.com",
"url": "https://linkedin.com/company/google",
"domain": "google.com",
"domainLtd": "google.com",
"website": "https://www.google.com"
},
{
"id": "company_002",
"name": "Alphabet Inc.",
"logo": "https://logo.clearbit.com/abc.xyz",
"url": "https://linkedin.com/company/alphabet-inc",
"domain": "abc.xyz",
"domainLtd": "abc.xyz",
"website": "https://abc.xyz"
}
],
"totalElements": 2,
"totalPages": 1,
"size": 10,
"number": 0,
"first": true,
"last": true,
"empty": false,
"numberOfElements": 2
}
{
"content": [
{
"id": "company_large",
"name": "Microsoft Corporation",
"logo": "https://logo.clearbit.com/microsoft.com",
"url": null,
"domain": "microsoft.com",
"domainLtd": "microsoft.com",
"website": "https://www.microsoft.com"
},
{
"id": "company_medium",
"name": "Stripe",
"logo": "https://logo.clearbit.com/stripe.com",
"url": null,
"domain": "stripe.com",
"domainLtd": "stripe.com",
"website": "https://stripe.com"
}
],
"totalElements": 150,
"totalPages": 15,
"size": 10,
"number": 0,
"first": true,
"last": false,
"empty": false,
"numberOfElements": 10
}
{
"content": [],
"totalElements": 0,
"totalPages": 0,
"size": 10,
"number": 0,
"first": true,
"last": true,
"empty": true,
"numberOfElements": 0
}
{
"error": {
"code": "UNAUTHORIZED",
"message": "Unauthorized"
}
}
{
"error": {
"code": "INTERNAL_ERROR",
"message": "An unexpected error occurred"
}
}
Provides autocomplete suggestions for companies based on search text. This endpoint powers company autocomplete dropdowns in the application, helping users quickly find and select companies by name. Results can be sorted by employee count for relevance.
Authentication
This endpoint requires authentication. The user must be signed in to access autocomplete data.This endpoint proxies requests to the our search metadata API. Results are
cached for 7 days to improve performance.
Request
string
Search query to filter companies by name. Returns companies that match this
text. Leave empty to retrieve all companies.
integer
default:"10"
Number of results to return per page. Maximum recommended value is 100.
integer
default:"0"
Zero-based page number for pagination.
string
Sort order for results based on company employee count.Allowed values:
asc- Sort by employee count ascending (smallest first)desc- Sort by employee count descending (largest first)
Response
Returns a paginated list of company items matching the search criteria.CompanyMetadataItem[]
Array of company items matching the query.
Show CompanyMetadataItem properties
Show CompanyMetadataItem properties
string
required
Unique identifier for the company.
string
required
Company display name.
string
URL to the company logo image. Can be null if no logo is available.
string
Company profile URL. Can be null.
string
Company primary domain (e.g., “google.com”). Can be null.
string
Company domain with TLD variation. Can be null.
string
Full website URL for the company. Can be null.
integer
Total number of matching companies across all pages.
integer
Total number of pages available.
integer
Number of items per page.
integer
Current page number (zero-based).
boolean
Whether this is the first page.
boolean
Whether this is the last page.
boolean
Whether the result set is empty.
integer
Number of elements in the current page.
Response Examples
{
"content": [
{
"id": "company_001",
"name": "Google",
"logo": "https://logo.clearbit.com/google.com",
"url": "https://linkedin.com/company/google",
"domain": "google.com",
"domainLtd": "google.com",
"website": "https://www.google.com"
},
{
"id": "company_002",
"name": "Alphabet Inc.",
"logo": "https://logo.clearbit.com/abc.xyz",
"url": "https://linkedin.com/company/alphabet-inc",
"domain": "abc.xyz",
"domainLtd": "abc.xyz",
"website": "https://abc.xyz"
}
],
"totalElements": 2,
"totalPages": 1,
"size": 10,
"number": 0,
"first": true,
"last": true,
"empty": false,
"numberOfElements": 2
}
{
"content": [
{
"id": "company_large",
"name": "Microsoft Corporation",
"logo": "https://logo.clearbit.com/microsoft.com",
"url": null,
"domain": "microsoft.com",
"domainLtd": "microsoft.com",
"website": "https://www.microsoft.com"
},
{
"id": "company_medium",
"name": "Stripe",
"logo": "https://logo.clearbit.com/stripe.com",
"url": null,
"domain": "stripe.com",
"domainLtd": "stripe.com",
"website": "https://stripe.com"
}
],
"totalElements": 150,
"totalPages": 15,
"size": 10,
"number": 0,
"first": true,
"last": false,
"empty": false,
"numberOfElements": 10
}
{
"content": [],
"totalElements": 0,
"totalPages": 0,
"size": 10,
"number": 0,
"first": true,
"last": true,
"empty": true,
"numberOfElements": 0
}
{
"error": {
"code": "UNAUTHORIZED",
"message": "Unauthorized"
}
}
{
"error": {
"code": "INTERNAL_ERROR",
"message": "An unexpected error occurred"
}
}
Usage Examples
Search for companies by name
curl -X GET "https://api.lance.work/api/v1/operations/autocomplete/companies?search=google&size=10" \
-H "Authorization: Bearer YOUR_TOKEN"
Get largest companies first
curl -X GET "https://api.lance.work/api/v1/operations/autocomplete/companies?employeeCount=desc&size=20" \
-H "Authorization: Bearer YOUR_TOKEN"
Paginate through results
curl -X GET "https://api.lance.work/api/v1/operations/autocomplete/companies?search=tech&page=2&size=25" \
-H "Authorization: Bearer YOUR_TOKEN"
Get small companies for SMB targeting
curl -X GET "https://api.lance.work/api/v1/operations/autocomplete/companies?employeeCount=asc&size=50" \
-H "Authorization: Bearer YOUR_TOKEN"
Notes
- Results are cached for 7 days to improve performance. The cache is shared across all users.
- Use the
searchparameter for type-ahead/autocomplete functionality - it filters results that match the company name. - The
employeeCountsort parameter is useful for targeting specific company sizes (enterprise vs SMB). - Company logos are provided via external URLs and may not always be available.
- The
domainfield is useful for deduplication and matching companies across different data sources.