/v2/autocomplete/job-titles| 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 |
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.
| 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. |
apiToken string x-api-token string query string Required limit integer 200 Successful Response400 Bad Requestdetail enum Required "Conflicting API tokens provided in query parameters and headers"402 Payment Requireddetail enum Required "Insufficient credits"403 Forbiddendetail enum Required "API token should be provided in headers or query parameters""Current API token is not registered in our database"404 Not found422 Validation Errormsg string Required type string Required input any