Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
def aylien_api_connect(params, app_id, app_key, api_version):
# Define the API endpoint you would like to use - in this case "concepts".
endpoint = "concepts"
headers = {
'Accept': 'application/json',
'Content-type': 'application/x-www-form-urlencoded',
'X-AYLIEN-TextAPI-Application-ID': app_id,
'X-AYLIEN-TextAPI-Application-Key': app_key,
'User-Agent': "Aylien Text API Python " + api_version
url = '' + "/" + endpoint
response =, headers=headers, params=params)
content = json.loads(response.content)
return content
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.