Autocompletes
Show me this endpoint for

About

This endpoint is used for getting list of autocompletes by providing a specific term and type.

Parameters

Name Type Description Notes
type String This parameter is used for defining the type of autocompletes. [enum: source_names, source_domains, entity_types, dbpedia_resources]
term String This parameter is used for finding autocomplete objects that contain the specified value.
language String This parameter is used for autocompletes whose language is the specified value. It supports ISO 639-1 language codes. [optional] [default to en] [enum: en, de, fr, it, es, pt]
perPage Number This parameter is used for specifying number of items in each page. [optional] [default to 3]

Return type

Autocompletes

Example

var AylienNewsApi = require('aylien-news-api');

var apiInstance = new AylienNewsApi.DefaultApi();

// Configure API key authorization: app_id
var app_id = apiInstance.apiClient.authentications['app_id'];
app_id.apiKey = "YOUR_APP_ID";

// Configure API key authorization: app_key
var app_key = apiInstance.apiClient.authentications['app_key'];
app_key.apiKey = "YOUR_APP_KEY";

var type = "dbpedia_resources";
var term = "obam";
var opts = { 
  'language': "en",
  'perPage': 3
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + JSON.stringify(data));
  }
};
apiInstance.listAutocompletes(type, term, opts, callback);