post /v2/autocomplete/job-titles

Autocomplete job titles

Auto complete the job title search.
Endpoint POST /v2/autocomplete/job-titles
Credit cost 0.1 credits / call
Response Synchronous — up to 15 results
When to use Power a type-ahead input for job title keyword filters when searching people

Quickstart#

Job title keywords map to peopleFilters.jobTitleKeywords on Search People. Use this endpoint to suggest matching titles as the user types.

curl -X POST "https://api.ocean.io/v2/autocomplete/job-titles" \
  -H "X-Api-Token: YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "query": "head of",
    "limit": 5
  }'
import requests

response = requests.post(
    'https://api.ocean.io/v2/autocomplete/job-titles',
    headers={'X-Api-Token': 'YOUR_API_TOKEN'},
    json={'query': 'head of', 'limit': 5},
)
data = response.json()
const response = await fetch('https://api.ocean.io/v2/autocomplete/job-titles', {
  method: 'POST',
  headers: { 'X-Api-Token': 'YOUR_API_TOKEN', 'Content-Type': 'application/json' },
  body: JSON.stringify({ query: 'head of', limit: 5 }),
});
const data = await response.json();

Example response:

{
  "jobTitles": ["Head of Sales", "Head of Marketing", "Head of Engineering", "Head of Product", "Head of Growth"]
}

Pass the selected title into jobTitleKeywords.anyOf on your people search request.


Parameters#

Parameter Type Description
query string Required. Beginning of the job title. Maximum 100 characters.
limit integer Optional. Max results to return. Default 5, maximum 15.

Authorizations

apiToken string
x-api-token string

Body application/json

query string Required
Beginning of the job title
limit integer
Number of job titles to return. Default is 5 if not specified, maximum is 15.

Responses

200 Successful Response
Array of found job titles. Returns empty array if no results
Array of string
400 Bad Request
detail enum Required
"Conflicting API tokens provided in query parameters and headers"
402 Payment Required
detail enum Required
"Insufficient credits"
403 Forbidden
detail enum Required
"API token should be provided in headers or query parameters""Current API token is not registered in our database"
404 Not found
422 Validation Error
Array of ValidationError
Array of string | integer
string | integer
msg string Required
type string Required
input any
object