Skip to main content
GET
/
api
/
v1
/
operations
/
autocomplete
/
people
Autocomplete People
curl --request GET \
  --url https://api.example.com/api/v1/operations/autocomplete/people \
  --header 'Authorization: Bearer <token>'
{
  "content": [
    {
      "id": "person_001",
      "name": "John Smith",
      "title": "Senior Software Engineer",
      "logo": "https://example.com/profiles/john-smith.jpg",
      "url": "https://linkedin.com/in/johnsmith"
    },
    {
      "id": "person_002",
      "name": "John Doe",
      "title": "Product Manager",
      "logo": "https://example.com/profiles/john-doe.jpg",
      "url": "https://linkedin.com/in/johndoe"
    },
    {
      "id": "person_003",
      "name": "Johnny Wilson",
      "title": "CTO",
      "logo": null,
      "url": "https://linkedin.com/in/johnnywilson"
    }
  ],
  "totalElements": 156,
  "totalPages": 16,
  "size": 10,
  "number": 0,
  "first": true,
  "last": false,
  "empty": false,
  "numberOfElements": 10
}
Provides autocomplete suggestions for people/contacts. This endpoint powers the autocomplete functionality when searching for specific people, enabling type-ahead search with names, titles, and profile images.

Authentication

This endpoint requires authentication. The user must be signed in to access autocomplete data.
This endpoint proxies requests to the people search metadata API. Results are cached for 7 days to improve performance.

Request

Search query to filter people. Returns people whose names match this text. Leave empty to retrieve all people (paginated).
size
integer
default:"10"
Number of results to return per page.
page
integer
default:"0"
Zero-based page number for pagination.

Response

Returns a paginated list of people matching the search criteria.
content
PeopleMetadataItem[]
Array of people items matching the query.
totalElements
integer
Total number of matching people 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": "person_001",
      "name": "John Smith",
      "title": "Senior Software Engineer",
      "logo": "https://example.com/profiles/john-smith.jpg",
      "url": "https://linkedin.com/in/johnsmith"
    },
    {
      "id": "person_002",
      "name": "John Doe",
      "title": "Product Manager",
      "logo": "https://example.com/profiles/john-doe.jpg",
      "url": "https://linkedin.com/in/johndoe"
    },
    {
      "id": "person_003",
      "name": "Johnny Wilson",
      "title": "CTO",
      "logo": null,
      "url": "https://linkedin.com/in/johnnywilson"
    }
  ],
  "totalElements": 156,
  "totalPages": 16,
  "size": 10,
  "number": 0,
  "first": true,
  "last": false,
  "empty": false,
  "numberOfElements": 10
}

Usage Examples

Search for people by name

curl -X GET "https://api.lance.work/api/v1/operations/autocomplete/people?search=john&size=10" \
  -H "Authorization: Bearer YOUR_TOKEN"

Get all people (first page)

curl -X GET "https://api.lance.work/api/v1/operations/autocomplete/people" \
  -H "Authorization: Bearer YOUR_TOKEN"

Paginate through results

curl -X GET "https://api.lance.work/api/v1/operations/autocomplete/people?page=2&size=25" \
  -H "Authorization: Bearer YOUR_TOKEN"

Search with larger page size

curl -X GET "https://api.lance.work/api/v1/operations/autocomplete/people?search=manager&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 by name.
  • The logo field may be null if the person doesn’t have a profile image.
  • The url field typically contains a LinkedIn profile URL but may be null or contain other profile URLs.
  • For best autocomplete UX, use a small size (10-20) and debounce requests as users type.