Using Text Analytics in the Azure Cognitive Services API

Lab Steps

Logging in to the Microsoft Azure Portal
Retrieving Azure Cognitive Services API Credentials
Using the Azure Text Analytics API for Language Detection
Using the Azure Text Analytics API for Sentiment Analysis

Ready for the real environment experience?

Time Limit1h


Azure AI is Microsoft's solution for many of the most popular and widely-used AI and machine learning needs today. It incorporates a wide range of different tools that offer different AI-related services, such as text analytics, speech and image recognition, interacting with humans, making intelligent predictions and more. Artificial intelligence has been applied to nearly every existing industry today, and companies use Azure AI in particular because of the breadth of its offerings and its easy integration with existing Azure tools, such as Azure function apps and web services.

The Cognitive Services API is a comprehensive solution offering a number of different services in one consolidated API, including speech and text analysis. In this lab, you will practice making requests to the Text Analytics API within the Azure Cognitive Services API, using an Azure function app to make the API requests.

Lab Objectives

Upon completion of this lab you will be able to:

  • Connect an Azure Function App to the Text Analytics API
  • Use the Text Analytics API to detect languages and analyze sentiment in text

Intended Audience

This lab is intended for:

  • Developers
  • Cloud engineers
  • Anyone aiming to implement AI or machine learning within their workflow


You should be familiar with:

  • The principles of Node.js is helpful but not required
  • The principles of the Azure Portal is helpful but not required


March 10th, 2022 - Updated the instructions and screenshots to reflect the latest UI

July 29th, 2020 - Updated the content to match the latest Azure Portal experience

Environment before
Environment after
About the Author
Learning paths8

Matt has worked for multiple Fortune 500 companies as a DevOps Engineer and Solutions Architect. He is an AWS Certified DevOps Engineer - Professional, and an AWS Certified Solution Architect - Associate. He enjoys reading and learning new technologies.