Show me this endpoint for


The autocompletes endpoint a string of characters provided to it, and then returns suggested terms that are the most likely full words or strings. The terms returned by the News API are based on parameters the type parameters you can see below.

For example, if you provide the autocompletes endpoint with the term New York C and select the type dbpedia_resources, the API will return links to the DBpedia resources New_York_City, New_York_City_Subway, New_York_City_Police_Department, and so on.


Name Type Description Notes
type str This parameter is used for defining the type of autocompletes. [enum: source_names, source_domains, entity_types, dbpedia_resources]
term str This parameter is used for finding autocomplete objects that contain the specified value.
language str 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]
per_page int This parameter is used for specifying number of items in each page. [optional] [default to 3]

Return type



import aylien_news_api
from import ApiException
from pprint import pprint

# Configure API key authorization: app_id
aylien_news_api.configuration.api_key['X-AYLIEN-NewsAPI-Application-ID'] = 'YOUR_APP_ID'
# Configure API key authorization: app_key
aylien_news_api.configuration.api_key['X-AYLIEN-NewsAPI-Application-Key'] = 'YOUR_APP_KEY'

# create an instance of the API class
api_instance = aylien_news_api.DefaultApi()

type = 'dbpedia_resources'
term = 'obam'

opts = {
    'language': 'en',
    'per_page': 3

    # List autocompletes
    api_response = api_instance.list_autocompletes(type, term, **opts)
except ApiException as e:
    pprint("Exception when calling DefaultApi->list_autocompletes: %s\n" % e)