Input Parameters - Autocomplete API

Detailed information on the input parameters used for the Autocomplete API

Required Parameters

field

RequiredDescriptionDefaultExample
TrueThe field that autocomplete will be generated for.Nonetitle

The field input parameter specifies which type field to run autocomplete for. The fields supported by the Autocomplete API map to a subset of the Person Schema fields.

The list of all valid arguments is:

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

Mapping of Input Arguments Person Schema Fields

Each field argument value for the Autocomplete API maps to specific subset of Person Schema fields. As an example, this means that using the industry field value will generate autocomplete suggestions for the industry, job_company_industry, and experience.company.industry fields in the Person Schema. The full set of mappings between Autocomplete fields and Person Schema fields is shown in the following table:

Autocomplete field ValueCorresponding 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
FalseText that is used as the seed for autocompletion.""tesl

The text field specifies the text that the autocomplete suggestions will be based on.

Example

As an example, let's see how the autocomplete behaves as we spell out tesla in the text field. Each example below represents a separate call to the Autocomplete API where we kept the input parameters the same and just updated the text field. For each call, we show the input parameters sent and the top result returned by the Autocomplete API.

📘

Note! Click the triangles to expand each of the API calls below

Each example illustrates the input parameters and the top result returned by the Autocomplete API.

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
TrueNumber of results returned for autocompletion. Must be between 1 and 100.10100

pretty

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

api_key

RequiredDescriptionDefaultExample
TrueNot required as part of the request parameters, but if not provided here, then it must be provided in the headers using the x-api-key field. For more information see the Authentication page.None<API_KEY>

Did this page help you?