Input Parameters - Autocomplete API

Detailed information on the input parameters for the Autocomplete API

Required Parameters

field

RequiredDescriptionDefaultExample
TrueThe field that the API will perform autocompletion upon.Nonetitle

The field input parameter specifies the field to autocomplete. The fields that the Autocomplete API support map to a subset of the Person Schema fields.

The list of valid arguments is:

  • company
  • country
  • industry
  • location
  • major
  • region
  • role
  • school
  • sub_role
  • skill
  • title

The Mapping of Input Field Parameters to Person Schema Fields

The Autocomplete API maps each input field parameter to a specific subset of Person Schema fields. This means that, for example, using the industry field value will generate autocomplete suggestions for the industry, job_company_industry and experience.company.industry fields in the Person Schema.

Here is the full set of mappings between the Autocomplete input fields and the Person Schema fields:

Autocomplete field ParameterCorresponding Person Schema Fields
companyjob_company_name
experience.company.name
countrylocation_country
countries
street_addresses.country
job_company_location_country
experience.company.location.country
industryindustry
job_company_industry
experience.company.industry
locationlocation_name
location_names
street_addresses.name
job_company_location_name
experience.location_names
experience.company.location.name
majoreducation.majors
education.minors
regionlocation_region
regions
street_addresses.region
job_company_location_region
experience.company.location.region
rolejob_title_role
experience.title.role
schooleducation.school.name
sub_rolejob_title_sub_role
experience.title.sub_role
skillskills
titlejob_title
experience.title.name

Optional Parameters

text

RequiredDescriptionDefaultExample
FalseThe text that the API will use as the seed for autocompletion.""tesl

The text field specifies what the Autocomplete API will use as a primer for returning suggestions.

Example

Let's see how the Autocomplete API behaves when we progressively build out tesla in the text field. Each call below represents a separate Autocomplete API call, where we keep updating the text field while keeping all other input parameters the same. For each call, we show not only the input parameters but also the top result that the Autocomplete API returns.

📘

Note: Click the Triangles To Expand Each of the API Calls Below

Each call demonstrates the input parameters and the top result that the Autocomplete API returns.

API Call 1:

text = ""

Input Parameters:

params = {
    "field": "company",
    "text": "",
    "pretty": True,
    "api_key": API_KEY,
}

Top Autocomplete Result:

"data": [
    {
      "count": 501510,
      "name": "ibm",
      "meta": {
        "website": "ibm.com",
        "industry": "information technology and services",
        "location": "new york, new york, united states"
      }
    },

API Call 2:

text = "t"

Input Parameters:

params = {
    "field": "company",
    "text": "t",
    "pretty": True,
    "api_key": API_KEY,
}

Top Autocomplete Result:

  "data": [
    {
      "count": 361642,
      "name": "tata consultancy services",
      "meta": {
        "website": "tcs.com",
        "industry": "information technology and services",
        "location": "bombay, maharashtra, india"
      }
    },

API Call 3:

text = "te"

Input Parameters:

params = {
    "field": "company",
    "text": "te",
    "pretty": True,
    "api_key": API_KEY,
}

Top Autocomplete Result:

  "data": [
    {
      "count": 102762,
      "name": "tech mahindra",
      "meta": {
        "website": "techmahindra.com",
        "industry": "information technology and services",
        "location": "pune, maharashtra, india"
      }
    },

API Call 4:

text = "tes"

Input Parameters:

params = {
    "field": "company",
    "text": "tes",
    "pretty": True,
    "api_key": API_KEY,
}

Top Autocomplete Result:

  "data": [
    {
      "count": 49735,
      "name": "tesco",
      "meta": {
        "website": "tescoplc.com",
        "industry": "retail",
        "location": "welwyn garden city, hertfordshire, united kingdom"
      }
    },

API Call 5:

text = "tesl"

Input Parameters:

params = {
    "field": "company",
    "text": "tesl",
    "pretty": True,
    "api_key": API_KEY,
}

Top Autocomplete Result:

  "data": [
    {
      "count": 39992,
      "name": "tesla",
      "meta": {
        "website": "tesla.com",
        "industry": "automotive",
        "location": "palo alto, california, united states"
      }
    },

API Call 6:

text = "tesla"

Input Parameters:

params = {
    "field": "company",
    "text": "tesla",
    "pretty": True,
    "api_key": API_KEY,
}

Top Autocomplete Result:

  "data": [
    {
      "count": 39992,
      "name": "tesla",
      "meta": {
        "website": "tesla.com",
        "industry": "automotive",
        "location": "palo alto, california, united states"
      }
    },

size

RequiredDescriptionDefaultExample
TrueThe number of results that the API should return, which must be between 1 and 100.10100

pretty

RequiredDescriptionDefaultExample
TrueWhether the output should have human-readable indentation.FalseTrue

api_key

RequiredDescriptionDefaultExample
TrueYour secret API key. While we do not require this as part of the request parameters, if you do not provide it here, then you must provide it using an alternative means, such as in the headers using the x-api-key field. For more information, see the Authentication page.None

Did this page help you?