Skip to main content
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>'
{
  "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
}
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

Search query to filter companies by name. Returns companies that match this text. Leave empty to retrieve all companies.
size
integer
default:"10"
Number of results to return per page. Maximum recommended value is 100.
page
integer
default:"0"
Zero-based page number for pagination.
employeeCount
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.
content
CompanyMetadataItem[]
Array of company items matching the query.
totalElements
integer
Total number of matching companies across all pages.
totalPages
integer
Total number of pages available.
size
integer
Number of items per page.
number
integer
Current page number (zero-based).
first
boolean
Whether this is the first page.
last
boolean
Whether this is the last page.
empty
boolean
Whether the result set is empty.
numberOfElements
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
}

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 search parameter for type-ahead/autocomplete functionality - it filters results that match the company name.
  • The employeeCount sort 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 domain field is useful for deduplication and matching companies across different data sources.